-
Notifications
You must be signed in to change notification settings - Fork 895
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
Add EventName to Log and Event Record in data model #4260
Comments
I think this change is important from design perspective, if we want to make sure that we have separate APIs for emitting log records and events. It allows as to make it impossible to emit an event using The events would have to be emitted using
|
I would be in favor of this! I have concerns around supporting 3rd party loggers wanting to create events. Those loggers would not have a name field, so they would need to use something like an |
But I do think the Name field should be added as an option onto the EmitLogRecord function. In part for the reasons described in the comment above: there may be bridges to loggers that are creating events in some way. But also because it seems wrong to hide it. |
The bridges can use |
SIG meeting notes:
|
Based on the discussion in the Logs SIG (11/26) and during spec call (11/19) we'd like to proceed with the change. We'll break it down into several pieces
There will be no backward compatibility or transition period given that
|
Semantic conventions that depend on
/cc @open-telemetry/semconv-mobile-approvers @open-telemetry/semconv-feature-flag-approvers, LMK if I missed something and there are instrumentations or other components that populate |
I like the simplicity of this approach, however in the spec call where this change was discussed the idea that we will have a transition period was floated. Please make sure there is clear visibility that we are not doing it (Slack, spec call, Log SIG, etc). I want to make sure there are no existing users of |
This is a proposal to add
EventName
of typestring
as a field in the data model instead of having it just aevent.name
string attribute defined in semantic conventions.Related to:
Event Enabled
operation toLogger
#4263Consequences
event.name
(e.g. by log bridges). Promoting it to a field with a concrete type would make the design more type-safe. So far my understanding is that most people would like to have it asstring
. On the other hand, there are some cases where users would like to have something different or more lightweight. Personally, I think settling on a concrete "type" is better than having something very generic and abstract. I think that havingEventId
ofany
type is nothing better than havingevent.name
defined in semantic conventions. I would consider havingEventId
of an integer type (instead ofEventName
as string) for performance reasons; yet this can be tracked separate issue.Originally posted by @cijothomas in #4203 (comment)
Originally posted by @cijothomas in #4220 (comment)
Bridges for logging libraries that do not have a concept of log record identifier would need to have some convention to map
event.name
attribute intoEventName
field. This mapping could be configurable. Therefore, people who do not want to emit events using logging libraries may disable this mapping behavior.Emitting events would need to be done by calling
Emit Event
on Logger (see Add EmitEvent to Logs API #4259) (unless optional parameter EventName is added to Logger.Emit). Log bridges would have to call Emit Event when they would want to produce eventsRemark
The main question is whether we want to promote the
event.name
attribute to a LogRecordEventName string
field. The decision on the desired field's name and type can be tracked as a separate issue.The text was updated successfully, but these errors were encountered: