Skip to content

Commit 0539d50

Browse files
authored
Merge branch 'open-telemetry:main' into patch-1
2 parents b62c526 + 2aaa7b1 commit 0539d50

File tree

18 files changed

+77
-22
lines changed

18 files changed

+77
-22
lines changed

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

-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ class JavaagentTestArgumentsProvider(
8585
// Reduce noise in assertion messages since we don't need to verify this in most tests. We check
8686
// in smoke tests instead.
8787
"-Dotel.javaagent.add-thread-details=false",
88-
"-Dotel.metrics.exporter=otlp",
8988
"-Dotel.javaagent.experimental.indy=${findProperty("testIndy") == "true"}",
9089
// suppress repeated logging of "No metric data to export - skipping export."
9190
// since PeriodicMetricReader is configured with a short interval

docs/supported-libraries.md

+1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ These are the supported libraries and frameworks:
100100
| [OSHI](https://github.com/oshi/oshi/) | 5.3.1+ | [opentelemetry-oshi](../instrumentation/oshi/library) | [System Metrics] (partial support) |
101101
| [Play MVC](https://github.com/playframework/playframework) | 2.4+ | N/A | Provides `http.route` [2], Controller Spans [3] |
102102
| [Play WS](https://github.com/playframework/play-ws) | 1.0+ | N/A | [HTTP Client Spans], [HTTP Client Metrics] |
103+
| [Quarkus Resteasy Reactive](https://quarkus.io/extensions/io.quarkus/quarkus-resteasy-reactive/) | 2.16.7+ | N/A | Provides `http.route` [2] |
103104
| [Quartz](https://www.quartz-scheduler.org/) | 2.0+ | [opentelemetry-quartz-2.0](../instrumentation/quartz-2.0/library) | none |
104105
| [R2DBC](https://r2dbc.io/) | 1.0+ | [opentelemetry-r2dbc-1.0](../instrumentation/r2dbc-1.0/library) | [Database Client Spans] |
105106
| [RabbitMQ Client](https://github.com/rabbitmq/rabbitmq-java-client) | 2.7+ | N/A | [Messaging Spans] |

examples/distro/gradle/instrumentation.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ tasks.withType(Test).configureEach {
5252
jvmArgs "-Dotel.javaagent.testing.fail-on-context-leak=true"
5353
// prevent sporadic gradle deadlocks, see SafeLogger for more details
5454
jvmArgs "-Dotel.javaagent.testing.transform-safe-logging.enabled=true"
55-
jvmArgs "-Dotel.metrics.exporter=otlp"
5655

5756
dependsOn shadowJar
5857
dependsOn configurations.testAgent.buildDependencies

examples/distro/smoke-tests/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
dependencies {
66
testImplementation("org.testcontainers:testcontainers:1.19.3")
77
testImplementation("com.fasterxml.jackson.core:jackson-databind:2.16.1")
8-
testImplementation("com.google.protobuf:protobuf-java-util:3.25.1")
8+
testImplementation("com.google.protobuf:protobuf-java-util:3.25.2")
99
testImplementation("com.squareup.okhttp3:okhttp:4.12.0")
1010
testImplementation("io.opentelemetry.proto:opentelemetry-proto:1.0.0-alpha")
1111
testImplementation("io.opentelemetry:opentelemetry-api")

examples/extension/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ dependencies {
101101
//All dependencies below are only for tests
102102
testImplementation("org.testcontainers:testcontainers:1.19.3")
103103
testImplementation("com.fasterxml.jackson.core:jackson-databind:2.16.1")
104-
testImplementation("com.google.protobuf:protobuf-java-util:3.25.1")
104+
testImplementation("com.google.protobuf:protobuf-java-util:3.25.2")
105105
testImplementation("com.squareup.okhttp3:okhttp:4.12.0")
106106
testImplementation("io.opentelemetry:opentelemetry-api")
107107
testImplementation("io.opentelemetry.proto:opentelemetry-proto:1.0.0-alpha")

instrumentation/jaxrs/jaxrs-1.0/javaagent/build.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ dependencies {
2525
testImplementation("io.dropwizard:dropwizard-testing:0.7.1")
2626
testImplementation("javax.xml.bind:jaxb-api:2.2.3")
2727
}
28+
2829
tasks.withType<Test>().configureEach {
2930
jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true")
3031
}

instrumentation/jaxrs/jaxrs-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jaxrs/v1_0/JaxrsInstrumentationModule.java

+10
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
import static net.bytebuddy.matcher.ElementMatchers.not;
1111

1212
import com.google.auto.service.AutoService;
13+
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
1314
import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule;
1415
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;
16+
import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties;
1517
import java.util.List;
1618
import net.bytebuddy.matcher.ElementMatcher;
1719

@@ -31,4 +33,12 @@ public ElementMatcher.Junction<ClassLoader> classLoaderMatcher() {
3133
public List<TypeInstrumentation> typeInstrumentations() {
3234
return singletonList(new JaxrsAnnotationsInstrumentation());
3335
}
36+
37+
@Override
38+
public boolean defaultEnabled(ConfigProperties config) {
39+
// This instrumentation produces controller telemetry and sets http route. Http route is set by
40+
// this instrumentation only when it was not already set by a jax-rs framework instrumentation.
41+
// This instrumentation uses complex type matcher, disabling it can improve startup performance.
42+
return ExperimentalConfig.get().controllerTelemetryEnabled();
43+
}
3444
}

instrumentation/jaxrs/jaxrs-2.0/jaxrs-2.0-annotations/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jaxrs/v2_0/JaxrsAnnotationsInstrumentationModule.java

+10
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
import static java.util.Arrays.asList;
1010

1111
import com.google.auto.service.AutoService;
12+
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
1213
import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule;
1314
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;
15+
import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties;
1416
import java.util.List;
1517
import net.bytebuddy.matcher.ElementMatcher;
1618

@@ -34,4 +36,12 @@ public List<TypeInstrumentation> typeInstrumentations() {
3436
new JaxrsAnnotationsInstrumentation(),
3537
new JaxrsAsyncResponseInstrumentation());
3638
}
39+
40+
@Override
41+
public boolean defaultEnabled(ConfigProperties config) {
42+
// This instrumentation produces controller telemetry and sets http route. Http route is set by
43+
// this instrumentation only when it was not already set by a jax-rs framework instrumentation.
44+
// This instrumentation uses complex type matcher, disabling it can improve startup performance.
45+
return ExperimentalConfig.get().controllerTelemetryEnabled();
46+
}
3747
}

instrumentation/jaxrs/jaxrs-3.0/jaxrs-3.0-annotations/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jaxrs/v3_0/JaxrsAnnotationsInstrumentationModule.java

+10
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
import static java.util.Arrays.asList;
1010

1111
import com.google.auto.service.AutoService;
12+
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
1213
import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule;
1314
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;
15+
import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties;
1416
import java.util.List;
1517
import net.bytebuddy.matcher.ElementMatcher;
1618

@@ -34,4 +36,12 @@ public List<TypeInstrumentation> typeInstrumentations() {
3436
new JaxrsAnnotationsInstrumentation(),
3537
new JaxrsAsyncResponseInstrumentation());
3638
}
39+
40+
@Override
41+
public boolean defaultEnabled(ConfigProperties config) {
42+
// This instrumentation produces controller telemetry and sets http route. Http route is set by
43+
// this instrumentation only when it was not already set by a jax-rs framework instrumentation.
44+
// This instrumentation uses complex type matcher, disabling it can improve startup performance.
45+
return ExperimentalConfig.get().controllerTelemetryEnabled();
46+
}
3747
}

instrumentation/jaxws/jaxws-jws-api-1.1/javaagent/build.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ dependencies {
1414
library("javax.jws:javax.jws-api:1.1")
1515
implementation(project(":instrumentation:jaxws:jaxws-common:javaagent"))
1616
}
17+
1718
tasks.withType<Test>().configureEach {
1819
jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true")
1920
}

instrumentation/jaxws/jaxws-jws-api-1.1/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jaxws/jws/v1_1/JwsInstrumentationModule.java

+8
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
package io.opentelemetry.javaagent.instrumentation.jaxws.jws.v1_1;
77

88
import com.google.auto.service.AutoService;
9+
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
910
import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule;
1011
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;
12+
import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties;
1113
import java.util.Collections;
1214
import java.util.List;
1315

@@ -22,4 +24,10 @@ public JwsInstrumentationModule() {
2224
public List<TypeInstrumentation> typeInstrumentations() {
2325
return Collections.singletonList(new JwsAnnotationsInstrumentation());
2426
}
27+
28+
@Override
29+
public boolean defaultEnabled(ConfigProperties config) {
30+
// this instrumentation only produces controller telemetry
31+
return ExperimentalConfig.get().controllerTelemetryEnabled();
32+
}
2533
}
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Settings for the Micrometer bridge instrumentation
22

33
| System property | Type | Default | Description |
4-
| ---------------------------------------------------------- | ------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
4+
| ---------------------------------------------------------- |---------| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
55
| `otel.instrumentation.micrometer.base-time-unit` | String | `s` | Set the base time unit for the OpenTelemetry `MeterRegistry` implementation. <details><summary>Valid values</summary>`ns`, `nanoseconds`, `us`, `microseconds`, `ms`, `milliseconds`, `s`, `seconds`, `min`, `minutes`, `h`, `hours`, `d`, `days`</details> |
6-
| `otel.instrumentation.micrometer.prometheus-mode.enabled` | boolean | false | Enable the "Prometheus mode" this will simulate the behavior of Micrometer's PrometheusMeterRegistry. The instruments will be renamed to match Micrometer instrument naming, and the base time unit will be set to seconds. |
7-
| `otel.instrumentation.micrometer.histogram-gauges.enabled` | boolean | false | Enables the generation of gauge-based Micrometer histograms for `DistributionSummary` and `Timer` instruments. |
6+
| `otel.instrumentation.micrometer.prometheus-mode.enabled` | Boolean | `false` | Enable the "Prometheus mode" this will simulate the behavior of Micrometer's PrometheusMeterRegistry. The instruments will be renamed to match Micrometer instrument naming, and the base time unit will be set to seconds. |
7+
| `otel.instrumentation.micrometer.histogram-gauges.enabled` | Boolean | `false` | Enables the generation of gauge-based Micrometer histograms for `DistributionSummary` and `Timer` instruments. |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Settings for the Runtime Telemetry instrumentation
2+
3+
| System property | Type | Default | Description |
4+
|--------------------------------------------------------------------------|---------|---------|-------------------------------------------------------------------|
5+
| `otel.instrumentation.runtime-telemetry.emit-experimental-telemetry` | Boolean | `false` | Enable the capture of experimental metrics. |
6+
| `otel.instrumentation.runtime-telemetry-java17.enable-all` | Boolean | `false` | Enable the capture of all JFR based metrics. |
7+
| `otel.instrumentation.runtime-telemetry-java17.enabled` | Boolean | `false` | Enable the capture of JFR based metrics. |
8+
| `otel.instrumentation.runtime-telemetry.package-emitter.enabled` | Boolean | `false` | Enable creating events for JAR libraries used by the application. |
9+
| `otel.instrumentation.runtime-telemetry.package-emitter.jars-per-second` | Integer | 10 | The number of JAR files processed per second. |

0 commit comments

Comments
 (0)