WildFly 29 micrometer configuration

241 views
Skip to first unread message

Emond Papegaaij

unread,
Sep 5, 2023, 11:07:56 AM9/5/23
to WildFly
Hi,

The metrics provided by WildFly 29, pushed to the otlp-endpoint, all contain the tag 'job="wildfly"'. Is there any way to change the value of this tag? We would like to push information from 2 wildfly instances to a single otel-collector. Having both wildfly instances push this information with the same tag, will make it difficult to keep the two streams separate. We can configure 2 receiving endpoints in the otel-collector, but I'd much rather put this in the wildfly configuration.

Best regards,
Emond Papegaaij

Brian Stansberry

unread,
Sep 8, 2023, 4:13:18 PM9/8/23
to WildFly
Apologies in advance if this doesn't work, as I'm pretty much guessing based on looking at a bit of source code, but does setting environmental variable OTEL_SERVICE_NAME to the values you want work?

WildFly sets a Micrometer OtlpConfig property named 'service.name' to 'wildfly', unless it's already configure, and if you set that env var Micrometer will use set service.name to that value and WildFly won't set it.

That's the only place I see where we pass in "wildfly" to the Micrometer code.

Best regards,
Brian

Emond Papegaaij

unread,
Sep 8, 2023, 4:50:45 PM9/8/23
to Brian Stansberry, WildFly
Hi Brian,

Thanks for taking the time to look into this. I also searched the source code for the origin of this value, but searching for 'job' and 'wildfly' is not an easy task in the WildFly source code. I'll give OTEL_SERVICE_NAME a try monday and report my findings.

Best regards,
Emond 

Op vr 8 sep. 2023 22:13 schreef Brian Stansberry <brian.st...@redhat.com>:
--
You received this message because you are subscribed to the Google Groups "WildFly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wildfly/287b74a3-cfc2-45e3-80a4-aafead8afcf1n%40googlegroups.com.

Emond Papegaaij

unread,
Sep 10, 2023, 3:19:09 PM9/10/23
to Brian Stansberry, WildFly
Hi Brian,

You nailed it! The value of the environment variable OTEL_SERVICE_NAME is indeed used for the 'job' tag. This greatly simplifies the configuration we need on the side of the otel-collector.

Best regards,
Emond

Op vr 8 sep 2023 om 22:50 schreef Emond Papegaaij <emond.p...@gmail.com>:

Brian Stansberry

unread,
Sep 12, 2023, 5:58:13 PM9/12/23
to WildFly
That's great, Emond! Thanks for posting back your results!

Best regards,
Brian

Reply all
Reply to author
Forward
0 new messages