Skip to content

feat: ddtrace py now sets a default sample rate header, so we don't f… #428

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

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions tests/test_tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,17 +184,14 @@ def test_with_non_object_event(self):
{},
)

"""
TODO(astuyve) I don't think partial extraction is forbidden anymore? ask rey
@with_trace_propagation_style("datadog")
def test_with_incomplete_datadog_trace_headers(self):
lambda_ctx = get_mock_context()
ctx, source, event_source = extract_dd_trace_context(
{"headers": {TraceHeader.TRACE_ID: "123", TraceHeader.PARENT_ID: "321"}},
{"headers": {TraceHeader.TRACE_ID: "123"}},
lambda_ctx,
)
self.assertEqual(source, "xray")
print(ctx)
self.assertEqual(
ctx,
Context(
Expand All @@ -211,7 +208,6 @@ def test_with_incomplete_datadog_trace_headers(self):
TraceHeader.SAMPLING_PRIORITY: "2",
},
)
"""

@with_trace_propagation_style("datadog")
def test_with_complete_datadog_trace_headers(self):
Expand Down Expand Up @@ -532,7 +528,6 @@ def test_with_legacy_client_context_w3c_trace_data(self):
"_dd.parent_id": "0000000000000000",
},
)
print(ctx)
self.assertEqual(ctx, expected_context)
self.assertDictEqual(
get_dd_trace_context(),
Expand Down