Skip to content

Commit

Permalink
Merge branch 'main' into mtoff/query-string-consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
mtoffl01 authored Sep 17, 2024
2 parents 40fb6fa + 6b76258 commit 21c9593
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 0 deletions.
2 changes: 2 additions & 0 deletions manifests/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ tests/:
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Configured: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Empty: missing_feature
Test_Config_UnifiedServiceTagging_CustomService: missing_feature
Test_Config_UnifiedServiceTagging_Default: missing_feature
test_distributed.py:
Test_DistributedHttp: missing_feature
test_identify.py: irrelevant
Expand Down
2 changes: 2 additions & 0 deletions manifests/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,8 @@ tests/:
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Configured: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Empty: missing_feature
Test_Config_UnifiedServiceTagging_CustomService: missing_feature
Test_Config_UnifiedServiceTagging_Default: missing_feature
test_data_integrity.py:
Test_LibraryHeaders: v2.46.0
test_distributed.py:
Expand Down
2 changes: 2 additions & 0 deletions manifests/golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,8 @@ tests/:
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Configured: v1.67.0
Test_Config_ObfuscationQueryStringRegexp_Empty: v1.67.0
Test_Config_UnifiedServiceTagging_CustomService: missing_feature
Test_Config_UnifiedServiceTagging_Default: missing_feature
test_data_integrity.py:
Test_LibraryHeaders: v1.60.0.dev0
test_distributed.py:
Expand Down
2 changes: 2 additions & 0 deletions manifests/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1241,6 +1241,8 @@ tests/:
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Configured: v1.39.0
Test_Config_ObfuscationQueryStringRegexp_Empty: v1.39.0
Test_Config_UnifiedServiceTagging_CustomService: missing_feature
Test_Config_UnifiedServiceTagging_Default: missing_feature
test_data_integrity.py:
Test_LibraryHeaders: v1.29.0
test_distributed.py:
Expand Down
2 changes: 2 additions & 0 deletions manifests/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,8 @@ tests/:
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Configured: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Empty: missing_feature
Test_Config_UnifiedServiceTagging_CustomService: missing_feature
Test_Config_UnifiedServiceTagging_Default: missing_feature
test_distributed.py:
Test_DistributedHttp: missing_feature
test_identify.py:
Expand Down
2 changes: 2 additions & 0 deletions manifests/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ tests/:
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Configured: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Empty: missing_feature
Test_Config_UnifiedServiceTagging_CustomService: missing_feature
Test_Config_UnifiedServiceTagging_Default: missing_feature
test_distributed.py:
Test_DistributedHttp: missing_feature
test_identify.py:
Expand Down
2 changes: 2 additions & 0 deletions manifests/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,8 @@ tests/:
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Configured: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Empty: missing_feature
Test_Config_UnifiedServiceTagging_CustomService: missing_feature
Test_Config_UnifiedServiceTagging_Default: missing_feature
test_data_integrity.py:
Test_LibraryHeaders: v2.7.0
test_distributed.py:
Expand Down
2 changes: 2 additions & 0 deletions manifests/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@ tests/:
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Configured: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Empty: missing_feature
Test_Config_UnifiedServiceTagging_CustomService: missing_feature
Test_Config_UnifiedServiceTagging_Default: missing_feature
test_distributed.py:
Test_DistributedHttp: missing_feature
test_identify.py:
Expand Down
32 changes: 32 additions & 0 deletions tests/test_config_consistency.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,35 @@ def _get_span_by_tags(trace, tags):
break
else:
return span


@scenarios.tracing_config_nondefault
@features.tracing_configuration_consistency
class Test_Config_UnifiedServiceTagging_CustomService:
""" Verify behavior of http clients and distributed traces """

def setup_specified_service_name(self):
self.r = weblog.get("/")

def test_specified_service_name(self):
interfaces.library.assert_trace_exists(self.r)
spans = interfaces.agent.get_spans_list(self.r)
assert len(spans) == 1, "Agent received the incorrect amount of spans"
assert spans[0]["service"] == "service_test"


@scenarios.default
@features.tracing_configuration_consistency
class Test_Config_UnifiedServiceTagging_Default:
""" Verify behavior of http clients and distributed traces """

def setup_default_service_name(self):
self.r = weblog.get("/")

def test_default_service_name(self):
interfaces.library.assert_trace_exists(self.r)
spans = interfaces.agent.get_spans_list(self.r)
assert len(spans) == 1, "Agent received the incorrect amount of spans"
assert (
spans[0]["service"] != "service_test"
) # in default scenario, DD_SERVICE is set to "weblog" in the dockerfile; this is a temp fix to test that it is not the value we manually set in the specific scenario
1 change: 1 addition & 0 deletions utils/_context/_scenarios/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ def all_endtoend_scenarios(test_object):
weblog_env={
"DD_TRACE_HTTP_SERVER_ERROR_STATUSES": "200-201,202",
"DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP": "ssn=\d{3}-\d{2}-\d{4}",
"DD_SERVICE": "service_test",
},
doc="",
scenario_groups=[ScenarioGroup.ESSENTIALS],
Expand Down

0 comments on commit 21c9593

Please sign in to comment.