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

apm: allow specifying transaction/span ID #463

Merged
merged 2 commits into from
Mar 5, 2019
Merged

Conversation

axw
Copy link
Member

@axw axw commented Mar 5, 2019

Add TransactionOptions.TransactionID and SpanOptions.SpanID
to enable callers to specify transaction and span IDs. If those fields
are valid/non-zero, they will be used; otherwise random values will
be generated as usual.

Closes #460
Closes #461

axw added 2 commits March 5, 2019 13:20
Add TransactionOptions.TransactionID and SpanOptions.SpanID
to enable callers to specify transaction and span IDs. If
those fields are valid/non-zero, they will be used; otherwise
random values will be generated as usual.
Update ParseTraceparentHeader to validate the
parsed trace and span IDs, ensuring that the
returned TraceContext is valid if no error is
returned.

This is necessary to handle the case where a
traceparent header is received containing a
valid trace ID and an invalid span ID, which
should cause a new trace to be started.
@codecov-io
Copy link

codecov-io commented Mar 5, 2019

Codecov Report

Merging #463 into master will decrease coverage by 0.03%.
The diff coverage is 64%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #463      +/-   ##
==========================================
- Coverage   84.05%   84.01%   -0.04%     
==========================================
  Files         108      108              
  Lines        6590     6608      +18     
==========================================
+ Hits         5539     5552      +13     
- Misses        763      765       +2     
- Partials      288      291       +3
Impacted Files Coverage Δ
module/apmhttp/traceheaders.go 90.69% <0%> (-9.31%) ⬇️
transaction.go 91.37% <100%> (+0.63%) ⬆️
span.go 85% <44.44%> (-1.57%) ⬇️
tracer.go 86.41% <0%> (+0.41%) ⬆️

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 12be20c...775e945. Read the comment docs.

@axw axw merged commit d21880b into elastic:master Mar 5, 2019
@axw axw deleted the external-ids branch March 5, 2019 06:18
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.

2 participants