Quarkus: Is documentation of OpenTracing UDP Sender wrong?

Created on 25 Sep 2019  路  14Comments  路  Source: quarkusio/quarkus

As stated in the OpenTracing guide:

Currently the tracer can only be configured to report spans directly to the collector via HTTP, using the quarkus.jaeger.endpoint property (or JAEGER_ENDPOINT environment variable). Support for using the Jaeger agent, via UDP, will be available in a future version.

But there are several closed issues that states that the UDPSender is now fixed, most notably #2304

I used

quarkus.jaeger.sampler-type=const
quarkus.jaeger.sampler-param=1
quarkus.jaeger.service-name=${SERVICE_NAME}
jaeger.agent.host=${OPENTRACING_AGENT_HOST}
jaeger.agent.port=${OPENTRACING_AGENT_PORT}

To configure the UDP tracer and it seems to work fine (well locally at least)

Am I doing something wrong or is the documentation wrong?

kinquestion

Most helpful comment

@FreifeldRoyi better yet you could provide a PR to fix it :). The source can be found at: https://github.com/quarkusio/quarkus/blob/master/docs/src/main/asciidoc/opentracing-guide.adoc

All 14 comments

Digging a bit deeper, it seems that jaeger.agent.host/port properties aren't initializing the agentHostPort field in JaegerConfig class, and I'm not sure where, but I think its value is always _localhost_ and that's why it worked locally.
Except for the #2304 ticket, I mentioned in the original post, that states that UDPSender is now working, I can't find any examples using UDPSender, and I don't remember where I found these properties in the first place..

Anyway... I really with someone can help me sort it out, or point me in the right direction.
Thank you

cc @pavolloffay @objectiser

The localhost is the default for UDP sender in jaeger client.

Jaeger in Quarkus can be configured in two ways - using application.properties via (https://github.com/quarkusio/quarkus/blob/master/extensions/jaeger/runtime/src/main/java/io/quarkus/jaeger/runtime/JaegerConfig.java#L17) or via environmental variables. The properties from properties files are set to system properties https://github.com/quarkusio/quarkus/blob/7e9330df7f9b7f66887d94d15cd073379fff253a/extensions/jaeger/runtime/src/main/java/io/quarkus/jaeger/runtime/JaegerDeploymentRecorder.java#L45
and then consumed by Jaeger core configuration
https://github.com/quarkusio/quarkus/blob/c9cba824e8812fa3f15474b8382ac5d90f7238aa/extensions/jaeger/runtime/src/main/java/io/quarkus/jaeger/runtime/QuarkusJaegerTracer.java#L23

The host/port for agent is exposed in Quarkus Jaeger config https://github.com/quarkusio/quarkus/blob/3d5d075ec43ce42305a6fbb231844deaa6ebb95c/extensions/jaeger/runtime/src/main/java/io/quarkus/jaeger/runtime/JaegerConfig.java#L54

I am not sure if the host/port configuration via JaegerConfig works properly - first I would debug that and then if the UDP sender can send data.

I believe the property in applications.properties would need to be

quarkus.jaeger.agent-host-port=<host>:<port>

I believe the property in applications.properties would need to be

quarkus.jaeger.agent-host-port=<host>:<port>

That worked.. Should I open another issue to fix documentation ?

@FreifeldRoyi better yet you could provide a PR to fix it :). The source can be found at: https://github.com/quarkusio/quarkus/blob/master/docs/src/main/asciidoc/opentracing-guide.adoc

@geoand Any idea if there are plans to auto generate config docs per extension?

@objectiser yes, we have started the work - and we have a couple of PRs (e.g #3428, https://github.com/quarkusio/quarkus/pull/3809 and #3887 ) already merged for this. The latest PR on this is https://github.com/quarkusio/quarkus/pull/4050. Some guides have already started using the generated docs, but not all (WIP).

@objectiser I would say it's a good opportunity to have a look at the Jaeger extension. I'll do that this afternoon, I need some dumb tasks :).

Ok thanks @machi1990 and @gsmet

@FreifeldRoyi @objectiser this PR will add the configuration documentation to the guide: https://github.com/quarkusio/quarkus/pull/4276

@gsmet Thanks! Will a preview be available somewhere?

Awesome! Is it going to change the docs in the website's guides section?

Awesome! Is it going to change the docs in the website's guides section?

@FreifeldRoyi yes, but we'll have to wait the next release for that.

right? @gsmet

Was this page helpful?
0 / 5 - 0 ratings