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

Fix parent source as being set as Xray, when trace merging disabled #60

Merged
merged 2 commits into from
May 14, 2020

Conversation

DarcyRaynerDD
Copy link
Contributor

@DarcyRaynerDD DarcyRaynerDD commented May 14, 2020

What does this PR do?

Currently, the layer will set a metadata field on the root dd-trace span called '_dd.parent_source' to 'xray' even when x-ray merging is disabled. That field is used by the trace forwarder to filter out spans, to reduce duplication between x-ray and dd-trace traces. This PR fixes that issue, so that when x-ray trace merging is disabled, the field remains unset, and the root span is never filtered out.

Motivation

What inspired you to submit this pull request?

Testing Guidelines

How did you test this pull request?

Additional Notes

Anything else we should know when reviewing?

Checklist

  • Member of the Datadog team has run integration tests and updated snapshots if necessary

@DarcyRaynerDD DarcyRaynerDD requested a review from a team as a code owner May 14, 2020 14:42
@@ -234,7 +234,7 @@ def set_dd_trace_py_root(trace_context, merge_xray_traces):


def create_function_execution_span(
context, function_name, is_cold_start, trace_context
context, function_name, is_cold_start, trace_context, merge_xray_traces
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you need to change the signature where this method is called as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, good catch. Looks like I had a file I didn't stage into the commit. Should be updated

@DarcyRaynerDD DarcyRaynerDD merged commit 9999a37 into master May 14, 2020
@DarcyRaynerDD DarcyRaynerDD deleted the darcy.rayner/fix-tracing-edge-case branch May 14, 2020 18:25
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.

None yet

2 participants