diff --git a/aws-opentelemetry-distro/src/amazon/opentelemetry/distro/aws_opentelemetry_configurator.py b/aws-opentelemetry-distro/src/amazon/opentelemetry/distro/aws_opentelemetry_configurator.py index 000732c46..785209a73 100644 --- a/aws-opentelemetry-distro/src/amazon/opentelemetry/distro/aws_opentelemetry_configurator.py +++ b/aws-opentelemetry-distro/src/amazon/opentelemetry/distro/aws_opentelemetry_configurator.py @@ -20,8 +20,8 @@ from amazon.opentelemetry.distro.aws_metric_attributes_span_exporter_builder import ( AwsMetricAttributesSpanExporterBuilder, ) +from amazon.opentelemetry.distro.aws_span_exporter.otlp_aws_span_exporter import OTLPAwsSpanExporter from amazon.opentelemetry.distro.aws_span_metrics_processor_builder import AwsSpanMetricsProcessorBuilder -from amazon.opentelemetry.distro.otlp_aws_span_exporter import OTLPAwsSpanExporter from amazon.opentelemetry.distro.otlp_udp_exporter import OTLPUdpSpanExporter from amazon.opentelemetry.distro.sampler.aws_xray_remote_sampler import AwsXRayRemoteSampler from amazon.opentelemetry.distro.scope_based_exporter import ScopeBasedPeriodicExportingMetricReader diff --git a/aws-opentelemetry-distro/src/amazon/opentelemetry/distro/aws_span_exporter/README.md b/aws-opentelemetry-distro/src/amazon/opentelemetry/distro/aws_span_exporter/README.md new file mode 100644 index 000000000..b14213399 --- /dev/null +++ b/aws-opentelemetry-distro/src/amazon/opentelemetry/distro/aws_span_exporter/README.md @@ -0,0 +1,28 @@ +# ADOT X-Ray OTLP Trace Export Configuration + +This guide explains how to automatically configure ADOT environment variables for exporting traces to [AWS X-Ray OTLP endpoint](https://docs.aws.amazon.com/xray/latest/devguide/xray-opentelemetry.html) + +## Prerequisites + +1. Transaction Search must be enabled in order to send spans to the Xray OTLP endpoint. See [this doc](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Transaction-Search-getting-started.html) on how to enable Transaction Search. + +2. Ensure the AWS role in your application environment has [AWSXRayWriteOnlyAccess](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSXrayWriteOnlyAccess.html) managed policy attached. + +## Environment Variables + +Set the following environment variables to **PROPERLY** configure trace export with SigV4 authentication: + +```shell +# Set X-Ray endpoint (replace AWS_REGION with your region) +OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://xray..amazonaws.com/v1/traces + +# Configure OTLP export protocol +OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf + +OTEL_TRACES_EXPORTER=otlp +OTEL_METRICS_EXPORTER=none +OTEL_LOGS_EXPORTER=none +OTEL_RESOURCE_ATTRIBUTES="service.name=" + +# Disable application signals (they will be generated in CloudWatch backend) +OTEL_AWS_APPLICATION_SIGNALS_ENABLED=false \ No newline at end of file diff --git a/aws-opentelemetry-distro/src/amazon/opentelemetry/distro/otlp_aws_span_exporter.py b/aws-opentelemetry-distro/src/amazon/opentelemetry/distro/aws_span_exporter/otlp_aws_span_exporter.py similarity index 100% rename from aws-opentelemetry-distro/src/amazon/opentelemetry/distro/otlp_aws_span_exporter.py rename to aws-opentelemetry-distro/src/amazon/opentelemetry/distro/aws_span_exporter/otlp_aws_span_exporter.py