Repository navigation
feat(attributes): Add allow_any_value field to attribute schema - #272
Merged
Merged
Conversation
Introduce an optional boolean field allow_any_value that marks attributes which can hold any value type as per the OTEL AnyValue convention, rather than being limited to the declared scalar type. By default (field absent), the ingestion pipeline rejects non-scalar values for an attribute. When allow_any_value is true, the pipeline accepts object/complex values for that attribute instead of dropping them. The flag propagates through code generation: - TypeScript: value type becomes unknown (covers all primitives + objects) - Python: value type becomes object (str is a subtype of object in Python) - AttributeMetadata: exposes allowAnyValue/allow_any_value for runtime use Co-Authored-By: Claude <[email protected]>
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛
Documentation 📚
Internal Changes 🔧Deps
Other
🤖 This preview updates automatically when you update the PR. |
vgrozdanic
marked this pull request as ready for review
March 3, 2026 11:34
vgrozdanic
requested review from
a team,
Lms24,
cleptric,
lcian,
mjq and
nsdeschenes
as code owners
March 3, 2026 11:34
Dav1dde
approved these changes
Mar 3, 2026
Dav1dde
left a comment
Member
There was a problem hiding this comment.
I don't necessarily like that the name is tied to OTeL, since the behaviour is independent of OTeL. Then again I can't come up with a better name ad-hoc.
Member
|
Let's please make this a proper change and we add a value type attribute to the schema. Like https://opentelemetry.io/docs/specs/semconv/general/attributes/#server-attributes does. |
This was referenced Apr 13, 2026
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce an optional boolean field
allow_any_valueon attribute definitions. When set totrue, it signals that the attribute can hold any value type as per the OTELAnyValueconvention, not just the declared scalar type.The ingestion pipeline currently rejects non-scalar values for all attributes. This field enables a curated opt-in for attributes where complex/object values must be accepted rather than dropped.
The flag propagates through code generation:
unknown(since TSobjectexcludes primitives,unknowncorrectly covers strings + objects)object(stris a subtype ofobjectin Python, so this naturally subsumes strings)AttributeMetadata: exposesallowAnyValue(TS) /allow_any_value(Python) so the pipeline and SDKs can read it at runtimeAbsence of the field means
false— consistent with howhas_dynamic_suffixworks.Closes TET-2008: Add a new attribute to sentry conventions to allowlist object value