Skip to content

Commit 66ef0e6

Browse files
committed
enable metrics
1 parent 579ec04 commit 66ef0e6

File tree

12 files changed

+322
-40
lines changed

12 files changed

+322
-40
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ derby.log
5757
hs_err_pid*
5858
replay_pid*
5959
.attach_pid*
60-
**/.telemetry*
60+
.telemetry*
6161

6262
!java-agent/benchmark/releases/*.jar
6363

docs/instrumentation-list.yaml

Lines changed: 243 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,22 @@ libraries:
167167
target_versions:
168168
javaagent:
169169
- org.apache.httpcomponents.client5:httpclient5:[5.0,)
170+
metrics:
171+
- name: http.client.request.duration
172+
description: Duration of HTTP client requests.
173+
type: HISTOGRAM
174+
unit: s
175+
attributes:
176+
- name: http.request.method
177+
type: STRING
178+
- name: http.response.status_code
179+
type: LONG
180+
- name: network.protocol.version
181+
type: STRING
182+
- name: server.address
183+
type: STRING
184+
- name: server.port
185+
type: LONG
170186
- name: apache-dbcp-2.0
171187
source_path: instrumentation/apache-dbcp-2.0
172188
scope:
@@ -176,6 +192,38 @@ libraries:
176192
- org.apache.commons:commons-dbcp2:[2,)
177193
library:
178194
- org.apache.commons:commons-dbcp2:2.0
195+
metrics:
196+
- name: db.client.connections.usage
197+
description: The number of connections that are currently in state described
198+
by the state attribute.
199+
type: LONG_SUM
200+
unit: connections
201+
attributes:
202+
- name: pool.name
203+
type: STRING
204+
- name: state
205+
type: STRING
206+
- name: db.client.connections.max
207+
description: The maximum number of open connections allowed.
208+
type: LONG_SUM
209+
unit: connections
210+
attributes:
211+
- name: pool.name
212+
type: STRING
213+
- name: db.client.connections.idle.min
214+
description: The minimum number of idle open connections allowed.
215+
type: LONG_SUM
216+
unit: connections
217+
attributes:
218+
- name: pool.name
219+
type: STRING
220+
- name: db.client.connections.idle.max
221+
description: The maximum number of idle open connections allowed.
222+
type: LONG_SUM
223+
unit: connections
224+
attributes:
225+
- name: pool.name
226+
type: STRING
179227
armeria:
180228
- name: armeria-1.3
181229
source_path: instrumentation/armeria/armeria-1.3
@@ -294,6 +342,35 @@ libraries:
294342
- software.amazon.awssdk:sqs:2.2.0
295343
- software.amazon.awssdk:sns:2.2.0
296344
- software.amazon.awssdk:lambda:2.2.0
345+
configurations:
346+
- name: otel.instrumentation.messaging.experimental.receive-telemetry.enabled
347+
description: Enables experimental receive telemetry for AWS SDK instrumentation.
348+
type: boolean
349+
default: false
350+
- name: otel.instrumentation.messaging.experimental.capture-headers
351+
description: Allows configuring headers to capture as span attributes.
352+
type: list
353+
default: ''
354+
- name: otel.instrumentation.aws-sdk.experimental-span-attributes
355+
description: Enables experimental span attributes for AWS SDK instrumentation.
356+
type: boolean
357+
default: false
358+
- name: otel.instrumentation.aws-sdk.experimental-use-propagator-for-messaging
359+
description: Determines whether the configured TextMapPropagator should be used
360+
to inject into supported messaging attributes (for SQS).
361+
type: boolean
362+
default: false
363+
- name: otel.instrumentation.genai.capture-message-content
364+
description: Determines whether Generative AI events include full content of
365+
user and assistant messages. Note that full content can have data privacy
366+
and size concerns and care should be taken when enabling this
367+
type: boolean
368+
default: false
369+
- name: otel.instrumentation.aws-sdk.experimental-record-individual-http-error
370+
description: Determines whether errors returned by each individual HTTP request
371+
should be recorded as events for the SDK span.
372+
type: boolean
373+
default: false
297374
azure:
298375
- name: azure-core-1.36
299376
source_path: instrumentation/azure-core/azure-core-1.36
@@ -318,6 +395,8 @@ libraries:
318395
- com.azure:azure-core:[1.14.0,1.19.0)
319396
c3p0:
320397
- name: c3p0-0.9
398+
description: The c3p0 instrumentation provides connection pool metrics for c3p0
399+
data sources.
321400
source_path: instrumentation/c3p0-0.9
322401
scope:
323402
name: io.opentelemetry.c3p0-0.9
@@ -326,14 +405,40 @@ libraries:
326405
- com.mchange:c3p0:(,)
327406
library:
328407
- com.mchange:c3p0:0.9.2
408+
metrics:
409+
- name: db.client.connections.usage
410+
description: The number of connections that are currently in state described
411+
by the state attribute.
412+
type: LONG_SUM
413+
unit: connections
414+
attributes:
415+
- name: pool.name
416+
type: STRING
417+
- name: state
418+
type: STRING
419+
- name: db.client.connections.pending_requests
420+
description: The number of pending requests for an open connection, cumulative
421+
for the entire pool.
422+
type: LONG_SUM
423+
unit: requests
424+
attributes:
425+
- name: pool.name
426+
type: STRING
329427
camel:
330428
- name: camel-2.20
429+
description: This instrumentation provides support for Apache Camel and generates
430+
spans for each route execution.
331431
source_path: instrumentation/camel-2.20
332432
scope:
333433
name: io.opentelemetry.camel-2.20
334434
target_versions:
335435
javaagent:
336436
- org.apache.camel:camel-core:[2.19,3)
437+
configurations:
438+
- name: otel.instrumentation.camel.experimental-span-attributes
439+
description: Enable the capture of experimental span attributes.
440+
type: boolean
441+
default: false
337442
cassandra:
338443
- name: cassandra-4.0
339444
description: |
@@ -396,6 +501,8 @@ libraries:
396501
default: true
397502
couchbase:
398503
- name: couchbase-3.1.6
504+
description: |
505+
Couchbase instrumentation is owned upstream. This Couchbase instrumentation works by intercepting the constructor of the CoreEnvironment.Builder class. On construction, it automatically sets the Couchbase requestTracer to use an OpenTelemetryRequestTracer that wraps the agent's TracerProvider. This enables distributed tracing for Couchbase operations using OpenTelemetry, without requiring manual configuration by the user.
399506
source_path: instrumentation/couchbase/couchbase-3.1.6
400507
scope:
401508
name: io.opentelemetry.couchbase-3.1.6
@@ -409,21 +516,37 @@ libraries:
409516
target_versions:
410517
javaagent:
411518
- com.couchbase.client:java-client:[2.6.0,3)
519+
configurations:
520+
- name: otel.instrumentation.couchbase.experimental-span-attributes
521+
description: Enables experimental span attributes couchbase.operation_id and
522+
couchbase.local.address
523+
type: boolean
524+
default: false
412525
- name: couchbase-2.0
413526
source_path: instrumentation/couchbase/couchbase-2.0
414527
scope:
415528
name: io.opentelemetry.couchbase-2.0
416529
target_versions:
417530
javaagent:
418531
- com.couchbase.client:java-client:[2,3)
532+
configurations:
533+
- name: otel.instrumentation.couchbase.experimental-span-attributes
534+
description: Enables experimental span attributes couchbase.operation_id and
535+
couchbase.local.address
536+
type: boolean
537+
default: false
419538
- name: couchbase-3.2
539+
description: |
540+
Couchbase instrumentation is owned upstream. This Couchbase instrumentation works by intercepting the constructor of the CoreEnvironment.Builder class. On construction, it automatically sets the Couchbase requestTracer to use an OpenTelemetryRequestTracer that wraps the agent's TracerProvider. This enables distributed tracing for Couchbase operations using OpenTelemetry, without requiring manual configuration by the user.
420541
source_path: instrumentation/couchbase/couchbase-3.2
421542
scope:
422543
name: io.opentelemetry.couchbase-3.2
423544
target_versions:
424545
javaagent:
425546
- com.couchbase.client:java-client:[3.2.0,)
426547
- name: couchbase-3.1
548+
description: |
549+
Couchbase instrumentation is owned upstream. This instrumentation hooks into the CoreEnvironment.Builder constructor and automatically sets the Couchbase requestTracer to use an OpenTelemetry tracer from the agent. This enables distributed tracing for Couchbase operations using OpenTelemetry, without requiring manual configuration by the user.
427550
source_path: instrumentation/couchbase/couchbase-3.1
428551
scope:
429552
name: io.opentelemetry.couchbase-3.1
@@ -432,20 +555,37 @@ libraries:
432555
- com.couchbase.client:java-client:[3.1,3.1.6)
433556
dropwizard:
434557
- name: dropwizard-metrics-4.0
558+
description: |
559+
The dropwizard-metrics instrumentation for the dropwizard/codahale metrics library produces OpenTelemetry compliant versions of the metrics generated by the MetricRegistry.
560+
The Dropwizard metrics API does not have a concept of metric labels/tags/attributes, thus the data produced by this integration might be of very low quality, depending on how the API is used in the instrumented application.
435561
disabled_by_default: true
436562
source_path: instrumentation/dropwizard/dropwizard-metrics-4.0
437563
scope:
438564
name: io.opentelemetry.dropwizard-metrics-4.0
439565
target_versions:
440566
javaagent:
441567
- io.dropwizard.metrics:metrics-core:[4.0.0,)
568+
configurations:
569+
- name: otel.instrumentation.dropwizard-metrics.enabled
570+
description: Enables the dropwizard metrics instrumentation.
571+
type: boolean
572+
default: false
442573
- name: dropwizard-views-0.7
443574
source_path: instrumentation/dropwizard/dropwizard-views-0.7
444575
scope:
445576
name: io.opentelemetry.dropwizard-views-0.7
446577
target_versions:
447578
javaagent:
448579
- io.dropwizard:dropwizard-views:(,3.0.0)
580+
configurations:
581+
- name: otel.instrumentation.common.experimental.view-telemetry.enabled
582+
description: Enables experimental view telemetry.
583+
type: boolean
584+
default: false
585+
- name: otel.instrumentation.common.experimental.controller-telemetry.enabled
586+
description: Enables experimental controller telemetry.
587+
type: boolean
588+
default: false
449589
elasticsearch:
450590
- name: elasticsearch-rest-6.4
451591
source_path: instrumentation/elasticsearch/elasticsearch-rest-6.4
@@ -668,6 +808,69 @@ libraries:
668808
- com.zaxxer:HikariCP:[3.0.0,)
669809
library:
670810
- com.zaxxer:HikariCP:3.0.0
811+
metrics:
812+
- name: db.client.connections.wait_time
813+
description: The time it took to obtain an open connection from the pool.
814+
type: HISTOGRAM
815+
unit: ms
816+
attributes:
817+
- name: pool.name
818+
type: STRING
819+
- name: db.client.connections.usage
820+
description: The number of connections that are currently in state described
821+
by the state attribute.
822+
type: LONG_SUM
823+
unit: connections
824+
attributes:
825+
- name: pool.name
826+
type: STRING
827+
- name: state
828+
type: STRING
829+
- name: db.client.connections.pending_requests
830+
description: The number of pending requests for an open connection, cumulative
831+
for the entire pool.
832+
type: LONG_SUM
833+
unit: requests
834+
attributes:
835+
- name: pool.name
836+
type: STRING
837+
- name: db.client.connections.timeouts
838+
description: The number of connection timeouts that have occurred trying to
839+
obtain a connection from the pool.
840+
type: LONG_SUM
841+
unit: timeouts
842+
attributes:
843+
- name: pool.name
844+
type: STRING
845+
- name: db.client.connections.max
846+
description: The maximum number of open connections allowed.
847+
type: LONG_SUM
848+
unit: connections
849+
attributes:
850+
- name: pool.name
851+
type: STRING
852+
- name: db.client.connections.create_time
853+
description: The time it took to create a new connection.
854+
type: HISTOGRAM
855+
unit: ms
856+
attributes:
857+
- name: pool.name
858+
type: STRING
859+
- name: db.client.connections.idle.min
860+
description: The minimum number of idle open connections allowed.
861+
type: LONG_SUM
862+
unit: connections
863+
attributes:
864+
- name: pool.name
865+
type: STRING
866+
- name: db.client.connections.use_time
867+
description: The time between borrowing a connection and returning it to the
868+
pool.
869+
type: HISTOGRAM
870+
unit: ms
871+
attributes:
872+
- name: pool.name
873+
type: STRING
671874
http:
672875
- name: http-url-connection
673876
source_path: instrumentation/http-url-connection
@@ -1910,6 +2113,46 @@ libraries:
19102113
target_versions:
19112114
javaagent:
19122115
- org.apache.tomcat:tomcat-jdbc:[8.5.0,)
2116+
metrics:
2117+
- name: db.client.connections.usage
2118+
description: The number of connections that are currently in state described
2119+
by the state attribute.
2120+
type: LONG_SUM
2121+
unit: connections
2122+
attributes:
2123+
- name: pool.name
2124+
type: STRING
2125+
- name: state
2126+
type: STRING
2127+
- name: db.client.connections.pending_requests
2128+
description: The number of pending requests for an open connection, cumulative
2129+
for the entire pool.
2130+
type: LONG_SUM
2131+
unit: requests
2132+
attributes:
2133+
- name: pool.name
2134+
type: STRING
2135+
- name: db.client.connections.max
2136+
description: The maximum number of open connections allowed.
2137+
type: LONG_SUM
2138+
unit: connections
2139+
attributes:
2140+
- name: pool.name
2141+
type: STRING
2142+
- name: db.client.connections.idle.min
2143+
description: The minimum number of idle open connections allowed.
2144+
type: LONG_SUM
2145+
unit: connections
2146+
attributes:
2147+
- name: pool.name
2148+
type: STRING
2149+
- name: db.client.connections.idle.max
2150+
description: The maximum number of idle open connections allowed.
2151+
type: LONG_SUM
2152+
unit: connections
2153+
attributes:
2154+
- name: pool.name
2155+
type: STRING
19132156
twilio:
19142157
- name: twilio-6.6
19152158
source_path: instrumentation/twilio-6.6

0 commit comments

Comments
 (0)