-
Notifications
You must be signed in to change notification settings - Fork 98
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
chore: 4.0.0 release proposal #1043
Conversation
BREAKING CHANGE: This change modifies/removes APIs that assume a particular format for trace context headers; in other words, any place where the user would deal with a stringified trace context, they would now deal with a TraceContext object instead. This affects three APIs: `getResponseTraceContext` (input/output has changed from string to TraceContext), `createRootSpan` (input RootSpanOptions now accepts a TraceContext instead of a string in the traceContext field), and `Span#getTraceContext` (output has changed from string to TraceContext).
Codecov Report
@@ Coverage Diff @@
## master #1043 +/- ##
=======================================
Coverage 94.85% 94.85%
=======================================
Files 96 96
Lines 6311 6311
Branches 496 496
=======================================
Hits 5986 5986
Misses 166 166
Partials 159 159 Continue to review full report at Codecov.
|
We are using hapi's // Add tracing header for Google Cloud Traces
- const traceContext = TraceApi.getResponseTraceContext(request.headers[TraceApi.constants.TRACE_CONTEXT_HEADER_NAME]);
+ const traceContext = TraceApi.propagation.extract((key) => request.headers[key]);
if (traceContext) {
- inject.headers[TraceApi.constants.TRACE_CONTEXT_HEADER_NAME] = traceContext;
+ TraceApi.propagation.inject((key, value) => {
+
+ inject.headers[key] = value;
+ }, traceContext);
}
Also I think this document needs to be updated to reflect the new api: https://github.com/googleapis/cloud-trace-nodejs/blob/master/doc/trace-api.md#for-incoming-requests |
@AdriVanHoudt Yes, that should be correct. And thanks for pointing out the doc that needs to be changed, I'll go ahead and do that. |
Awesome, thanks for checking |
Release Notes