gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 08:00:06 28 4
gpt4 key购买 nike

我对使用 OpenTelemetry 非常陌生,刚刚尝试将其配置为将跟踪发送到我的 Zipkin 服务器。不幸的是,通过指定 zipkin exporter details 配置代理后,我可以在控制台中看到异常。我使用 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 但没有成功。我只是想通过将这些参数作为 jvm 参数传递来通过 Eclipse 启动我的 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/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com