-
Notifications
You must be signed in to change notification settings - Fork 179
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
Deprecate event.name
attribute in favor of EventName on the log record
#1646
base: main
Are you sure you want to change the base?
Deprecate event.name
attribute in favor of EventName on the log record
#1646
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's still just draft, but this seems fine.
docs/general/events.md
Outdated
@@ -87,15 +67,15 @@ Recommendations on using attributes vs. body fields: | |||
|
|||
* If the field should be comparable across every type of record, it should be an attribute. | |||
* If the field is specific to the event itself, then it should be a body field. | |||
* Unless the same `event.name` exists on two events, anything in two event bodies is not comparable to each other. | |||
* Unless two events share the same `EventName` property value, anything in two event bodies is not comparable to each other. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should reword the "two events" definition, as now it reads (to me) more specific than the previous trailing "two events"... Perhaps something like
(really just removing the "two" qualification as someone is likely to ask the question of what about if three, four, five events etc.)
"Unless the EventName
property value matches, any fields or values within event bodies that share the same name or path should not be considered comparable."
With maybe a qualifier "Unless explicitly called out by the specific event definition" (or we can leave this out as edge cases (which they are).
And maybe a general follow up qualification about case-sensitivity (although I'm assuming that by keeping the above comments about Event names are subject to the same rules as [attribute names](/docs/general/attribute-naming.md)
this "should" avoid this question... (Hopefully)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the text, ptal
adf6a98
to
75746bc
Compare
|
||
* An event MUST have an `event.name` attribute that uniquely identifies the event. | ||
* It MAY have [standard](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.39.0/specification/common#attribute) | ||
* An event MUST have an [Event name property](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.40.0/specification/logs/data-model.md#field-eventname) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spec 1.40.0 release is pending, let's wait for it to land
Part of open-telemetry/opentelemetry-specification#4260
Logs SIG is working on migrating from
event.name
attribute toEventName
field on LogRecord. This is a WIP that depends on theevent.name
attribute into top-level event name field opentelemetry-specification#4320event_name
to logs proto opentelemetry-proto#600Creating it to socialize the proposal and gather high-level feedback.
Semantic conventions that depend on
event.name
(over-the-wire):az.resource.log
and the corresponding collector receiverdevice.app.lifecycle
event - did not find any instrumentations in otel org.feature_flag.evaluation
akafeature_flag
event - no instrumentations in otel orgexception
andrpc.message
are span events - they should not populateevent.name
and should not be affected at allTransition
event.name
is an experimental attribute and de-facto is used by new-ish conventions and instrumentation libraries.So we (Logs SIG) believe no common transition/migration plan is necessary, but individual instrumentation libraries can provide back-compat story.
event.name
attribute can do a breaking change and start usingLogRecord.EventName
property instead of the attribute. It's up to each instrumentation component to provide (or not provide) transition story.event.name
attribute, newLogRecord.EventName
property or both. When both are present, theLogRecord.EventName
should be used as a source of truth.Future
Instead of deprecating
event.name
, we might want to reserve it for bridges similarly tootel.status_code
. E.g. when users want to report event using logging bridge and the logging facade does not have a notion of event name, theevent.name
attribute maybe used by the end users and translated to top-levelLogRecord
property by the adapter.Deprecating the attribute is reversible, so I'd prefer to do it now and tackle compatibility with external logging libs separately.
Merge requirement checklist
[chore]