You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unable to produce db.client.operation.duration metrics that are supposed to be introduced in opentelemetry-jva-instrumentation v2.11 through #12806 .
None of export OTEL_SEMCONV_STABILITY_OPT_IN=database and -Dotel.semconv-stability.opt-in=database works to enable this metric.
Instrument the application with otel-java-instrumentation v2.11 and send metrics to a backend like Prometheus
Activate new OTel DB metrics with any of -Dotel.semconv-stability.opt-in=database and export OTEL_SEMCONV_STABILITY_OPT_IN=database
Start the application and generate traffic
Verify that
some DB client spans are produced
the otel instrumentation version is v2.11, for xample looking at the resource attribute telemetry.distro.version=2.11.0 on the spans
Expected behavior
The histogram metric db.client.operation.duration is produced.
Actual behavior
The metric db.client.operation.duration is missing.
Other db.client.* metrics are available: db.client.connections.create_time (histogram in ms), db.client.connections.idle.min (gauge), db.client.connections.pending_requests (gauge), db.client.connections.use_time (histogram in ms), db.client.connection.wait_time (histogram in ms)
i haven't had a chance to run your reproducer to validate that this fixes it, but I noticed that you are setting the -Dotel.semconv-stability.opt-in flag twice, once on line 150 and then again on line 156, and the one on line 156 doesn't include the database opt-in.
Describe the bug
Unable to produce
db.client.operation.duration
metrics that are supposed to be introduced in opentelemetry-jva-instrumentation v2.11 through #12806 .None of
export OTEL_SEMCONV_STABILITY_OPT_IN=database
and-Dotel.semconv-stability.opt-in=database
works to enable this metric.Steps to reproduce
-Dotel.semconv-stability.opt-in=database
andexport OTEL_SEMCONV_STABILITY_OPT_IN=database
telemetry.distro.version=2.11.0
on the spansExpected behavior
The histogram metric
db.client.operation.duration
is produced.Actual behavior
The metric
db.client.operation.duration
is missing.Other
db.client.*
metrics are available:db.client.connections.create_time
(histogram inms
),db.client.connections.idle.min
(gauge),db.client.connections.pending_requests
(gauge),db.client.connections.use_time
(histogram inms
),db.client.connection.wait_time
(histogram inms
)Javaagent or library instrumentation version
v2.11.0
Environment
JDK:
OpenJDK Runtime Environment 17.0.13+0
OS:
MacOS 15.2
Additional context
cc @zeitlinger
The text was updated successfully, but these errors were encountered: