-
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
Add support for Event Semantic Conventions #57
Conversation
This is a demo for open-telemetry/build-tools#57. (also needs open-telemetry/build-tools#58)
@open-telemetry/specs-approvers this still needs reviews. |
Maybe @open-telemetry/python-approvers can help review the Python portion and @open-telemetry/specs-logs-approvers can help review the event-related logic? |
The events here were designed for span events. But if something prevents them from being used as logs (other than missing features) that would be good to know. |
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.
LGTM
semantic-conventions/src/tests/data/yaml/errors/events/missing_event.yaml
Outdated
Show resolved
Hide resolved
semantic-conventions/src/tests/data/yaml/errors/events/no_event_type.yaml
Outdated
Show resolved
Hide resolved
Co-authored-by: Aaron Abbott <[email protected]>
Event semantic conventions were designed with span events in mind but should be extendable to log events. See the new tests for how this can be useful to add a YAML definition for the exception semantic conventions in the spec.
This adds two new elements to the YAML definition:
The generator validates that the semantic convention exists and the new data is available to the code templates,
but is not yet used in the markdown output.
It also updates the JSON schema to only allow span_kind and the new events field if the semantic convention type is not specified (defaults to span) or is "span". Unfortunately, we then lose the
"additionalProperties": false
, this seems to be a limitation of the JSON schema language, see https://stackoverflow.com/questions/22689900/json-schema-allof-with-additionalproperties#comment83207554_23001194Full disclosure: This is the last feature for this tool we had developed internally at Dynatrace before (promise! 😄), so I'm starting off by submitting the status quo here in hopes our code bases back in sync (we already use the event semantic convention type internally).