Skip to content

Commit 384b62f

Browse files
authored
Rename SMP config to AppSignals (#59)
We are renaming the SMP configs: `OTEL_SMP_ENABLED` -> `OTEL_AWS_APP_SIGNALS_ENABLED` `OTEL_AWS_SMP_EXPORTER_ENDPOINT` -> `OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT` Related PRs: aws-observability/aws-otel-java-instrumentation#744 aws/amazon-cloudwatch-agent-operator#84 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
2 parents ade69eb + d7ebda2 commit 384b62f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

aws-opentelemetry-distro/src/amazon/opentelemetry/distro/aws_opentelemetry_configurator.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
from opentelemetry.semconv.resource import ResourceAttributes
4949
from opentelemetry.trace import set_tracer_provider
5050

51-
OTEL_SMP_ENABLED = "OTEL_SMP_ENABLED"
51+
OTEL_AWS_APP_SIGNALS_ENABLED = "OTEL_AWS_APP_SIGNALS_ENABLED"
5252
OTEL_METRIC_EXPORT_INTERVAL = "OTEL_METRIC_EXPORT_INTERVAL"
53-
OTEL_AWS_SMP_EXPORTER_ENDPOINT = "OTEL_AWS_SMP_EXPORTER_ENDPOINT"
53+
OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT = "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT"
5454
DEFAULT_METRIC_EXPORT_INTERVAL = 60000.0
5555

5656
_logger: Logger = getLogger(__name__)
@@ -65,7 +65,7 @@ class AwsOpenTelemetryConfigurator(_OTelSDKConfigurator):
6565
- Add AttributePropagatingSpanProcessor to propagate span attributes from parent to child spans.
6666
- Add AwsMetricAttributesSpanExporter to add more attributes to all spans.
6767
68-
You can control when these customizations are applied using the environment variable OTEL_SMP_ENABLED.
68+
You can control when these customizations are applied using the environment variable OTEL_AWS_APP_SIGNALS_ENABLED.
6969
This flag is disabled by default.
7070
"""
7171

@@ -169,7 +169,7 @@ def _customize_span_processors(provider: TracerProvider, resource: Resource) ->
169169
]:
170170
temporality_dict[typ] = AggregationTemporality.DELTA
171171
_logger.info("Span Metrics Processor enabled")
172-
smp_endpoint = os.environ.get(OTEL_AWS_SMP_EXPORTER_ENDPOINT, "http://cloudwatch-agent.amazon-cloudwatch:4317")
172+
smp_endpoint = os.environ.get(OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT, "http://localhost:4315")
173173
otel_metric_exporter = OTLPMetricExporter(endpoint=smp_endpoint, preferred_temporality=temporality_dict)
174174
export_interval_millis = float(os.environ.get(OTEL_METRIC_EXPORT_INTERVAL, DEFAULT_METRIC_EXPORT_INTERVAL))
175175
_logger.debug("Span Metrics endpoint: %s", smp_endpoint)
@@ -189,4 +189,4 @@ def _customize_span_processors(provider: TracerProvider, resource: Resource) ->
189189

190190

191191
def is_smp_enabled():
192-
return os.environ.get(OTEL_SMP_ENABLED, False)
192+
return os.environ.get(OTEL_AWS_APP_SIGNALS_ENABLED, False)

contract-tests/tests/test/amazon/base/contract_test_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ def setUp(self) -> None:
8383
DockerContainer(self.get_application_image_name())
8484
.with_exposed_ports(self.get_application_port())
8585
.with_env("OTEL_METRIC_EXPORT_INTERVAL", "100")
86-
.with_env("OTEL_SMP_ENABLED", "true")
86+
.with_env("OTEL_AWS_APP_SIGNALS_ENABLED", "true")
8787
.with_env("OTEL_METRICS_EXPORTER", "none")
8888
.with_env("OTEL_BSP_SCHEDULE_DELAY", "1")
89-
.with_env("OTEL_AWS_SMP_EXPORTER_ENDPOINT", f"http://collector:{_MOCK_COLLECTOR_PORT}")
89+
.with_env("OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT", f"http://collector:{_MOCK_COLLECTOR_PORT}")
9090
.with_env("OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", f"http://collector:{_MOCK_COLLECTOR_PORT}")
9191
.with_env("OTEL_RESOURCE_ATTRIBUTES", self.get_application_otel_resource_attributes())
9292
.with_env("OTEL_TRACES_SAMPLER", "always_on")

0 commit comments

Comments
 (0)