-
Notifications
You must be signed in to change notification settings - Fork 324
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
[o11y] Add traceId to user trace #3209
base: main
Are you sure you want to change the base?
Conversation
This will be used to better export user tracing spans in a follow-up PR.
@@ -92,6 +92,9 @@ class TraceId final { | |||
// Replicates W3C Serialization | |||
kj::String toW3C() const; | |||
|
|||
// Return network order hex representation | |||
kj::String toNEHex() const; |
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.
Nit: While it's more verbose, I prefer avoiding the abbreviation here. s/toNEHex/toNetworkOrderHex
@@ -609,6 +616,7 @@ class WorkerTracer final: public kj::Refcounted, public BaseTracer { | |||
|
|||
void addLog(kj::Date timestamp, LogLevel logLevel, kj::String message) override; | |||
void addSpan(CompleteSpan&& span) override; | |||
void setTraceId(tracing::TraceId traceId); |
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.
Nit: const tracing::TraceId&
to prevent the extra copy? I know it's a small class but still. Could also get by with having the trace->traceId = traceId
in the impl be a trace->traceId = kj::mv(traceId)
598986f
to
956a297
Compare
Builds on #3180. Also see the corresponding upstream PR.