Skip to content

Commit a507fe5

Browse files
committed
fix test
1 parent 7bf9280 commit a507fe5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

aws-opentelemetry-distro/tests/amazon/opentelemetry/distro/exporter/aws/metrics/test_base_emf_exporter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,14 +308,14 @@ def test_has_dimension_case_insensitive(self):
308308
# Empty list
309309
self.assertFalse(self.exporter._has_dimension_case_insensitive([], "Service"))
310310

311+
@patch.dict(os.environ, {"OTEL_METRICS_ADD_APPLICATION_SIGNALS_DIMENSIONS": "false"})
311312
def test_add_application_signals_dimensions_disabled(self):
312313
"""Test that dimensions are not added when feature is disabled."""
313-
# Default exporter has feature disabled
314314
dimension_names = ["operation"]
315315
emf_log = {}
316-
resource = Resource.create({"service.name": "my-service", "deployment.environment": "production"})
316+
resource_attributes = {"service.name": "my-service", "deployment.environment": "production"}
317317

318-
self.exporter._add_application_signals_dimensions(dimension_names, emf_log, resource)
318+
self.exporter._add_application_signals_dimensions(dimension_names, emf_log, resource_attributes)
319319

320320
# Dimensions should not be added
321321
self.assertEqual(dimension_names, ["operation"])

0 commit comments

Comments
 (0)