clj-otel

grzm 2026-04-03T14:15:50.066489Z

Hello! I'm using the automated instrumentation for the java.net.http HttpClient. My understanding is that there isn't a way to add an attribute to the metrics that the automated provides. For example, say I wanted to add an attribute com_grzm_foo to the http.client.request.duration metric. There isn't a way for me to add/inject the com_grzm_foo attribute using automated instrumentation: I'd need to add a new metric (or disable automated instrumentation and replace it with my own implementatio). Is that correct?

steffan 2026-04-03T16:01:12.549129Z

You are correct, the OpenTelemetry Java API does not offer a way to modify metric values, as far as I'm aware. See the question above point_up::skin-tone-3

grzm 2026-04-03T16:02:50.791709Z

Thanks for confirming.

grzm 2026-04-03T16:03:20.109799Z

Seems like a useful feature to have. I suspect it's been discussed at the otel-planning/design level and dismisssed for a reasonable reason.