-
Notifications
You must be signed in to change notification settings - Fork 850
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
Refactor Event API to reflect spec changes #6001
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #6001 +/- ##
============================================
+ Coverage 91.18% 91.20% +0.02%
- Complexity 5613 5620 +7
============================================
Files 616 618 +2
Lines 16566 16579 +13
Branches 1642 1643 +1
============================================
+ Hits 15105 15121 +16
+ Misses 1013 1008 -5
- Partials 448 450 +2 ☔ View full report in Codecov by Sentry. |
Marking ready for review as the spec PRs this embodies have been merged. |
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.
This looks good. I asked about an overload, but we can always add them later. 👍🏻
Converted to a draft again because the event sig is actively working out details this PR changes and I want to wait for those discussions to resolve to reduce churn. |
Closing for the time being until details get hashed out by the event SIG. |
Reflects changes in open-telemetry/opentelemetry-specification#3772 and open-telemetry/opentelemetry-specification#3749.
Summary of changes:
AnyValue
type and maps to the log record body. The payload argument is optional, reflecting the fact that some events will only have a event.name.EventBuilder#setContext
method for optionally overriding the default current context.SeverityNumber
argument, which defaults toINFO=9
. This can be used to sample / filter events according to priority.EventBuilder#setAttributes
method for optionally setting the event attributes. The event payload is expected to be well defined, and the attributes can be used to specify additional information about the context of what occurred.