Skip to content

Commit 49158e3

Browse files
authored
Metadata for mybatis, nats, and netty (#15524)
1 parent c89b1c7 commit 49158e3

File tree

8 files changed

+356
-17
lines changed

8 files changed

+356
-17
lines changed

docs/instrumentation-list.yaml

Lines changed: 172 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8282,16 +8282,33 @@ libraries:
82828282
- org.mongodb:mongodb-driver-async:[3.3,)
82838283
mybatis:
82848284
- name: mybatis-3.2
8285+
display_name: MyBatis
8286+
description: This instrumentation enables spans for MyBatis mapper method executions.
8287+
library_link: https://mybatis.org/mybatis-3/
82858288
disabled_by_default: true
82868289
source_path: instrumentation/mybatis-3.2
82878290
scope:
82888291
name: io.opentelemetry.mybatis-3.2
82898292
target_versions:
82908293
javaagent:
82918294
- org.mybatis:mybatis:[3.2.0,)
8295+
telemetry:
8296+
- when: default
8297+
spans:
8298+
- span_kind: INTERNAL
8299+
attributes:
8300+
- name: code.function
8301+
type: STRING
8302+
- name: code.namespace
8303+
type: STRING
82928304
nats:
82938305
- name: nats-2.17
8294-
description: This instrumentation provides messaging spans for NATS
8306+
display_name: NATS Client
8307+
description: This instrumentation enables messaging spans for NATS message producers
8308+
and consumers.
8309+
semantic_conventions:
8310+
- MESSAGING_SPANS
8311+
library_link: https://nats.io/
82958312
source_path: instrumentation/nats/nats-2.17
82968313
scope:
82978314
name: io.opentelemetry.nats-2.17
@@ -8302,7 +8319,8 @@ libraries:
83028319
- io.nats:jnats:2.17.2
83038320
configurations:
83048321
- name: otel.instrumentation.messaging.experimental.capture-headers
8305-
description: Allows configuring headers to capture as span attributes.
8322+
description: |
8323+
Enables capturing messaging headers as span attributes. Provide a comma-separated list of header names to capture.
83068324
type: list
83078325
default: ''
83088326
telemetry:
@@ -8342,13 +8360,63 @@ libraries:
83428360
type: STRING
83438361
netty:
83448362
- name: netty-3.8
8363+
display_name: Netty HTTP codec
8364+
description: |
8365+
This instrumentation enables HTTP client spans, HTTP client metrics, HTTP server spans, and HTTP server metrics for the Netty framework.
8366+
semantic_conventions:
8367+
- HTTP_CLIENT_SPANS
8368+
- HTTP_CLIENT_METRICS
8369+
- HTTP_SERVER_SPANS
8370+
- HTTP_SERVER_METRICS
8371+
library_link: https://netty.io/
83458372
source_path: instrumentation/netty/netty-3.8
83468373
scope:
83478374
name: io.opentelemetry.netty-3.8
83488375
schema_url: https://opentelemetry.io/schemas/1.37.0
83498376
target_versions:
83508377
javaagent:
83518378
- io.netty:netty:[3.8.0.Final,4)
8379+
configurations:
8380+
- name: otel.instrumentation.http.known-methods
8381+
description: |
8382+
Configures the instrumentation to recognize an alternative set of HTTP request methods. All other methods will be treated as `_OTHER`.
8383+
type: list
8384+
default: CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE
8385+
- name: otel.instrumentation.http.client.capture-request-headers
8386+
description: List of HTTP request headers to capture in HTTP client telemetry.
8387+
type: list
8388+
default: ''
8389+
- name: otel.instrumentation.http.client.capture-response-headers
8390+
description: List of HTTP response headers to capture in HTTP client telemetry.
8391+
type: list
8392+
default: ''
8393+
- name: otel.instrumentation.common.peer-service-mapping
8394+
description: Used to specify a mapping from host names or IP addresses to peer
8395+
services.
8396+
type: map
8397+
default: ''
8398+
- name: otel.instrumentation.http.client.emit-experimental-telemetry
8399+
description: |
8400+
Enable the capture of experimental HTTP client telemetry. Adds the `http.request.body.size` and `http.response.body.size` attributes to spans, and records `http.client.request.size` and `http.client.response.size` metrics.
8401+
type: boolean
8402+
default: false
8403+
- name: otel.instrumentation.http.client.experimental.redact-query-parameters
8404+
description: Redact sensitive URL parameters. See https://opentelemetry.io/docs/specs/semconv/http/http-spans.
8405+
type: boolean
8406+
default: true
8407+
- name: otel.instrumentation.http.server.capture-request-headers
8408+
description: List of HTTP request headers to capture in HTTP server telemetry.
8409+
type: list
8410+
default: ''
8411+
- name: otel.instrumentation.http.server.capture-response-headers
8412+
description: List of HTTP response headers to capture in HTTP server telemetry.
8413+
type: list
8414+
default: ''
8415+
- name: otel.instrumentation.http.server.emit-experimental-telemetry
8416+
description: |
8417+
Enable the capture of experimental HTTP server telemetry. Adds the `http.request.body.size` and `http.response.body.size` attributes to spans, and records `http.server.request.size` and `http.server.response.size` metrics.
8418+
type: boolean
8419+
default: false
83528420
telemetry:
83538421
- when: default
83548422
metrics:
@@ -8436,6 +8504,15 @@ libraries:
84368504
- name: user_agent.original
84378505
type: STRING
84388506
- name: netty-4.0
8507+
display_name: Netty HTTP codec
8508+
description: |
8509+
This instrumentation enables HTTP client spans, HTTP client metrics, HTTP server spans, and HTTP server metrics for the Netty framework.
8510+
semantic_conventions:
8511+
- HTTP_CLIENT_SPANS
8512+
- HTTP_CLIENT_METRICS
8513+
- HTTP_SERVER_SPANS
8514+
- HTTP_SERVER_METRICS
8515+
library_link: https://netty.io/
84398516
source_path: instrumentation/netty/netty-4.0
84408517
scope:
84418518
name: io.opentelemetry.netty-4.0
@@ -8445,12 +8522,52 @@ libraries:
84458522
- io.netty:netty-all:[4.0.0.Final,4.1.0.Final)
84468523
- io.netty:netty-codec-http:[4.0.0.Final,4.1.0.Final)
84478524
configurations:
8525+
- name: otel.instrumentation.http.known-methods
8526+
description: |
8527+
Configures the instrumentation to recognize an alternative set of HTTP request methods. All other methods will be treated as `_OTHER`.
8528+
type: list
8529+
default: CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE
8530+
- name: otel.instrumentation.http.client.capture-request-headers
8531+
description: List of HTTP request headers to capture in HTTP client telemetry.
8532+
type: list
8533+
default: ''
8534+
- name: otel.instrumentation.http.client.capture-response-headers
8535+
description: List of HTTP response headers to capture in HTTP client telemetry.
8536+
type: list
8537+
default: ''
8538+
- name: otel.instrumentation.common.peer-service-mapping
8539+
description: Used to specify a mapping from host names or IP addresses to peer
8540+
services.
8541+
type: map
8542+
default: ''
8543+
- name: otel.instrumentation.http.client.emit-experimental-telemetry
8544+
description: |
8545+
Enable the capture of experimental HTTP client telemetry. Adds the `http.request.body.size` and `http.response.body.size` attributes to spans, and records `http.client.request.size` and `http.client.response.size` metrics.
8546+
type: boolean
8547+
default: false
8548+
- name: otel.instrumentation.http.client.experimental.redact-query-parameters
8549+
description: Redact sensitive URL parameters. See https://opentelemetry.io/docs/specs/semconv/http/http-spans.
8550+
type: boolean
8551+
default: true
8552+
- name: otel.instrumentation.http.server.capture-request-headers
8553+
description: List of HTTP request headers to capture in HTTP server telemetry.
8554+
type: list
8555+
default: ''
8556+
- name: otel.instrumentation.http.server.capture-response-headers
8557+
description: List of HTTP response headers to capture in HTTP server telemetry.
8558+
type: list
8559+
default: ''
8560+
- name: otel.instrumentation.http.server.emit-experimental-telemetry
8561+
description: |
8562+
Enable the capture of experimental HTTP server telemetry. Adds the `http.request.body.size` and `http.response.body.size` attributes to spans, and records `http.server.request.size` and `http.server.response.size` metrics.
8563+
type: boolean
8564+
default: false
84488565
- name: otel.instrumentation.netty.connection-telemetry.enabled
8449-
description: Enable the creation of Connect and DNS spans
8566+
description: Enable the creation of Connect and DNS spans.
84508567
type: boolean
84518568
default: false
84528569
- name: otel.instrumentation.netty.ssl-telemetry.enabled
8453-
description: Enable SSL telemetry
8570+
description: Enable SSL telemetry.
84548571
type: boolean
84558572
default: false
84568573
telemetry:
@@ -8540,6 +8657,15 @@ libraries:
85408657
- name: user_agent.original
85418658
type: STRING
85428659
- name: netty-4.1
8660+
display_name: Netty HTTP codec
8661+
description: |
8662+
This instrumentation enables HTTP client spans, HTTP client metrics, HTTP server spans, and HTTP server metrics for the Netty framework. Does not currently support capturing HTTP/2 traffic.
8663+
semantic_conventions:
8664+
- HTTP_CLIENT_SPANS
8665+
- HTTP_CLIENT_METRICS
8666+
- HTTP_SERVER_SPANS
8667+
- HTTP_SERVER_METRICS
8668+
library_link: https://netty.io/
85438669
source_path: instrumentation/netty/netty-4.1
85448670
scope:
85458671
name: io.opentelemetry.netty-4.1
@@ -8551,12 +8677,52 @@ libraries:
85518677
library:
85528678
- io.netty:netty-codec-http:4.1.0.Final
85538679
configurations:
8680+
- name: otel.instrumentation.http.known-methods
8681+
description: |
8682+
Configures the instrumentation to recognize an alternative set of HTTP request methods. All other methods will be treated as `_OTHER`.
8683+
type: list
8684+
default: CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE
8685+
- name: otel.instrumentation.http.client.capture-request-headers
8686+
description: List of HTTP request headers to capture in HTTP client telemetry.
8687+
type: list
8688+
default: ''
8689+
- name: otel.instrumentation.http.client.capture-response-headers
8690+
description: List of HTTP response headers to capture in HTTP client telemetry.
8691+
type: list
8692+
default: ''
8693+
- name: otel.instrumentation.common.peer-service-mapping
8694+
description: Used to specify a mapping from host names or IP addresses to peer
8695+
services.
8696+
type: map
8697+
default: ''
8698+
- name: otel.instrumentation.http.client.emit-experimental-telemetry
8699+
description: |
8700+
Enable the capture of experimental HTTP client telemetry. Adds the `http.request.body.size` and `http.response.body.size` attributes to spans, and records `http.client.request.size` and `http.client.response.size` metrics.
8701+
type: boolean
8702+
default: false
8703+
- name: otel.instrumentation.http.client.experimental.redact-query-parameters
8704+
description: Redact sensitive URL parameters. See https://opentelemetry.io/docs/specs/semconv/http/http-spans.
8705+
type: boolean
8706+
default: true
8707+
- name: otel.instrumentation.http.server.capture-request-headers
8708+
description: List of HTTP request headers to capture in HTTP server telemetry.
8709+
type: list
8710+
default: ''
8711+
- name: otel.instrumentation.http.server.capture-response-headers
8712+
description: List of HTTP response headers to capture in HTTP server telemetry.
8713+
type: list
8714+
default: ''
8715+
- name: otel.instrumentation.http.server.emit-experimental-telemetry
8716+
description: |
8717+
Enable the capture of experimental HTTP server telemetry. Adds the `http.request.body.size` and `http.response.body.size` attributes to spans, and records `http.server.request.size` and `http.server.response.size` metrics.
8718+
type: boolean
8719+
default: false
85548720
- name: otel.instrumentation.netty.connection-telemetry.enabled
8555-
description: Enable the creation of Connect and DNS spans
8721+
description: Enable the creation of Connect and DNS spans.
85568722
type: boolean
85578723
default: false
85588724
- name: otel.instrumentation.netty.ssl-telemetry.enabled
8559-
description: Enable SSL telemetry
8725+
description: Enable SSL telemetry.
85608726
type: boolean
85618727
default: false
85628728
telemetry:

instrumentation-docs/instrumentations.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ readonly INSTRUMENTATIONS=(
166166
"lettuce:lettuce-5.0:javaagent:testStableSemconv"
167167
"lettuce:lettuce-5.1:javaagent:test"
168168
"lettuce:lettuce-5.1:javaagent:testStableSemconv"
169+
"mybatis-3.2:javaagent:test"
169170
"nats:nats-2.17:javaagent:test"
170171
"nats:nats-2.17:javaagent:testExperimental"
171172
"netty:netty-3.8:javaagent:test"

instrumentation/mybatis-3.2/javaagent/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ dependencies {
1919

2020
tasks.withType<Test>().configureEach {
2121
jvmArgs("-Dotel.instrumentation.mybatis.enabled=true")
22+
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
2223

2324
// required on jdk17
2425
jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
display_name: MyBatis
2+
description: This instrumentation enables spans for MyBatis mapper method executions.
13
disabled_by_default: true
4+
library_link: https://mybatis.org/mybatis-3/
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
disabled_by_default: false
2-
description: This instrumentation provides messaging spans for NATS
1+
display_name: NATS Client
2+
description: This instrumentation enables messaging spans for NATS message producers and consumers.
3+
semantic_conventions:
4+
- MESSAGING_SPANS
5+
library_link: https://nats.io/
36
configurations:
47
- name: otel.instrumentation.messaging.experimental.capture-headers
5-
description: Allows configuring headers to capture as span attributes.
8+
description: >
9+
Enables capturing messaging headers as span attributes. Provide a comma-separated list of
10+
header names to capture.
611
type: list
712
default: ''
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
display_name: Netty HTTP codec
2+
description: >
3+
This instrumentation enables HTTP client spans, HTTP client metrics, HTTP server spans, and HTTP
4+
server metrics for the Netty framework.
5+
semantic_conventions:
6+
- HTTP_CLIENT_SPANS
7+
- HTTP_CLIENT_METRICS
8+
- HTTP_SERVER_SPANS
9+
- HTTP_SERVER_METRICS
10+
library_link: https://netty.io/
11+
configurations:
12+
- name: otel.instrumentation.http.known-methods
13+
description: >
14+
Configures the instrumentation to recognize an alternative set of HTTP request methods. All
15+
other methods will be treated as `_OTHER`.
16+
type: list
17+
default: "CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE"
18+
- name: otel.instrumentation.http.client.capture-request-headers
19+
description: List of HTTP request headers to capture in HTTP client telemetry.
20+
type: list
21+
default: ""
22+
- name: otel.instrumentation.http.client.capture-response-headers
23+
description: List of HTTP response headers to capture in HTTP client telemetry.
24+
type: list
25+
default: ""
26+
- name: otel.instrumentation.common.peer-service-mapping
27+
description: Used to specify a mapping from host names or IP addresses to peer services.
28+
type: map
29+
default: ""
30+
- name: otel.instrumentation.http.client.emit-experimental-telemetry
31+
description: >
32+
Enable the capture of experimental HTTP client telemetry. Adds the `http.request.body.size`
33+
and `http.response.body.size` attributes to spans, and records `http.client.request.size` and
34+
`http.client.response.size` metrics.
35+
type: boolean
36+
default: false
37+
- name: otel.instrumentation.http.client.experimental.redact-query-parameters
38+
description: Redact sensitive URL parameters. See https://opentelemetry.io/docs/specs/semconv/http/http-spans.
39+
type: boolean
40+
default: true
41+
- name: otel.instrumentation.http.server.capture-request-headers
42+
description: List of HTTP request headers to capture in HTTP server telemetry.
43+
type: list
44+
default: ""
45+
- name: otel.instrumentation.http.server.capture-response-headers
46+
description: List of HTTP response headers to capture in HTTP server telemetry.
47+
type: list
48+
default: ""
49+
- name: otel.instrumentation.http.server.emit-experimental-telemetry
50+
description: >
51+
Enable the capture of experimental HTTP server telemetry. Adds the `http.request.body.size`
52+
and `http.response.body.size` attributes to spans, and records `http.server.request.size` and
53+
`http.server.response.size` metrics.
54+
type: boolean
55+
default: false

0 commit comments

Comments
 (0)