zipkin - 使用 Zipkin 导出器的 Opentelemetry 未按预期工作。抛出 StatusRuntimeException : UNAVAILABLE: io exception

标签 zipkin open-telemetry

我对使用 OpenTelemetry 非常陌生,刚刚尝试将其配置为将跟踪发送到我的 Zipkin 服务器。不幸的是,在通过指定 zipkin 导出器详细信息配置代理后,我可以在控制台中看到异常。我使用 Petclic 作为示例 Spring Boot,并遵循此处的文档 https://github.com/open-telemetry/opentelemetry-java-instrumentation

这是我用来启动 spring-boot 应用程序的命令(我的 zipkin 服务器在 localhost:9411 运行):

java -javaagent:opentelemetry-javaagent-all.jar -Dotel.exporter=zipkin -Dotel.exporter.zipkin.endpoint=localhost:9411 -jar spring-petclinic-2.4.2.jar

控制台中出现异常(它正在尝试连接到 gRpc 导出器而不是 Zipkins):

[opentelemetry.auto.trace 2021-03-07 20:24:15:582 +0530] [IntervalMetricReader-1] WARN io.opentelemetry.expor**ter.otlp.metrics.OtlpGrpcMetricExporter - Failed to export metrics
io.grpc.StatusRuntimeException: UNAVAILABLE: io exception**
        at io.grpc.Status.asRuntimeException(Status.java:534)
        at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:533)
        at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:617)
        at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:70)
        at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:803)
        at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:782)
        at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
        at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: **localhost/0:0:0:0:0:0:0:1:4317**
Caused by: java.net.ConnectException: Connection refused: no further information

请让我知道这有什么问题。

编辑: 我已经尝试传递 -Dotel.traces.exporter=zipkin 而不是 -Dotel.exporter=zipkin 但没有成功。我只是想通过 eclipse 通过将这些参数作为 jvm 参数传递来启动我的 spring boot 应用程序。 OpenTelemetery 上的每个教程似乎都使用 Docker 设置。请有人帮忙

最佳答案

我有同样的问题,但我用这个 jvm 参数解决了:

-Dotel.traces.exporter=zipkin -Dotel.metrics.exporter=none -Dotel.exporter.zipkin.endpoint=http://localhost:9411/api/v2/spans 也许错误出在 zipkin.endpoint 上,尝试写整个 url。

问候, 马可

关于zipkin - 使用 Zipkin 导出器的 Opentelemetry 未按预期工作。抛出 StatusRuntimeException : UNAVAILABLE: io exception,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66517888/

相关文章:

docker - 无法挂载 docker volume 来运行 opentelemetry 图像

windows - 是否可以使用 Perfino 和 Zipkin 监控 Windows 服务?

elasticsearch - Elasticsearch -计数api显示索引的总文档计数不正确

python - 在响应 header 中从 Jaeger 返回跟踪 ID

azure - 使用 Go 的 Azure ServiceBus 队列的 OpenTelemetry 传播问题

c# - 使用 Microsoft 托管扩展和 net472 时事件为空

azure - 使用 OpenTelemetry 的 Azure 上的 App Insights 中的组件名称不正确

java - 如何使用 Elasticsearch 配置 Spring Cloud Zipkin 服务器以实现持久性?

kubernetes - Istio 分布式跟踪仅显示 1 个跨度

java - zipkin适合跟踪方法调用吗?