Skip to content
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 "tracestate" propagation #690

Merged
merged 1 commit into from Dec 17, 2019
Merged

Add "tracestate" propagation #690

merged 1 commit into from Dec 17, 2019

Conversation

axw
Copy link
Member

@axw axw commented Dec 16, 2019

Add the field TraceContext.State, which has the new
type TraceState. TraceState is an opaque type, which
internally contains a list of TraceStateEntry objects.

When starting a transaction with StartTransactionOptions,
the TraceContext.State field will only be considered if
both TraceContext.Trace and TraceContext.State are valid.
If this is true, then the state will be stored on the
transaction, and spans created using the transaction.

Server instrumentation in apmhttp, apmgrpc, and apmot
will extract and parse "tracestate" headers, while client
instrumentation will inject "tracestate" headers.

Add missing docs for ELASTIC_APM_USE_ELASTIC_TRACEPARENT_HEADER.

Closes #503
Closes #685

Add the field TraceContext.State, which has the new
type TraceState. TraceState is an opaque type, which
internally contains a list of TraceStateEntry objects.

When starting a transaction with StartTransactionOptions,
the TraceContext.State field will only be considered if
both TraceContext.Trace and TraceContext.State are valid.
If this is true, then the state will be stored on the
transaction, and spans created using the transaction.

Server instrumentation in apmhttp, apmgrpc, and apmot
will extract and parse "tracestate" headers, while client
instrumentation will inject "tracestate" headers.

Add missing docs for `ELASTIC_APM_USE_ELASTIC_TRACEPARENT_HEADER`.
@axw
Copy link
Member Author

axw commented Dec 17, 2019

jenkins run the tests

@codecov-io
Copy link

codecov-io commented Dec 17, 2019

Codecov Report

Merging #690 into master will increase coverage by 0.15%.
The diff coverage is 93.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #690      +/-   ##
==========================================
+ Coverage   88.18%   88.33%   +0.15%     
==========================================
  Files         125      125              
  Lines        8354     8446      +92     
==========================================
+ Hits         7367     7461      +94     
+ Misses        849      846       -3     
- Partials      138      139       +1
Impacted Files Coverage Δ
module/apmhttp/handler.go 90.07% <100%> (+0.15%) ⬆️
tracecontext.go 100% <100%> (ø) ⬆️
module/apmhttp/traceheaders.go 93.44% <100%> (+2.74%) ⬆️
module/apmgrpc/server.go 97.14% <100%> (+0.04%) ⬆️
transaction.go 96.66% <100%> (+0.05%) ⬆️
module/apmgrpc/client.go 97.61% <100%> (+0.11%) ⬆️
module/apmhttp/client.go 95.4% <100%> (+0.1%) ⬆️
module/apmot/tracer.go 83.78% <56.25%> (-2.76%) ⬇️
model/marshal.go 85.74% <0%> (+1.47%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update daa9b8c...5041722. Read the comment docs.

@axw axw merged commit d3b790a into elastic:master Dec 17, 2019
@axw axw deleted the tracestate branch December 17, 2019 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document ELASTIC_APM_USE_ELASTIC_TRACEPARENT_HEADER config Implement full support for Trace-Context
2 participants