-
Notifications
You must be signed in to change notification settings - Fork 863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support map attribute values #3542
Comments
That protocol feature is only meant for use with logs (which are not supported at all currently). The "normal" attributes that the tracing API should support are described in the specification here: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/common.md#attributes You cannot just start allowing more attribute types in an 1.x version, as that would potentially break third party exporters and span processors. |
Interesting. Looking for evidence of this in the protos, I see a comment on trace.proto which references different attribute types, which excludes maps, but also excludes arrays which are definitely supported. No mention of unsupported types in the metric.proto, or resource.proto. So is the idea that the next major version of the spec may expand map attribute types to other signals (metrics / logs), but for now apis / sdks are not expected to support those types despite availability in the protos? |
I would prefer not to complicate our APIs with support for this. @jack-berg do you have a real-life use-case for this at this point? |
@jack-berg You need to do some archeology to find that 😃 See PR description here: open-telemetry/opentelemetry-proto#157 Anyway, the reference for what the API should support is the specification (https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/common.md#attributes), not what some protocol that we support supports (even though I concede that OTLP is our "primary" protocol). I know of at least one time this feature was discussed in the spec here: open-telemetry/opentelemetry-specification#596 |
@jkwatson I opened this issue mostly to prompt a discussion for I what I interpreted was a discrepancy between the spec and the java implementation. Upon further clarification, especially from this comment, it appears that there is an acknowledged difference between the attributes in the OTLP proto and in the API. (Thanks for helping clarify that @Oberon00!) I think we should close this issue until the spec issue is resolved. |
Is your feature request related to a problem? Please describe.
The protos support map attribute values via the KeyValueList type. The otel java API / SDK should support map attribute values.
Describe the solution you'd like
Add map APIs / implementations to the attribute package in
io.opentelemetry.api.common
.Describe alternatives you've considered
N/A.
Additional context
N/A.
The text was updated successfully, but these errors were encountered: