open-telemetry / opentelemetry-specification

Specifications for OpenTelemetry
https://opentelemetry.io
Apache License 2.0
3.76k stars 890 forks source link

Emit Event and event.name attribute ambiguity #4233

Closed pellared closed 2 months ago

pellared commented 2 months ago

Another problem, I see in defining Emit an Event method (in scope of this PR) is that there would be an ambiguity what should happen if a user adds an additional event.name attribute. Should the name parameter or event.name attribute have precedence?

PS. The same problem currently exists in https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/event-api.md#emit-event

_Originally posted by @pellared in https://github.com/open-telemetry/opentelemetry-specification/pull/4225#discussion_r1781631410_

jack-berg commented 2 months ago

PS. The same problem currently exists in https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/event-api.md#emit-event

https://github.com/open-telemetry/opentelemetry-specification/blame/fbaf8468c599d858df515c88bac58d02c9afdb29/specification/logs/event-sdk.md#L86-L89

The Name MUST be used to set the event.name Attribute. If the Attributes provided by the user contain an event.name attribute the value provided in the Name takes precedence.