Skip to content

event.namespace instrumentation scope attribute instead of event.name prefixes #4239

@pellared

Description

@pellared

I think that instrumentation libraries emitting events could add a event.namespace instrumentation scope attribute instead of putting the namespace to each event.name value as a prefix.

Remarks:

  • This should decrease the size of exported log payloads
  • Separate loggers for emitting events and log records. Clearer intend of the Logger usage. It also makes it possible to distinguish "events" emitted via bridged libraires by application devs, and OTel Logs API by instrumentation libraries, and application devs which creates "business" events using OTel Logs API.
  • SDK Logger implementation have access to instrumentation scope attributes. The user does not need to pass the event.namespace each time. The namespace would be known for Logger.Enabled even if the caller does not pass event.name. Related issue: Add EventName parameter to Logger.Enabled #4220
  • Each events semantic convention should define its namespace e.g. http, android.

An alternative approach could be to add the event namespace both in event.name log record attribute and event.namespace instrumentation scope attribute. However, I think that the redundancy will increase the performance overhead and complexity of the design.

Metadata

Metadata

Assignees

No one assigned

    Labels

    sig-issueA specific SIG should look into this before discussing at the specspec:logsRelated to the specification/logs directorytriage:deciding:community-feedbackOpen to community discussion. If the community can provide sufficient reasoning, it may be acceptedwontfixThis will not be worked on

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions