Skip to content

Commit ce7699b

Browse files
committed
use library instead
1 parent a468e83 commit ce7699b

File tree

7 files changed

+188
-16
lines changed

7 files changed

+188
-16
lines changed

docs/instrumentation-list.yaml

Lines changed: 140 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8403,8 +8403,10 @@ libraries:
84038403
type: STRING
84048404
- name: ktor-2.0
84058405
description: |
8406-
This instrumentation enables HTTP client spans and HTTP client metrics for the Ktor HTTP client, and enriches HTTP server spans with route information for the Ktor server.
8406+
This instrumentation provides HTTP server spans and HTTP server metrics for the Ktor server, and HTTP client spans and HTTP client metrics for the Ktor HTTP client.
84078407
semantic_conventions:
8408+
- HTTP_SERVER_SPANS
8409+
- HTTP_SERVER_METRICS
84088410
- HTTP_CLIENT_SPANS
84098411
- HTTP_CLIENT_METRICS
84108412
library_link: https://ktor.io/
@@ -8427,6 +8429,19 @@ libraries:
84278429
Configures the instrumentation to recognize an alternative set of HTTP request methods. All other methods will be treated as `_OTHER`.
84288430
type: list
84298431
default: CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE
8432+
- name: otel.instrumentation.http.server.capture-request-headers
8433+
description: List of HTTP request headers to capture in HTTP server telemetry.
8434+
type: list
8435+
default: ''
8436+
- name: otel.instrumentation.http.server.capture-response-headers
8437+
description: List of HTTP response headers to capture in HTTP server telemetry.
8438+
type: list
8439+
default: ''
8440+
- name: otel.instrumentation.http.server.emit-experimental-telemetry
8441+
description: |
8442+
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.
8443+
type: boolean
8444+
default: false
84308445
- name: otel.instrumentation.http.client.capture-request-headers
84318446
description: List of HTTP request headers to capture in HTTP client telemetry.
84328447
type: list
@@ -8467,6 +8482,21 @@ libraries:
84678482
type: STRING
84688483
- name: server.port
84698484
type: LONG
8485+
- name: http.server.request.duration
8486+
description: Duration of HTTP server requests.
8487+
type: HISTOGRAM
8488+
unit: s
8489+
attributes:
8490+
- name: http.request.method
8491+
type: STRING
8492+
- name: http.response.status_code
8493+
type: LONG
8494+
- name: http.route
8495+
type: STRING
8496+
- name: network.protocol.version
8497+
type: STRING
8498+
- name: url.scheme
8499+
type: STRING
84708500
spans:
84718501
- span_kind: CLIENT
84728502
attributes:
@@ -8482,18 +8512,68 @@ libraries:
84828512
type: LONG
84838513
- name: network.protocol.version
84848514
type: STRING
8485-
- name: peer.service
8486-
type: STRING
84878515
- name: server.address
84888516
type: STRING
84898517
- name: server.port
84908518
type: LONG
84918519
- name: url.full
84928520
type: STRING
8521+
- span_kind: CONSUMER
8522+
attributes:
8523+
- name: client.address
8524+
type: STRING
8525+
- name: http.request.method
8526+
type: STRING
8527+
- name: http.response.status_code
8528+
type: LONG
8529+
- name: network.protocol.version
8530+
type: STRING
8531+
- name: server.address
8532+
type: STRING
8533+
- name: server.port
8534+
type: LONG
8535+
- name: url.path
8536+
type: STRING
8537+
- name: url.query
8538+
type: STRING
8539+
- name: url.scheme
8540+
type: STRING
8541+
- name: user_agent.original
8542+
type: STRING
8543+
- span_kind: SERVER
8544+
attributes:
8545+
- name: client.address
8546+
type: STRING
8547+
- name: error.type
8548+
type: STRING
8549+
- name: http.request.method
8550+
type: STRING
8551+
- name: http.request.method_original
8552+
type: STRING
8553+
- name: http.response.status_code
8554+
type: LONG
8555+
- name: http.route
8556+
type: STRING
8557+
- name: network.protocol.version
8558+
type: STRING
8559+
- name: server.address
8560+
type: STRING
8561+
- name: server.port
8562+
type: LONG
8563+
- name: url.path
8564+
type: STRING
8565+
- name: url.query
8566+
type: STRING
8567+
- name: url.scheme
8568+
type: STRING
8569+
- name: user_agent.original
8570+
type: STRING
84938571
- name: ktor-3.0
84948572
description: |
8495-
This instrumentation enables HTTP client spans and HTTP client metrics for the Ktor HTTP client, and enriches HTTP server spans with route information for the Ktor server.
8573+
This instrumentation provides HTTP server spans and HTTP server metrics for the Ktor server, and HTTP client spans and HTTP client metrics for the Ktor HTTP client.
84968574
semantic_conventions:
8575+
- HTTP_SERVER_SPANS
8576+
- HTTP_SERVER_METRICS
84978577
- HTTP_CLIENT_SPANS
84988578
- HTTP_CLIENT_METRICS
84998579
library_link: https://ktor.io/
@@ -8516,6 +8596,19 @@ libraries:
85168596
Configures the instrumentation to recognize an alternative set of HTTP request methods. All other methods will be treated as `_OTHER`.
85178597
type: list
85188598
default: CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE
8599+
- name: otel.instrumentation.http.server.capture-request-headers
8600+
description: List of HTTP request headers to capture in HTTP server telemetry.
8601+
type: list
8602+
default: ''
8603+
- name: otel.instrumentation.http.server.capture-response-headers
8604+
description: List of HTTP response headers to capture in HTTP server telemetry.
8605+
type: list
8606+
default: ''
8607+
- name: otel.instrumentation.http.server.emit-experimental-telemetry
8608+
description: |
8609+
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.
8610+
type: boolean
8611+
default: false
85198612
- name: otel.instrumentation.http.client.capture-request-headers
85208613
description: List of HTTP request headers to capture in HTTP client telemetry.
85218614
type: list
@@ -8556,6 +8649,21 @@ libraries:
85568649
type: STRING
85578650
- name: server.port
85588651
type: LONG
8652+
- name: http.server.request.duration
8653+
description: Duration of HTTP server requests.
8654+
type: HISTOGRAM
8655+
unit: s
8656+
attributes:
8657+
- name: http.request.method
8658+
type: STRING
8659+
- name: http.response.status_code
8660+
type: LONG
8661+
- name: http.route
8662+
type: STRING
8663+
- name: network.protocol.version
8664+
type: STRING
8665+
- name: url.scheme
8666+
type: STRING
85598667
spans:
85608668
- span_kind: CLIENT
85618669
attributes:
@@ -8571,14 +8679,40 @@ libraries:
85718679
type: LONG
85728680
- name: network.protocol.version
85738681
type: STRING
8574-
- name: peer.service
8575-
type: STRING
85768682
- name: server.address
85778683
type: STRING
85788684
- name: server.port
85798685
type: LONG
85808686
- name: url.full
85818687
type: STRING
8688+
- span_kind: SERVER
8689+
attributes:
8690+
- name: client.address
8691+
type: STRING
8692+
- name: error.type
8693+
type: STRING
8694+
- name: http.request.method
8695+
type: STRING
8696+
- name: http.request.method_original
8697+
type: STRING
8698+
- name: http.response.status_code
8699+
type: LONG
8700+
- name: http.route
8701+
type: STRING
8702+
- name: network.protocol.version
8703+
type: STRING
8704+
- name: server.address
8705+
type: STRING
8706+
- name: server.port
8707+
type: LONG
8708+
- name: url.path
8709+
type: STRING
8710+
- name: url.query
8711+
type: STRING
8712+
- name: url.scheme
8713+
type: STRING
8714+
- name: user_agent.original
8715+
type: STRING
85828716
kubernetes:
85838717
- name: kubernetes-client-7.0
85848718
source_path: instrumentation/kubernetes-client-7.0

instrumentation-docs/instrumentations.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ readonly INSTRUMENTATIONS=(
149149
"kafka:kafka-clients:kafka-clients-2.6:library:test"
150150
"kafka:kafka-connect-2.6:testing:test"
151151
"ktor:ktor-1.0:library:test"
152-
"ktor:ktor-2.0:javaagent:test"
153-
"ktor:ktor-3.0:javaagent:test"
152+
"ktor:ktor-2.0:library:test"
153+
"ktor:ktor-3.0:library:test"
154154
"nats:nats-2.17:javaagent:test"
155155
"nats:nats-2.17:javaagent:testExperimental"
156156
"netty:netty-3.8:javaagent:test"

instrumentation/ktor/ktor-2.0/library/build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,7 @@ kotlin {
3737
languageVersion.set(KotlinVersion.KOTLIN_1_8)
3838
}
3939
}
40+
41+
tasks.test {
42+
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
43+
}

instrumentation/ktor/ktor-2.0/metadata.yaml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
description: >
2-
This instrumentation enables HTTP client spans and HTTP client metrics for the Ktor HTTP
3-
client, and enriches HTTP server spans with route information for the Ktor server.
2+
This instrumentation provides HTTP server spans and HTTP server metrics for the Ktor server,
3+
and HTTP client spans and HTTP client metrics for the Ktor HTTP client.
44
semantic_conventions:
5+
- HTTP_SERVER_SPANS
6+
- HTTP_SERVER_METRICS
57
- HTTP_CLIENT_SPANS
68
- HTTP_CLIENT_METRICS
79
features:
@@ -14,6 +16,21 @@ configurations:
1416
other methods will be treated as `_OTHER`.
1517
type: list
1618
default: "CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE"
19+
- name: otel.instrumentation.http.server.capture-request-headers
20+
description: List of HTTP request headers to capture in HTTP server telemetry.
21+
type: list
22+
default: ""
23+
- name: otel.instrumentation.http.server.capture-response-headers
24+
description: List of HTTP response headers to capture in HTTP server telemetry.
25+
type: list
26+
default: ""
27+
- name: otel.instrumentation.http.server.emit-experimental-telemetry
28+
description: >
29+
Enable the capture of experimental HTTP server telemetry. Adds the `http.request.body.size`
30+
and `http.response.body.size` attributes to spans, and records `http.server.request.size` and
31+
`http.server.response.size` metrics.
32+
type: boolean
33+
default: false
1734
- name: otel.instrumentation.http.client.capture-request-headers
1835
description: List of HTTP request headers to capture in HTTP client telemetry.
1936
type: list

instrumentation/ktor/ktor-3.0/javaagent/build.gradle.kts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,3 @@ kotlin {
5454
javaParameters = true
5555
}
5656
}
57-
58-
tasks.test {
59-
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
60-
}

instrumentation/ktor/ktor-3.0/library/build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,7 @@ kotlin {
3232
languageVersion.set(KotlinVersion.KOTLIN_1_8)
3333
}
3434
}
35+
36+
tasks.test {
37+
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
38+
}

instrumentation/ktor/ktor-3.0/metadata.yaml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
description: >
2-
This instrumentation enables HTTP client spans and HTTP client metrics for the Ktor HTTP
3-
client, and enriches HTTP server spans with route information for the Ktor server.
2+
This instrumentation provides HTTP server spans and HTTP server metrics for the Ktor server,
3+
and HTTP client spans and HTTP client metrics for the Ktor HTTP client.
44
semantic_conventions:
5+
- HTTP_SERVER_SPANS
6+
- HTTP_SERVER_METRICS
57
- HTTP_CLIENT_SPANS
68
- HTTP_CLIENT_METRICS
79
features:
@@ -14,6 +16,21 @@ configurations:
1416
other methods will be treated as `_OTHER`.
1517
type: list
1618
default: "CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE"
19+
- name: otel.instrumentation.http.server.capture-request-headers
20+
description: List of HTTP request headers to capture in HTTP server telemetry.
21+
type: list
22+
default: ""
23+
- name: otel.instrumentation.http.server.capture-response-headers
24+
description: List of HTTP response headers to capture in HTTP server telemetry.
25+
type: list
26+
default: ""
27+
- name: otel.instrumentation.http.server.emit-experimental-telemetry
28+
description: >
29+
Enable the capture of experimental HTTP server telemetry. Adds the `http.request.body.size`
30+
and `http.response.body.size` attributes to spans, and records `http.server.request.size` and
31+
`http.server.response.size` metrics.
32+
type: boolean
33+
default: false
1734
- name: otel.instrumentation.http.client.capture-request-headers
1835
description: List of HTTP request headers to capture in HTTP client telemetry.
1936
type: list

0 commit comments

Comments
 (0)