Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semconv schema: formalize registry definition #1269

Open
lmolkova opened this issue Jul 22, 2024 · 1 comment
Open

Semconv schema: formalize registry definition #1269

lmolkova opened this issue Jul 22, 2024 · 1 comment
Labels
schema Semantic Conventions schema definition tooling Regarding build, workflows, build-tools, ...

Comments

@lmolkova
Copy link
Contributor

Today we require all attribute definitions to happen in the registry, i.e. :

  • attribute definitions should be in /model/registry
  • the group id must start with registry.

We should consider having a more formal way to mark a group as one defining something.
E.g.

groups:
- id: foo.bar
  type: attribute_registry <-------- this is new

or

groups:
- id: new-guid
  type: metric_registry <-------- this is new

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 and ref cannot appear there).

@lmolkova
Copy link
Contributor Author

It's a good question if we can reuse existing types (attribute_group, metric, etc) and I believe the answer is no:

  • we use 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.
    - id: metric_attributes.http.server
  • we have precedents when existing metrics are referenced with caveats (such as specific error.type and notes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
schema Semantic Conventions schema definition tooling Regarding build, workflows, build-tools, ...
Projects
Status: Improve YAML Schema
Development

No branches or pull requests

2 participants