opentelemetry-go icon indicating copy to clipboard operation
opentelemetry-go copied to clipboard

[Prototype] attribute: add complex value types

Open pellared opened this issue 5 months ago • 2 comments
trafficstars

Prototype for https://github.com/open-telemetry/opentelemetry-specification/pull/4485

This PR is to validate that it is possible to extend attributes with complex attributes without making breaking changes and making sure that Value is still comparable.

It does not implement everything. I was just focused how we are able to handle the following new attribute value types in a backwards compatible way:

  • empty value
  • heterogeneous array
  • (heterogeneous) map
  • I was too lazy to implement bytes

This PR does not update the code dependent on attributes package. Exporters do not export complex attributes and the Logs API do not use this package. Nothing prevents doing it and I think this is not necessary to validate the OTEP.

pellared avatar May 22 '25 11:05 pellared

@open-telemetry/go-maintainers, do you think that there anything more that I should add/check in order to validate the https://github.com/open-telemetry/opentelemetry-specification/pull/4485?

pellared avatar May 22 '25 12:05 pellared

SIG meeting: Looks good for the Go SIG. The only feedback was that it would be safer to have EMPTY a new type (distinct from INVALID) and creating empty values would require "factory functions".

pellared avatar May 22 '25 17:05 pellared