Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable integration with AWS Cloudatch via new OTLP endpoint #6979

Closed
shorn opened this issue Dec 21, 2024 · 2 comments
Closed

Enable integration with AWS Cloudatch via new OTLP endpoint #6979

shorn opened this issue Dec 21, 2024 · 2 comments
Labels
Feature Request Suggest an idea for this project

Comments

@shorn
Copy link

shorn commented Dec 21, 2024

Is your feature request related to a problem? Please describe.
Send traces to AWS.

Describe the solution you'd like
Want to send traces to AWS using the SDK - do not want to use AWS ADOT or any other collector process.

Describe alternatives you've considered
No way to do it as far as I know.
Possibly I could write a custom span exporter that does AWS Sigv4 signing? Not sure.

Additional context
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-OTLPEndpoint.html
e.g. https://xray.us-east-1.amazonaws.com/v1/traces

I don't use the java agent, I use the SDK directly to export traces.
The SDK currently works fine with OTLP compatible products like NewRelic and GrafanaCloud, using a simple api-key or Authorization header.

But not with AWS' OTLP endpoint.

If I do this:

      var spanExporter = OtlpHttpSpanExporter.builder().
        setEndpoint(xray.url()).
        build();

      config.addSpanProcessor(BatchSpanProcessor.builder(spanExporter).
        setMaxQueueSize(xray.maxQueueSize()).
        setMaxExportBatchSize(xray.maxBatchSize()).
        setScheduleDelay(xray.scheduleDelay()).
        setExporterTimeout(xray.exportTimeout()).
        build()
      );

It will fail with:

Dec 21, 2024 3:34:00 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Failed to export spans. Server responded with HTTP status code 403. Error message: Missing Authentication Token

As far as I know, there is no concept of an "Authentication token" that you create on the AWS side (like NewRelic and GrafanaCloud) and they're actually expecting the client will sign each HTTP request AWS SigV4:
https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html

@shorn shorn added the Feature Request Suggest an idea for this project label Dec 21, 2024
@jkwatson
Copy link
Contributor

My suggestion is that someone build the custom exporter (or a wrapper for the existing OTLP exporters) using the AWS SDK in the opentelemetry-java-contrib project. Since this isn't an officially defined exporter in the OpenTelemetry specification, it's most-likely not something we would support in the core repository.

@shorn
Copy link
Author

shorn commented Dec 21, 2024

Ok - so closed as WON'T FIX?

@jkwatson jkwatson closed this as not planned Won't fix, can't repro, duplicate, stale Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Suggest an idea for this project
Projects
None yet
Development

No branches or pull requests

2 participants