-
Notifications
You must be signed in to change notification settings - Fork 54
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
Proposal: adapting yaml syntax for splitting attribute definition from usage #191
base: main
Are you sure you want to change the base?
Proposal: adapting yaml syntax for splitting attribute definition from usage #191
Conversation
Signed-off-by: Alexander Wert <alexander.wert@elastic.co>
At Dynatrace, we are developing something similar internally. We differentiate between common attribute definitions and specific model definitions (which mostly just reference common fields). One thing we learned along the way:
We solved these issues by allowing models to still define their own attributes, in case they are model-specific. Also, we allow "shared_field" definitions in model domains. Not sure if these learnings apply to OTel in the same way as they did for us. Some of the issues can always be solved by proper prefixing / namespacing all attributes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this proposal!
One question looking at your "usage example:
groups:
- id: registry.http <<- THIS is a namespace, because prefix is not allowed for a semconv anymore
prefix: http
You mentioned the id
is the namespace because prefix is not allowed, but that is a "attribute registry" and not a semconv, was that a typo/mistake?
Because below, when you use it you refer it with the prefix: http
so I'm a bit confused.
@@ -40,10 +40,15 @@ here in `syntax.md` should be considered more authoritative though. Please keep | |||
All attributes are lower case. | |||
|
|||
```ebnf | |||
groups ::= semconv | |||
| semconv groups | |||
groups ::= group |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's group(s)
many times here and it makes me very confused 😅. Not sure what but I think it would be best if we name it differently. Maybe convention
? And also couldn't namespace
be attribute_registry
? Something like:
groups ::= convention
| convention groups
convention::= semconv
| attribute_registry
attribute_registry ::= id brief [note] prefix [stability] [deprecated] attribute_definitions
This is a proposal to get discussions started around step 2 from open-telemetry/semantic-conventions#197 (comment).
proposed model syntax changes summarized:
namespace
that is similar to existingsemconv
but:convtype
,extends
andconstraints
prefix
attribute_definitions
instead ofattributes
attribute_definitions
that is similar to existingattributes
but:id
,type
,brief
andexamples
ref
,requirement_level
semconv
:prefix
(this will be covered in thenamespace
when defining the attributes)attributes
:ref
to anattribute_definition
is allowedThat's how it would look like in YAML files:
The attribute definition:
The attribute usage in semantic conventions: