temporalio / temporalio/samples-java

[Bug] Replacing JaegerGrpcSpanExporter with OtlpGrpcSpanExporter is not working

未关闭
#552 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug
主要语言
Java
星标
258
派生
189
平均合并
6 天 4 小时
30 天内合并 PR
4

描述

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.

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 core/src/main/java/io/temporal/samples/tracing 中的 tracing sample 开始,检查 JaegerUtils.java,然后将 sample 的本地 Jaeger 设置与 OtlpGrpcSpanExporter 的要求进行比较。使用文档中说明的依赖项和 exporter 替换来重现 UNIMPLEMENTED 错误。当 sample 导出的 spans 能够在本地 Jaeger 实例中显示,且不依赖已弃用的 JaegerGrpcSpanExporter 时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
observability
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。