Support x-datadog-origin header (Synthetics support)#615
Merged
Conversation
This will also enable Synthetics support
SammyK
force-pushed
the
sammyk/synthetics-origin-support
branch
from
October 15, 2019 15:07
99850dd to
ceede17
Compare
SammyK
marked this pull request as ready for review
October 15, 2019 15:08
|
|
||
| $spanContext = new SpanContext($traceId, $spanId, null, $baggageItems, true); | ||
| $this->extractPrioritySampling($spanContext, $carrier); | ||
| $this->extractOrigin($spanContext, $carrier); |
Member
There was a problem hiding this comment.
extracting the origin is only valid if we were able to successfully extract a trace id.
Contributor
Author
There was a problem hiding this comment.
Thanks for clarifying! This line only gets run in this case as on line 67-69 there is a null-check on the trace ID. :)
labbati
approved these changes
Oct 16, 2019
labbati
left a comment
Member
There was a problem hiding this comment.
Looks good to me. Great Sammy
brettlangdon
approved these changes
Oct 16, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
TL;DR This will enable Synthetics support with the PHP tracer.
This PR will check for a distributed trace origin via the
x-datadog-originHTTP header. If it exists, the top-level span metadata is appended with_dd.originwhich is set to the value of thex-datadog-originHTTP header. The value is also propagated to other traces via the same HTTP header.Readiness checklist
Reviewer checklist