2

I am very new to using OpenTelemetry and have just tried configuring it to send traces to my Zipkin server. Unfortunately , after configuring the agent by specifying zipkin exporter details , I could see an exception in the console. I used Petclic as sample spring boot and have followed the documentation here https://github.com/open-telemetry/opentelemetry-java-instrumentation

Here is the command that I used to start spring-boot app(I have my zipkin server running at localhost:9411):

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

Exception in the console (It is trying to connect to gRpc exporter instead of 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

Please can you let me know what is wrong with this.

EDIT : I already tried passing -Dotel.traces.exporter=zipkin instead of -Dotel.exporter=zipkin but was not successful. I am just trying to start my spring boot app through eclipse by passing these params as jvm arguments. Every tutorial on OpenTelemetery seems to be using Docker setup. Please could someone help

Kokki
  • 63
  • 1
  • 8

3 Answers3

3

i had the same issue, but i solved with this jvm arguments:

-Dotel.traces.exporter=zipkin -Dotel.metrics.exporter=none -Dotel.exporter.zipkin.endpoint=http://localhost:9411/api/v2/spans Maybe the error is on zipkin.endpoint, try to write the entire url.

Regards, Marco

marco
  • 46
  • 1
  • Thank you so much , it worked like a charm !!. I used the exact command that you provided and it worked fine , thanks again. – Kokki Mar 26 '21 at 07:38
0

In your command please try the following -Dotel.traces.exporter=zipkin instead of -Dotel.exporter=zipkin

  • Hi Sundhar , Thank you so much for taking your time and commenting on this. I already tried providing -Dotel.traces.exporter=zipkin instead of Dotel.exporter=zipkin and was not successful. And Just FYI , I do not have a docker setup and I am not passing these as parameters inside docker yaml. I am just trying to start my spring boot app by passing these params as jvm arguments. – Kokki Mar 17 '21 at 13:48
0

I think conceptual understanding helps too

Set up the server, using either binary or compile it. Launch it. https://zipkin.io/pages/quickstart.html

Set up Java client, add VM parameters as per Marco post above. I added -Dotel.javaagent.debug=true to help troubleshoot

After that, your client app will send traces (in zipkin mode) to the server. then bring up a browser on http://localhost:9411

Vortex
  • 789
  • 12
  • 21