Skip to content
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

Closed
jack-berg opened this issue Aug 24, 2021 · 5 comments
Closed

Support map attribute values #3542

jack-berg opened this issue Aug 24, 2021 · 5 comments
Labels
Feature Request Suggest an idea for this project

Comments

@jack-berg
Copy link
Member

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.

@jack-berg jack-berg added the Feature Request Suggest an idea for this project label Aug 24, 2021
@Oberon00
Copy link
Member

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.

@jack-berg
Copy link
Member Author

That protocol feature is only meant for use with logs

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?

@jkwatson
Copy link
Contributor

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?

@Oberon00
Copy link
Member

Oberon00 commented Aug 24, 2021

@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

@jack-berg
Copy link
Member Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Suggest an idea for this project
Projects
None yet
Development

No branches or pull requests

3 participants