-
Notifications
You must be signed in to change notification settings - Fork 976
Attributes "hell" #4201
Copy link
Copy link
Closed
Labels
spec:logsRelated to the specification/logs directoryRelated to the specification/logs directorytriage:deciding:community-feedbackOpen to community discussion. If the community can provide sufficient reasoning, it may be acceptedOpen to community discussion. If the community can provide sufficient reasoning, it may be accepted
Metadata
Metadata
Assignees
Labels
spec:logsRelated to the specification/logs directoryRelated to the specification/logs directorytriage:deciding:community-feedbackOpen to community discussion. If the community can provide sufficient reasoning, it may be acceptedOpen to community discussion. If the community can provide sufficient reasoning, it may be accepted
Type
Projects
Status
Done
What are you trying to achieve?
Share the same attributes across traces/metrics/logs. I do understand that the logs.attributes (this was a surprise that even attributes are different) and especially the body (not surprised about this) can be more generic than the traces and metrics, see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#field-attributes and https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#field-body.
What did you expect to see?
Clear requirement in the bridge-api to support adding the "standard attributes" as well, since there are semantic conventions generate (example in go) that use the old style attributes.
Additional context.
Currently because of the logs data model saying that log record attributes are different than span/metrics attributes and that the bridge api reference to that https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/bridge-api.md#emit-a-logrecord
Java offers only support to add the "old style" attributes as attributes, see https://github.com/open-telemetry/opentelemetry-java/blob/main/api/all/src/main/java/io/opentelemetry/api/logs/LogRecordBuilder.java
Go offers only the more generic way, and I cannot share the attributes easily, see https://github.com/open-telemetry/opentelemetry-go/blob/main/log/record.go#L112