-
Notifications
You must be signed in to change notification settings - Fork 998
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
Support for array of span attributes #718
Comments
Is this what you are looking for? opentelemetry-go/sdk/trace/provider.go Line 200 in 88100f0
|
I don't believe so? What I'm understanding for the 'array' support in the spec is that it should be possible for the values to accept primitive arrays for a single key, e.g:
open-telemetry/opentelemetry-specification#368
This was added to the DotNet implementation back in February: open-telemetry/opentelemetry-dotnet#500 |
The ask from the SIG meeting today was to make this more universal:
This might need to update the specification to be in compliance if the above are included. |
@MrAlias I would like to work on this issue. |
@MrAlias I am thinking of two ways of doing this.
|
I think you could try to leverage the Go type system a bit more which already guarantees slice/array homogeneity. I haven't worked through the full example, but I imagine something like this would suffice:
I would probably support multi-level slices/arrays here because the spec is a bit vague about this (primitive type is not well defined (is it language specific?)) and our value functions here are not setup for returning errors here. |
Support for attribute arrays does not appear to be implemented (yet?), but is covered by the spec:
https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/api.md#set-attributes
I'd imagine the API for this looking something like the following for each primitive type:
The text was updated successfully, but these errors were encountered: