How to add type safety to attributes #4000
Unanswered
nandin-borjigin
asked this question in
Q&A
Replies: 1 comment
-
Can you provide more context? Maybe an example or reference to what you are talking about? Statically type language implementations of OpenTelemetry already use typing in their APIs. For example: https://pkg.go.dev/go.opentelemetry.io/otel/attribute |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The OpenTelemetry specification only requires attributes to be collection of
KeyValue
pairs. AndKeyValue
s are merely a tuple of two arbitrary strings. This open a room for typos, causing incorrect aggregation and increase of attribute key cardinality. The cardinality of the attribute keys are very crucial when the amount of the telemetry signal is large.Can we revise the specification so that statically typed languages can implement a more robust APIs for data models which has attributes (Metric, Span, Resource, etc) ?
Beta Was this translation helpful? Give feedback.
All reactions