temporalio / temporalio/samples-java

[Bug] Replacing JaegerGrpcSpanExporter with OtlpGrpcSpanExporter is not working

Open
#552 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
258
Forks
189
Avg merge
6d 4h
Merged PRs (30d)
4

Description

I am trying the tracing example given at https://github.com/temporalio/samples-java/tree/main/core/src/main/java/io/temporal/samples/tracing

I am able to bring up this and able to see the traces in the Jaeger running in my local docker.

But now JaegerGrpcSpanExporter is deprecated, so the suggestion is to use OtlpGrpcSpanExporter.
So to the above working project I have made two changes.

  • include implementation "io.opentelemetry:opentelemetry-exporter-otlp:1.32.0"
  • Replace JaegerGrpcSpanExporter with OtlpGrpcSpanExporter in JaegerUtils.java

After this change I am not seeing any traces in Jaeger and I see below errors in my service.

Nov 27, 2023 2:39:02 PM io.opentelemetry.exporter.internal.grpc.GrpcExporterUtil logUnimplemented SEVERE: Failed to export spans. Server responded with UNIMPLEMENTED. This usually means that your collector is not configured with an otlp receiver in the "pipelines" section of the configuration. If export is not desired and you are using OpenTelemetry autoconfiguration or the javaagent, disable export by setting OTEL_TRACES_EXPORTER=none. Full error message: unknown service opentelemetry.proto.collector.trace.v1.TraceService

Please let me know, if I need to add any extra configs to my application.yml

I tried with below two things, it did not help.

  1. otel:
    traces:
    exporter: jaeger
    exporter:
    jaeger:
    endpoint: http://localhost:14250

  2. Setting environment variable OTEL_TRACES_EXPORTER=none.

If you can modify this sample to work with OtlpGrpcSpanExporter instead of JaegerGrpcSpanExporter, that would be great.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the tracing sample at core/src/main/java/io/temporal/samples/tracing and inspect JaegerUtils.java, then compare the sample's local Jaeger setup with the OtlpGrpcSpanExporter requirements. Reproduce the UNIMPLEMENTED error using the documented dependency and exporter replacement. Done means the sample exports spans that are visible in the local Jaeger instance without relying on deprecated JaegerGrpcSpanExporter.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.