-
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 API should document whether it supports complex attribute types #4199
Comments
For the "attributes" it should be restricted to "standard" attributes as called out. For the "body" fields, ( |
It should be specified in Event API doc that Emit Event attributes are restricted to standard attributes. |
BTW what would be the reason NOT to support complex types for custom (non-semconv) events? opentelemetry-specification/specification/common/README.md Lines 84 to 97 in e9a2b00
lists backward-compatibility (not appliable here), indexing, analysis. I assume that customer reporting the same event using event or logging API should be able to achieve the same outcome. And if they chose to report their own events with complex attribute structure, they probably need to take possible querying, indexing, and other problems into consideration. It does not mean that we should lift restrictions on the semconv side - otel semconv attributes are cross-signal by definition and can't support complex types. Any events emitted by otel instrumentation will use standard attributes. |
For the "standard" attributes, this was (mostly) because SDK implementations don't support (or correctly support) being passed a complex attribute (even though Protobuf does support) and then the decision was made to restrict the difference between "standard" and "log (extended) attributes). For the "body" the intent IS to support nested attributes, and I believe in the JS prototype we added support for a |
I don't understand this. Logs spec explicitly allows to use complex attribute types as an exception. opentelemetry-specification/specification/common/README.md Lines 77 to 82 in e9a2b00
So if SDKs don't support it it's a bug. I believe that events should follow the same pattern since they are based on logs. |
this issue has stalled, are there any updates? What is required to move it forward? |
Waiting till #4225 is settled would be best, given there are still open discussions/questions? |
I believe that this issue should now be closed based on the outcome and this PR which prohibits "standard" attributes from evolving to contain complex types. We should have all explicit "Attribute" be standard "Attributes" from a Sem-Convention perspective, and ensure that from an OpenTelemetry perspective the "complex" types "should" be restricted to the "body" -- Although I do appreciate that "Logs" and "LogAttributes" at the protocol level can support nesting... |
That PR explicitly allowed In particular opentelemetry-specification/specification/common/README.md Lines 77 to 82 in e9a2b00
|
We restrict attribute types to primitives and array or primitives and make an exception for
LogRecord
.opentelemetry-specification/specification/common/README.md
Lines 76 to 80 in e9a2b00
See #3858 for the context.
Semconv event definition however limits events attributes and does not allow them to have complex types.
https://github.com/open-telemetry/semantic-conventions/blob/11f5d37d1624c2392ea97f40e76c1b3c7cd30124/docs/general/events.md?plain=1#L61
We should explicitly call out supported attribute types for events in the spec so that the restriction applies to all events and not just those defined in semantic conventions (or decide that events support complex types).
The text was updated successfully, but these errors were encountered: