Skip to content

Commit

Permalink
Additional feature tag for adaptive sampling (#3648)
Browse files Browse the repository at this point in the history
  • Loading branch information
bm1549 authored Dec 17, 2024
1 parent 9d9a42c commit 44bb4c5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/parametric/test_dynamic_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ def reverse_case(s):
@rfc("https://docs.google.com/document/d/1SVD0zbbAAXIsobbvvfAEXipEUO99R9RMsosftfe9jx0")
@scenarios.parametric
@features.dynamic_configuration
@features.adaptive_sampling
class TestDynamicConfigV1:
"""Tests covering the v1 release of the dynamic configuration feature.
Expand Down Expand Up @@ -338,6 +339,7 @@ def test_log_injection_enabled(self, library_env, test_agent, test_library):
@rfc("https://docs.google.com/document/d/1SVD0zbbAAXIsobbvvfAEXipEUO99R9RMsosftfe9jx0")
@scenarios.parametric
@features.dynamic_configuration
@features.adaptive_sampling
class TestDynamicConfigV1_ServiceTargets:
"""Tests covering the Service Target matching of the dynamic configuration feature.
Expand Down Expand Up @@ -418,6 +420,7 @@ def test_match_service_target_case_insensitively(self, library_env, test_agent,
@rfc("https://docs.google.com/document/d/1V4ZBsTsRPv8pAVG5WCmONvl33Hy3gWdsulkYsE4UZgU/edit")
@scenarios.parametric
@features.dynamic_configuration
@features.adaptive_sampling
class TestDynamicConfigV2:
@parametrize("library_env", [{**DEFAULT_ENVVARS}, {**DEFAULT_ENVVARS, "DD_TAGS": "key1:val1,key2:val2"}])
def test_tracing_client_tracing_tags(self, library_env, test_agent, test_library):
Expand Down Expand Up @@ -476,6 +479,7 @@ def test_capability_tracing_custom_tags(self, library_env, test_agent, test_libr

@scenarios.parametric
@features.dynamic_configuration
@features.adaptive_sampling
class TestDynamicConfigSamplingRules:
@parametrize("library_env", [{**DEFAULT_ENVVARS}])
def test_capability_tracing_sample_rules(self, library_env, test_agent, test_library):
Expand Down
7 changes: 7 additions & 0 deletions tests/parametric/test_trace_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@


@features.trace_sampling
@features.adaptive_sampling
@scenarios.parametric
@rfc("https://docs.google.com/document/d/1HRbi1DrBjL_KGeONrPgH7lblgqSLGlV5Ox1p4RL97xM/")
class Test_Trace_Sampling_Basic:
Expand Down Expand Up @@ -102,6 +103,7 @@ def test_trace_kept_in_spite_trace_sampling_rule(self, test_agent, test_library)


@features.trace_sampling
@features.adaptive_sampling
@scenarios.parametric
@rfc("https://docs.google.com/document/d/1S9pufnJjrsxH6pRbpigdYFwA5JjSdZ6iLZ-9E7PoAic/")
class Test_Trace_Sampling_Globs:
Expand Down Expand Up @@ -167,6 +169,7 @@ def test_trace_dropped_by_trace_sampling_rule(self, test_agent, test_library):


@features.trace_sampling
@features.adaptive_sampling
@scenarios.parametric
@rfc("https://docs.google.com/document/d/1S9pufnJjrsxH6pRbpigdYFwA5JjSdZ6iLZ-9E7PoAic/")
class Test_Trace_Sampling_Globs_Feb2024_Revision:
Expand Down Expand Up @@ -212,6 +215,7 @@ def test_trace_sampled_by_trace_sampling_rule_insensitive_glob_match(self, test_


@features.trace_sampling
@features.adaptive_sampling
@scenarios.parametric
@rfc("https://docs.google.com/document/d/1S9pufnJjrsxH6pRbpigdYFwA5JjSdZ6iLZ-9E7PoAic/")
class Test_Trace_Sampling_Resource:
Expand Down Expand Up @@ -315,6 +319,7 @@ def test_trace_dropped_by_trace_sampling_rule(self, test_agent, test_library):


@features.trace_sampling
@features.adaptive_sampling
@scenarios.parametric
@rfc("https://docs.google.com/document/d/1S9pufnJjrsxH6pRbpigdYFwA5JjSdZ6iLZ-9E7PoAic/")
class Test_Trace_Sampling_Tags:
Expand Down Expand Up @@ -418,6 +423,7 @@ def tag_sampling_env(tag_glob_pattern):
@scenarios.parametric
@rfc("https://docs.google.com/document/d/1S9pufnJjrsxH6pRbpigdYFwA5JjSdZ6iLZ-9E7PoAic/")
@features.trace_sampling
@features.adaptive_sampling
class Test_Trace_Sampling_Tags_Feb2024_Revision:
def assert_matching_span(self, test_agent, trace_id, span_id, **kwargs):
matching_span = find_span_in_traces(test_agent.wait_for_num_traces(1), trace_id, span_id)
Expand Down Expand Up @@ -540,6 +546,7 @@ def test_metric_mismatch_non_integer(self, test_agent, test_library):
@scenarios.parametric
@rfc("https://docs.google.com/document/d/1S9pufnJjrsxH6pRbpigdYFwA5JjSdZ6iLZ-9E7PoAic/")
@features.trace_sampling
@features.adaptive_sampling
class Test_Trace_Sampling_With_W3C:
@pytest.mark.parametrize(
"library_env",
Expand Down
9 changes: 9 additions & 0 deletions utils/_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -2265,3 +2265,12 @@ def djm_ssi_k8s(test_object):
"""
pytest.mark.features(feature_id=342)(test_object)
return test_object

@staticmethod
def adaptive_sampling(test_object):
"""Adaptive sampling rules + RC
https://feature-parity.us1.prod.dog/#/?feature=346
"""
pytest.mark.features(feature_id=346)(test_object)
return test_object

0 comments on commit 44bb4c5

Please sign in to comment.