open-telemetry / open-telemetry/weaver
Semantic Conventions (tooling) should provide support for code generation of AnyValue (event/complex types) fields
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 486
- Forks
- 108
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 40
Description
Description
As part of the introduction for the Logs AnyValue and the discussions around support for Complete types Semantic Conventions / Weaver should provide guidance and support on how SIG's should create and optionally namespace the (potentially nested) fields of a complex body or attribute definition.
While the intent of event (complex) fields is to be isolated for usage only within the specific event definition, so that different events / complex types may contain the same "named" field with different meanings, comments, constraints, etc).
So while for some events / types this will mean that this will be generated in only a single location (code base), the Semantic Convention for this does not preclude or infer that their will only ever be a single generator (instrumentation, etc) of these complex fields.
Workarounds
- Hand coding / hard coding any of these names (where necessary)
Considerations
- As not all types / languages will necessarily need this capability so there should be some type of opt-in or specific selection of the needed "type"
- Default helpers / tools should provide guidance on how these should be generated and / or namespaced
Additional Context
This issue is related and highlighted by https://github.com/open-telemetry/semantic-conventions-java/issues/135, which while this specific issue / need is due to the historic definitions, it has highlighted that as more complex types are created this will become more important.
Discussed in the Semantic Conventions Tooling meeting on Jan 15th, 2025.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation files, tests, or entry points are named. Start by reviewing Weaver's Semantic Conventions tooling and the Logs AnyValue and Complete types context; done means defining opt-in guidance and support for generating and optionally namespacing nested complex fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100