-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Khanayan123/add consistent config system tests (#3745)
Co-authored-by: Charles de Beauchesne <[email protected]> Co-authored-by: Mikayla Toffler <[email protected]>
- Loading branch information
1 parent
63d1b6d
commit 56e10a4
Showing
22 changed files
with
539 additions
and
34 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -193,7 +193,7 @@ def test_datadog_128_bit_generation_enabled(self, test_agent, test_library): | |
|
||
@missing_feature(context.library == "golang", reason="not implemented") | ||
@missing_feature(context.library < "[email protected]", reason="Implemented in 1.24.0") | ||
@missing_feature(context.library == "nodejs", reason="not implemented") | ||
@missing_feature(context.library < "nodejs@4.19.0", reason="Implemented in 4.19.0 & 3.40.0") | ||
@missing_feature(context.library == "ruby", reason="not implemented") | ||
@pytest.mark.parametrize("library_env", [{"DD_TRACE_PROPAGATION_STYLE": "Datadog"}]) | ||
def test_datadog_128_bit_generation_enabled_by_default(self, test_agent, test_library): | ||
|
@@ -383,6 +383,7 @@ def test_w3c_128_bit_propagation(self, test_agent, test_library): | |
assert dd_p_tid == "640cfd8d00000000" | ||
check_128_bit_trace_id(fields[1], trace_id, dd_p_tid) | ||
|
||
@missing_feature(context.library < "[email protected]", reason="implemented in 5.7.0 & 4.31.0") | ||
@missing_feature(context.library == "ruby", reason="not implemented") | ||
@pytest.mark.parametrize( | ||
"library_env", | ||
|
@@ -409,8 +410,6 @@ def test_w3c_128_bit_propagation_tid_consistent(self, test_agent, test_library): | |
assert propagation_error is None | ||
|
||
@missing_feature(context.library == "ruby", reason="not implemented") | ||
@missing_feature(context.library == "nodejs", reason="not implemented") | ||
@missing_feature(context.library == "java", reason="not implemented") | ||
@pytest.mark.parametrize( | ||
"library_env", | ||
[{"DD_TRACE_PROPAGATION_STYLE": "tracecontext", "DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED": "true"}], | ||
|
@@ -422,6 +421,26 @@ def test_w3c_128_bit_propagation_tid_in_chunk_root(self, test_agent, test_librar | |
with test_library.dd_start_span(name="child", service="service", parent_id=parent.span_id) as child: | ||
pass | ||
|
||
traces = test_agent.wait_for_num_traces(1, clear=True, sort_by_start=False) | ||
trace = find_trace(traces, parent.trace_id) | ||
assert len(trace) == 2 | ||
first_span = find_first_span_in_trace_payload(trace) | ||
tid_chunk_root = first_span["meta"].get("_dd.p.tid") | ||
assert tid_chunk_root is not None | ||
|
||
@missing_feature(context.library == "ruby", reason="not implemented") | ||
@missing_feature(context.library == "java", reason="not implemented") | ||
@pytest.mark.parametrize( | ||
"library_env", | ||
[{"DD_TRACE_PROPAGATION_STYLE": "tracecontext", "DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED": "true"}], | ||
) | ||
def test_w3c_128_bit_propagation_tid_only_in_chunk_root(self, test_agent, test_library): | ||
"""Ensure that only root span contains the tid.""" | ||
with test_library: | ||
with test_library.dd_start_span(name="parent", service="service", resource="resource") as parent: | ||
with test_library.dd_start_span(name="child", service="service", parent_id=parent.span_id) as child: | ||
pass | ||
|
||
traces = test_agent.wait_for_num_traces(1, clear=True, sort_by_start=False) | ||
trace = find_trace(traces, parent.trace_id) | ||
assert len(trace) == 2 | ||
|
This file contains 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
Oops, something went wrong.