-
Notifications
You must be signed in to change notification settings - Fork 889
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
event.namespace
instrumentation scope attribute instead of event.name
prefixes
#4239
Comments
In semconv we use a global namespace, so this feels like a question for that SIG. |
(but I'm not against the idea, this is the kind of thing I would like us to play with once we have a decent amount of prototyping completed) |
Another concern – perhaps a blocking one – is that right now LogRecords are self contained. Instrumentation Scope is very helpful, but it's a nice-to-have as far as processing the data on the back end. If critical information needed to fully qualify the event name is only present in the instrumentation scope, things have suddenly gotten more complicated, as the LogRecord is now incomplete and un-processable on its own. Obviously, important context such as |
Is that already spec-ed out that event.name MUST be fully qualified name? |
@cijothomas If we are saying that each event is it's own semantic convention, and for that reason you can expect all of the log records with the same event name to have same attributes, event names would have to be fully qualified. Otherwise we would have to say "each event name plus namespace" must be its own semantic convention. If we determine that having a separate namespace and name makes event processing easier than having a single fully qualified name, I'm not against it. But if that namespace is not actually on the log record, my intuition is that it would create all kinds of problems, and would make event processing harder, not easier. Log records don't contain a pointer to an instrumentation scope. imho, a small reduction in payload size (which can also be reduced by compression or Otel Arrow) doesn't seem like a great reason to make the fully qualified name of a log record unknowable from the log record itself. |
It also makes the assumption that a library/package/class would only produces events from a single namespace. I'm not sure if that assumption holds. A library might contain semantic conventions from more than one domain. This certainly happens with spans. |
Isn't InstrumentationScope created to avoid such conflicts?
Payload/Storage size reduction was not the motivation. I was thinking of the use cases where one needs to act based on Event.Name and it'll be faster with smaller (i.e without fully qualified) Event.Name. |
From SDK docs https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/sdk.md#readablelogrecord:
|
It would be still possible to produce events with multiple namespace. For each for each event namespace the caller would have to create distinct loggers (with different instrumentation scope attributes) and use them accordingly. Basically a Logger with |
Yes, point [1] under the definition states that the event name is subject to the exact same rules are attributes and that they are namespaced to avoid collisions to provide clean separation of the semantics of each event. The "MUST" portion, however, is part of the General event semantics and after "LOTS" of discussions, this approach was taken (it was previously This is listed in the "Recommendations", that the fields of an event are not comparable unless they have the same |
This is the exact issue that eventually caused use to revert back to a single name, as we prototyped having "getEventLogger( |
Yes but I'm referring to backends that have to process this data, not the SDK. If you look at OTLP, there is no pointer from a LogRecord to an InstrumentationScope. That does not feel like a data model that is set up very well to require the InstrumentationScope in order to fully qualify a LogRecord.
That is definitely workable, but also feels very burdensome from a UX perspective. You can look at HTTP instrumentation where multiple domains are required, such as |
btw, I don't see anything wrong with language implementations adding convenience methods to the LoggingProvider to produce loggers with some attributes pre-filled, if that is helpful to users. It's making the use of multiple loggers a requirement, and making the LogRecord literally useless without access to the InstrumentationScope, that I am opposed to. |
I am OK closing this issue. Are we documentating/tracking somehow the rejected proposals? |
SIG meeting: |
I think that instrumentation libraries emitting events could add a
event.namespace
instrumentation scope attribute instead of putting the namespace to eachevent.name
value as a prefix.Remarks:
event.namespace
each time. The namespace would be known forLogger.Enabled
even if the caller does not passevent.name
. Related issue: Add EventName parameter to Logger.Enabled #4220http
,android
.An alternative approach could be to add the event namespace both in
event.name
log record attribute andevent.namespace
instrumentation scope attribute. However, I think that the redundancy will increase the performance overhead and complexity of the design.The text was updated successfully, but these errors were encountered: