temporalio / temporalio/samples-java

[Bug] Replacing JaegerGrpcSpanExporter with OtlpGrpcSpanExporter is not working

Abierto
#552 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

bug
Lenguaje dominante
Java
Estrellas
258
Forks
189
Merge medio
6 d 4 h
PR fusionados (30 d)
4

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza con el tracing sample en core/src/main/java/io/temporal/samples/tracing e inspecciona JaegerUtils.java; después compara la configuración local de Jaeger del sample con los requisitos de OtlpGrpcSpanExporter. Reproduce el error UNIMPLEMENTED usando la dependencia documentada y el reemplazo del exporter. La tarea estará completa cuando el sample exporte spans visibles en la instancia local de Jaeger sin depender de JaegerGrpcSpanExporter, que está obsoleto.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
java
Área
observability
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.