Open lmolkova opened 1 month ago
It's a good question if we can reuse existing types (attribute_group
, metric
, etc) and I believe the answer is no:
attribute_group
a lot to define a common group of ref attributes that are reused between multiple spans or metrics. This helps to avoid writing repetitive notes and similar for different http/messaging/etc metrics. E.g. https://github.com/open-telemetry/semantic-conventions/blob/21b8f4620d2029fe8abb98a4a06655da3232d11d/model/metrics/http.yaml#L2error.type
and notes)
Today we require all attribute definitions to happen in the registry, i.e. :
/model/registry
registry.
We should consider having a more formal way to mark a group as one defining something. E.g.
or
This would simplify filtering/massaging semconv in code-generation, we'd avoid relying on specific group naming. This would move post-factum policies enforcing attribute definitions into schema validation (
id
can only appear on*_registry
groups andref
cannot appear there).