Skip to content

Add EventName to LogRecord #4644

@DylanRussell

Description

@DylanRussell

The event.name attribute has been deprecated in favor of a top level EventName string field in the LogRecord.

See open-telemetry/opentelemetry-specification#4260 (comment)

It no longer makes sense to have an Event class at all now.. An event is just a LogRecord with the event name field set..

I think we should revisit events, and look at the approach that they took in go lang (open-telemetry/opentelemetry-go#6018), where the only change they made to support events was to add the EventName string field to the LogRecord.. In order to emit events, a user simply calls LoggerProvider.emit with a LogRecord that has the event name set.. That's it.

Wondering what others think of doing it that way. Given events are still in alpha, i don't think it's too late to make this change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions