Skip to content

Commit 34127f6

Browse files
authored
Merge branch 'main' into http-request-response-wrappers
2 parents a5ae582 + 4980689 commit 34127f6

File tree

158 files changed

+726
-284
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+726
-284
lines changed

benchmark-overhead/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ Currently, we test:
7979
- no agent versus latest released agent
8080
- no agent versus latest snapshot
8181
- latest release vs. latest snapshot
82+
- latest snapshot with indy enabled
8283

8384
Additional configurations can be created by submitting a PR against the `Configs` class.
8485

benchmark-overhead/src/test/java/io/opentelemetry/agents/Agent.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ public class Agent {
2222
new Agent("latest", "latest mainstream release", OTEL_LATEST);
2323
public static final Agent LATEST_SNAPSHOT =
2424
new Agent("snapshot", "latest available snapshot version from main");
25+
public static final Agent LATEST_SNAPSHOT_INDY =
26+
new Agent(
27+
"snapshot-indy",
28+
"latest available snapshot version from main with indy enabled",
29+
null,
30+
Collections.singletonList("-Dotel.javaagent.experimental.indy=true"));
2531

2632
private final String name;
2733
private final String description;

benchmark-overhead/src/test/java/io/opentelemetry/agents/AgentResolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public Optional<Path> resolve(Agent agent) throws Exception {
2424
if (Agent.NONE.equals(agent)) {
2525
return Optional.empty();
2626
}
27-
if (Agent.LATEST_SNAPSHOT.equals(agent)) {
27+
if (Agent.LATEST_SNAPSHOT.equals(agent) || Agent.LATEST_SNAPSHOT_INDY.equals(agent)) {
2828
return snapshotResolver.resolve();
2929
}
3030
if (agent.hasUrl()) {

benchmark-overhead/src/test/java/io/opentelemetry/config/Configs.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ public enum Configs {
1515
TestConfig.builder()
1616
.name("release")
1717
.description("compares no agent, latest stable, and latest snapshot agents")
18-
.withAgents(Agent.NONE, Agent.LATEST_RELEASE, Agent.LATEST_SNAPSHOT)
18+
.withAgents(
19+
Agent.NONE, Agent.LATEST_RELEASE, Agent.LATEST_SNAPSHOT, Agent.LATEST_SNAPSHOT_INDY)
1920
.warmupSeconds(60)
2021
.build());
2122

conventions/src/main/kotlin/io.opentelemetry.instrumentation.library-instrumentation.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,11 @@ dependencies {
1010

1111
testImplementation("io.opentelemetry.javaagent:opentelemetry-testing-common")
1212
}
13+
14+
testing {
15+
suites.withType(JvmTestSuite::class).configureEach {
16+
dependencies {
17+
implementation("io.opentelemetry.javaagent:opentelemetry-testing-common")
18+
}
19+
}
20+
}

conventions/src/main/kotlin/otel.java-conventions.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ configurations.configureEach {
467467
substitute(module("io.opentelemetry.javaagent:opentelemetry-javaagent-extension-api")).using(project(":javaagent-extension-api"))
468468
substitute(module("io.opentelemetry.javaagent:opentelemetry-javaagent-tooling")).using(project(":javaagent-tooling"))
469469
substitute(module("io.opentelemetry.javaagent:opentelemetry-agent-for-testing")).using(project(":testing:agent-for-testing"))
470-
substitute(module("io.opentelemetry.javaagent:opentelemetry-testing-common")).using(project(":testing-common"))
470+
substitute(module("io.opentelemetry.javaagent:opentelemetry-testing-common")).using(project(":testing-common:with-shaded-dependencies"))
471471
substitute(module("io.opentelemetry.javaagent:opentelemetry-muzzle")).using(project(":muzzle"))
472472
substitute(module("io.opentelemetry.javaagent:opentelemetry-javaagent")).using(project(":javaagent"))
473473
}

dependencyManagement/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
data class DependencySet(val group: String, val version: String, val modules: List<String>)
66

77
// this line is managed by .github/scripts/update-sdk-version.sh
8-
val otelSdkVersion = "1.55.0"
8+
val otelSdkVersion = "1.56.0"
99
val otelContribVersion = "1.51.0-alpha"
1010
val otelSdkAlphaVersion = otelSdkVersion.replaceFirst("(-SNAPSHOT)?$".toRegex(), "-alpha$1")
1111

docs/instrumentation-list.yaml

Lines changed: 84 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,9 +1170,88 @@ libraries:
11701170
- name: server.port
11711171
type: LONG
11721172
async:
1173+
- name: async-http-client-1.8
1174+
display_name: AsyncHttpClient
1175+
description: |
1176+
This instrumentation enables HTTP client spans and HTTP client metrics for the AsyncHttpClient HTTP client.
1177+
semantic_conventions:
1178+
- HTTP_CLIENT_SPANS
1179+
- HTTP_CLIENT_METRICS
1180+
library_link: https://github.com/AsyncHttpClient/async-http-client
1181+
source_path: instrumentation/async-http-client/async-http-client-1.8
1182+
scope:
1183+
name: io.opentelemetry.async-http-client-1.8
1184+
schema_url: https://opentelemetry.io/schemas/1.37.0
1185+
target_versions:
1186+
javaagent:
1187+
- com.ning:async-http-client:[1.8.0,1.9.0)
1188+
configurations:
1189+
- name: otel.instrumentation.http.known-methods
1190+
description: |
1191+
Configures the instrumentation to recognize an alternative set of HTTP request methods. All other methods will be treated as `_OTHER`.
1192+
type: list
1193+
default: CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE
1194+
- name: otel.instrumentation.http.client.capture-request-headers
1195+
description: List of HTTP request headers to capture in HTTP client telemetry.
1196+
type: list
1197+
default: ''
1198+
- name: otel.instrumentation.http.client.capture-response-headers
1199+
description: List of HTTP response headers to capture in HTTP client telemetry.
1200+
type: list
1201+
default: ''
1202+
- name: otel.instrumentation.common.peer-service-mapping
1203+
description: Used to specify a mapping from host names or IP addresses to peer
1204+
services.
1205+
type: map
1206+
default: ''
1207+
- name: otel.instrumentation.http.client.emit-experimental-telemetry
1208+
description: |
1209+
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.
1210+
type: boolean
1211+
default: false
1212+
- name: otel.instrumentation.http.client.experimental.redact-query-parameters
1213+
description: Redact sensitive URL parameters. See https://opentelemetry.io/docs/specs/semconv/http/http-spans.
1214+
type: boolean
1215+
default: true
1216+
telemetry:
1217+
- when: default
1218+
metrics:
1219+
- name: http.client.request.duration
1220+
description: Duration of HTTP client requests.
1221+
type: HISTOGRAM
1222+
unit: s
1223+
attributes:
1224+
- name: http.request.method
1225+
type: STRING
1226+
- name: http.response.status_code
1227+
type: LONG
1228+
- name: server.address
1229+
type: STRING
1230+
- name: server.port
1231+
type: LONG
1232+
spans:
1233+
- span_kind: CLIENT
1234+
attributes:
1235+
- name: error.type
1236+
type: STRING
1237+
- name: http.request.method
1238+
type: STRING
1239+
- name: http.request.method_original
1240+
type: STRING
1241+
- name: http.response.status_code
1242+
type: LONG
1243+
- name: peer.service
1244+
type: STRING
1245+
- name: server.address
1246+
type: STRING
1247+
- name: server.port
1248+
type: LONG
1249+
- name: url.full
1250+
type: STRING
11731251
- name: async-http-client-1.9
1174-
description: This instrumentation enables HTTP client spans and HTTP client metrics
1175-
for version 1 of the AsyncHttpClient (AHC) HTTP client.
1252+
display_name: AsyncHttpClient
1253+
description: |
1254+
This instrumentation enables HTTP client spans and HTTP client metrics for the AsyncHttpClient HTTP client.
11761255
semantic_conventions:
11771256
- HTTP_CLIENT_SPANS
11781257
- HTTP_CLIENT_METRICS
@@ -1248,8 +1327,9 @@ libraries:
12481327
- name: url.full
12491328
type: STRING
12501329
- name: async-http-client-2.0
1251-
description: This instrumentation enables HTTP client spans and HTTP client metrics
1252-
for version 2 of the AsyncHttpClient (AHC) HTTP client.
1330+
display_name: AsyncHttpClient
1331+
description: |
1332+
This instrumentation enables HTTP client spans and HTTP client metrics for the AsyncHttpClient HTTP client.
12531333
semantic_conventions:
12541334
- HTTP_CLIENT_SPANS
12551335
- HTTP_CLIENT_METRICS

examples/distro/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The `InstrumenterCustomizerProvider` extension point allows you to customize ins
4444
- Add custom attributes and metrics to existing instrumentations
4545
- Customize context
4646
- Transform span names to match your naming conventions
47-
- Apply customizations conditionally based on instrumentation name
47+
- Apply customizations conditionally based on instrumentation name or type (HTTP client, HTTP server, DB client, etc.)
4848

4949
### I don't want this span at all
5050

examples/distro/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ subprojects {
2727
ext {
2828
versions = [
2929
// this line is managed by .github/scripts/update-sdk-version.sh
30-
opentelemetrySdk : "1.55.0",
30+
opentelemetrySdk : "1.56.0",
3131

3232
// these lines are managed by .github/scripts/update-version.sh
3333
opentelemetryJavaagent : "2.22.0-SNAPSHOT",

0 commit comments

Comments
 (0)