Skip to content

Semantic Conventions should provide support for code generation of AnyValue (event/complex types) fields #1748

@MSNev

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 open-telemetry/semantic-conventions-java#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.

Metadata

Assignees

No one assigned

    Labels

    toolingRegarding build, workflows, build-tools, ...

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions