Failed to export metrics. Server responded with gRPC status code 2 #6418
Unanswered
ShivaniSara
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I would followup with dynatrace directly. gRPC status code 2 is an unknown error, which likely means that something went wrong specific to dynatrace's OTLP receiver. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are trying to get our custom metrics on Dynatrace using OTLP exporter. Followed these steps to instrument the application
https://docs.dynatrace.com/docs/extend-dynatrace/opentelemetry/walkthroughs/java/java-auto#tabgroup--dynatrace-docs--otlp-export
I added these env variables in my docker file:
ENV OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=https://{envID}.live.dynatrace.com/api/v2/otlp/v1/metrics
ENV OTEL_EXPORTER_OTLP_METRICS_HEADERS="Authorization=Api-Token xyz"
ENV OTEL_RESOURCE_ATTRIBUTES="service.name=java-quickstart,service.version=1.0.1"
ENV OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=delta
ENV OTEL_METRICS_EXPORTER=otlp
ENV OTEL_EXPORTER_OTLP_METRICS_PROTOCOL=http/protobuf
and passed Opentelemetry-javaagent.jar in CMD in dockerfile : CMD ["java", "-javaagent:/hab/svc/config/opentelemetry-javaagent.jar", "-jar", "/usr/app/app.jar"]
When I run the traffic, I see this error :
"thread":"OkHttp https://{envID}.live.dynatrace.com/...","logger":"io.opentelemetry.exporter.internal.grpc.GrpcExporter","message":"Failed to export metrics. Server responded with gRPC status code 2. Error message: "}
FYI - in my java Application, I have done the standard instrumentation:
OtlpGrpcMetricExporter exporter = OtlpGrpcMetricExporter.builder()
.setEndpoint(dynatraceEndpoint)
.addHeader("Authorization", "Api-Token " + dynatraceApiToken)
.build();
Beta Was this translation helpful? Give feedback.
All reactions