-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Describe the bug
I have configured my javaagent to export traces to a jaeger collector in a kubernetes cluster from a tomcat service running bare metal in an EC2 instance. When I send traces via HTTPS i get warning in my application logs. If I use the Pod IP of the jaeger collector instead for the OTEL_EXPORTER_JAEGER_ENDPOINT I get no warnings. All spans are exported successfully in both cases.
I have ambassador edge stack 2.5.1 setup with a mapping that routes traffic to the jaeger collector service.
Jaeger operator 1.29 is running.
Environment variables
OTEL_RESOURCE_ATTRIBUTES=service.name=tomcat,service.version=1.0.0
OTEL_TRACES_EXPORTER=jaeger
OTEL_EXPORTER_JAEGER_ENDPOINT="https://somehost.com/jaeger.api_v2.CollectorService/"
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc
OTEL_JAVAAGENT_LOGGING=application
OTEL_METRICS_EXPORTER=none
OTEL_LOGS_EXPORTER=none
Javaagent logs
WARN [OkHttp https://somehost.com/...] GrpcExporter - Failed to export spans. Server responded with gRPC status code 2. Error message: OK
Ambassador edge stack log
ACCESS [2024-03-04T19:20:22.667Z] "POST /jaeger.api_v2.CollectorService/PostSpans HTTP/1.1" 200 - 12769 5 8 6 "X.X.X.X" "okhttp/4.12.0" "00275b66-3f2f-4e88-81d4-a12e131ea31f" "somehost.com" "10.11.20.100:14250"
Steps to reproduce
Set up ambassador edge stack 2.5.1 in a kubernetes cluster in aws.
Set up jaeger operator 1.29 in the kubernetes cluster.
Create a mapping file to the jaeger-collector service
apiVersion: getambassador.io/v2
kind: Mapping
metadata:
name: jaeger-collector
namespace: observability
spec:
grpc: true
prefix: /jaeger.api_v2.CollectorService/ # This is the prefix of the gRPC jaeger service
rewrite: /jaeger.api_v2.CollectorService/
service: jaeger-elasticsearch-collector-headless.observability:14250
timeout_ms: 30000
idle_timeout_ms: 500000
connect_timeout_ms: 30000
Run a tomcat java application with the javaagent.
Environment variables for javaagent
OTEL_RESOURCE_ATTRIBUTES=service.name=tomcat,service.version=1.0.0
OTEL_TRACES_EXPORTER=jaeger
OTEL_EXPORTER_JAEGER_ENDPOINT="https://somehost.com/jaeger.api_v2.CollectorService/"
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc
OTEL_JAVAAGENT_LOGGING=application
OTEL_METRICS_EXPORTER=none
OTEL_LOGS_EXPORTER=none
Expected behavior
No warning message when spans are successfully exported
Actual behavior
Warning message in application logs that spans were not exported, but the ERROR message is OK.
WARN [OkHttp https://somehost.com/...] GrpcExporter - Failed to export spans. Server responded with gRPC status code 2. Error message: OK
Javaagent or library instrumentation version
2.0.0
Environment
JDK: 21
OS: tomcat running on Centos 7, kubernetes amazon linux 2 machines
Additional context
No response