'AWS Opentelemetry Java agent exporter

I installed AWS Distro for OpenTelemetry Collector on EC2 instance using CloudFormation. How do I set the java agent exporter to the collector on EC2? No matter what I set the Dotel.exporter.otlp.traces.endpoint, I get

ERROR io.opentelemetry.exporter.otlp.internal.grpc.OkHttpGrpcExporter - Failed to export spans. The request could not be executed. Full error message: Failed to connect to localhost/0:0:0:0:0:0:0:1:4317

Thanks in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source