-
Notifications
You must be signed in to change notification settings - Fork 845
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
Rework log fields #3837
Rework log fields #3837
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3837 +/- ##
============================================
+ Coverage 89.33% 89.38% +0.04%
- Complexity 4092 4098 +6
============================================
Files 488 489 +1
Lines 12630 12629 -1
Branches 1229 1231 +2
============================================
+ Hits 11283 11288 +5
+ Misses 926 923 -3
+ Partials 421 418 -3
Continue to review full report at Codecov.
|
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.
Looks much nicer thanks!
Solves several of the issues in #3804. Replaces #3811.
This PR includes a couple of changes to log fields, based on conversations in the 11/4 SIG:
setTraceId(..)
,setSpanId(..)
, andsetFlags(..)
are replaced withsetContext(Context)
getTraceId()
,getSpanId()
andgetFlags()
are replaced withSpanContext getSpanContext()
setAttributes(..)
now replaces attributes instead of merging them. This is less surprising.setBody(Body)
is removed. OnlysetBody(String)
is currently supported. On the read sideBody getBody()
still returns aBody
.SpanContext getSpanContext()
returnsSpanContext.getInvalid()
if unset.Severity getSeverity()
returnsSeverity#UNDEFINED_SEVERITY_NUMBER
if unset.String getSeverityText()
is nullable and returns null if unset.String getName()
is nullable and returns null if unset.Body getBody()
returnsBody#emptyBody()
if unset.Attributes getAttributes()
returnsAttributes#empty()
if unset.