8000 feat: ddtrace py now sets a default sample rate header, so we don't f… by astuyve · Pull Request #428 · DataDog/datadog-lambda-python · GitHub
[go: up one dir, main page]

Skip to content
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
0