File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
awsagentprovider/src/main/java/software/amazon/opentelemetry/javaagent/providers Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 3636import software .amazon .awssdk .http .auth .spi .signer .SignedRequest ;
3737
3838/**
39- * This exporter is NOT meant for generic use since the payload is prefixed with AWS X-Ray specific
40- * information.
39+ * This exporter extends the functionality of the OtlpHttpSpanExporter to allow spans to be exported
40+ * to the XRay OTLP endpoint https://xray.[AWSRegion].amazonaws.com/v1/traces. Utilizes the AWSSDK
41+ * library to sign and directly inject SigV4 Authentication to the exported request's headers.
42+ * https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-OTLPEndpoint.html
4143 */
4244@ Immutable
4345public class OtlpAwsSpanExporter implements SpanExporter {
@@ -61,6 +63,11 @@ public OtlpAwsSpanExporter(String endpoint) {
6163 this .spanData = new ArrayList <>();
6264 }
6365
66+ /**
67+ * Overrides the upstream implementation of export. All behaviors are the same except if the
68+ * endpoint is an XRay OTLP endpoint, we will sign the request with SigV4 in headers before
69+ * sending it to the endpoint. Otherwise, we will skip signing.
70+ */
6471 @ Override
6572 public CompletableResultCode export (Collection <SpanData > spans ) {
6673 this .spanData = spans ;
You can’t perform that action at this time.
0 commit comments