Skip to content

Commit 30c467b

Browse files
committed
Merge branch 'main' into redis-lettuce-noisy-span-events
2 parents c8640e6 + 38c2b69 commit 30c467b

File tree

139 files changed

+4323
-3375
lines changed

Some content is hidden

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

139 files changed

+4323
-3375
lines changed

benchmark-overhead/Dockerfile.petclinic

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ RUN git checkout 8aa4d49
1313
RUN ./mvnw package -Dmaven.test.skip=true
1414
RUN cp target/spring-petclinic-rest*.jar /app/spring-petclinic-rest.jar
1515

16-
FROM bellsoft/liberica-openjdk-alpine:21.0.8@sha256:c4052811bba52c7a06ebde235c839108bf723dfab3c65066f61145a252480b16
16+
FROM bellsoft/liberica-openjdk-alpine:25@sha256:2ef36da2e7dbde0730121d6a5d018d318adaecc1a420bd170031c1453dbf4b6d
1717
COPY --from=app-build /app/spring-petclinic-rest.jar /app/spring-petclinic-rest.jar
1818
WORKDIR /app
1919
EXPOSE 9966

benchmark-overhead/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id("java")
3-
id("com.diffplug.spotless") version "7.2.1"
3+
id("com.diffplug.spotless") version "8.0.0"
44
}
55

66
spotless {

conventions/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
`kotlin-dsl`
33
// When updating, update below in dependencies too
4-
id("com.diffplug.spotless") version "7.2.1"
4+
id("com.diffplug.spotless") version "8.0.0"
55
}
66

77
spotless {
@@ -54,12 +54,12 @@ dependencies {
5454
implementation("org.apache.maven:maven-aether-provider:3.3.9")
5555

5656
// When updating, update above in plugins too
57-
implementation("com.diffplug.spotless:spotless-plugin-gradle:7.2.1")
57+
implementation("com.diffplug.spotless:spotless-plugin-gradle:8.0.0")
5858
implementation("com.google.guava:guava:33.5.0-jre")
59-
implementation("com.gradleup.shadow:shadow-gradle-plugin:9.1.0")
59+
implementation("com.gradleup.shadow:shadow-gradle-plugin:9.2.1")
6060
implementation("org.apache.httpcomponents:httpclient:4.5.14")
6161
implementation("com.gradle.develocity:com.gradle.develocity.gradle.plugin:4.2")
62-
implementation("org.owasp:dependency-check-gradle:12.1.5")
62+
implementation("org.owasp:dependency-check-gradle:12.1.6")
6363
implementation("ru.vyarus:gradle-animalsniffer-plugin:2.0.1")
6464
implementation("org.spdx:spdx-gradle-plugin:0.9.0")
6565
// When updating, also update dependencyManagement/build.gradle.kts

custom-checks/src/test/java/io/opentelemetry/javaagent/customchecks/OtelInternalJavadocTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class OtelInternalJavadocTest {
1414
void test() {
1515
doTest(
1616
"internal/InternalJavadocPositiveCases.java",
17-
"""
17+
"""
1818
package io.opentelemetry.javaagent.customchecks.internal;
1919
2020
// BUG: Diagnostic contains: doesn't end with any of the applicable javadoc disclaimers
@@ -30,7 +30,7 @@ public static class Two {}
3030
""");
3131
doTest(
3232
"internal/InternalJavadocNegativeCases.java",
33-
"""
33+
"""
3434
package io.opentelemetry.javaagent.customchecks.internal;
3535
3636
/**

dependencyManagement/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ val DEPENDENCY_BOMS = listOf(
3737

3838
val autoServiceVersion = "1.1.1"
3939
val autoValueVersion = "1.11.0"
40-
val errorProneVersion = "2.41.0"
40+
val errorProneVersion = "2.42.0"
4141
val byteBuddyVersion = "1.17.7"
4242
val asmVersion = "9.8"
4343
val jmhVersion = "1.37"

docs/contributing/documenting-instrumentation.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,22 @@ configurations:
9696
description: Enables statement sanitization for database queries.
9797
type: boolean
9898
default: true
99+
override_telemetry: false
100+
additional_telemetry:
101+
- when: "default"
102+
metrics:
103+
- name: "metric.name"
104+
description: "Metric description"
105+
type: "COUNTER"
106+
unit: "1"
107+
attributes:
108+
- name: "attribute.name"
109+
type: "STRING"
110+
spans:
111+
- span_kind: "CLIENT"
112+
attributes:
113+
- name: "span.attribute"
114+
type: "STRING"
99115
```
100116
101117
### Description (required)
@@ -205,6 +221,82 @@ If an instrumentation is disabled by default, set `disabled_by_default: true`. T
205221
the instrumentation will not be active unless explicitly enabled by the user. If this field is omitted,
206222
it defaults to `false`, meaning the instrumentation is enabled by default.
207223

224+
### Manual Telemetry Documentation (optional)
225+
226+
You can manually document telemetry metadata (metrics and spans) directly in the `metadata.yaml` file
227+
using the `additional_telemetry` field. This is useful for:
228+
229+
- Documenting telemetry that may not be captured during automated test runs
230+
- Adding telemetry documentation when `.telemetry` files are not available
231+
- Providing additional context or details about emitted telemetry
232+
233+
#### additional_telemetry
234+
235+
The `additional_telemetry` field allows you to specify telemetry metadata organized by configuration
236+
conditions (`when` field):
237+
238+
```yaml
239+
additional_telemetry:
240+
- when: "default" # Telemetry emitted by default
241+
metrics:
242+
- name: "http.server.request.duration"
243+
description: "Duration of HTTP server requests"
244+
type: "HISTOGRAM"
245+
unit: "ms"
246+
attributes:
247+
- name: "http.method"
248+
type: "STRING"
249+
- name: "http.status_code"
250+
type: "LONG"
251+
spans:
252+
- span_kind: "SERVER"
253+
attributes:
254+
- name: "http.method"
255+
type: "STRING"
256+
- name: "http.url"
257+
type: "STRING"
258+
- when: "otel.instrumentation.example.experimental-metrics.enabled" # Telemetry enabled by configuration
259+
metrics:
260+
- name: "example.experimental.metric"
261+
description: "Experimental metric enabled by configuration"
262+
type: "COUNTER"
263+
unit: "1"
264+
```
265+
266+
Each telemetry entry includes:
267+
268+
- `when`: The configuration condition under which this telemetry is emitted. Use `"default"` for telemetry
269+
emitted by default, or specify the configuration option name for conditional telemetry.
270+
- `metrics`: List of metrics with their name, description, type, unit, and attributes
271+
- `spans`: List of span configurations with their span_kind and attributes
272+
273+
For metrics, supported `type` values include: `COUNTER`, `GAUGE`, `HISTOGRAM`, `EXPONENTIAL_HISTOGRAM`.
274+
275+
For spans, supported `span_kind` values include: `CLIENT`, `SERVER`, `PRODUCER`, `CONSUMER`, `INTERNAL`.
276+
277+
For attributes, supported `type` values include: `STRING`, `LONG`, `DOUBLE`, `BOOLEAN`.
278+
279+
#### override_telemetry
280+
281+
Set `override_telemetry: true` to completely replace any auto-generated telemetry data from `.telemetry`
282+
files. When this is enabled, only the manually documented telemetry in `additional_telemetry` will be
283+
used, and any `.telemetry` files will be ignored.
284+
285+
```yaml
286+
override_telemetry: true
287+
additional_telemetry:
288+
- when: "default"
289+
metrics:
290+
- name: "manually.documented.metric"
291+
description: "This completely replaces auto-generated telemetry"
292+
type: "GAUGE"
293+
unit: "bytes"
294+
```
295+
296+
If `override_telemetry` is `false` or omitted (default behavior), manual telemetry will be merged with
297+
auto-generated telemetry, with manual entries taking precedence in case of conflicts (same metric name
298+
or span kind within the same `when` condition).
299+
208300
## Instrumentation List (docs/instrumentation-list.md)
209301

210302
The contents of the `metadata.yaml` files are combined with other information about the instrumentation

examples/distro/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ buildscript {
1212
}
1313
}
1414
dependencies {
15-
classpath "com.diffplug.spotless:spotless-plugin-gradle:7.2.1"
16-
classpath "com.gradleup.shadow:shadow-gradle-plugin:9.1.0"
15+
classpath "com.diffplug.spotless:spotless-plugin-gradle:8.0.0"
16+
classpath "com.gradleup.shadow:shadow-gradle-plugin:9.2.1"
1717
classpath "io.opentelemetry.instrumentation:gradle-plugins:2.21.0-alpha-SNAPSHOT"
1818
}
1919
}

examples/extension/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ plugins {
1010
into a single jar.
1111
See https://imperceptiblethoughts.com/shadow/ for more details about Shadow plugin.
1212
*/
13-
id "com.gradleup.shadow" version "9.1.0"
14-
id "com.diffplug.spotless" version "7.2.1"
13+
id "com.gradleup.shadow" version "9.2.1"
14+
id "com.diffplug.spotless" version "8.0.0"
1515

1616
id "io.opentelemetry.instrumentation.muzzle-generation" version "2.21.0-alpha-SNAPSHOT"
1717
id "io.opentelemetry.instrumentation.muzzle-check" version "2.21.0-alpha-SNAPSHOT"
@@ -95,7 +95,7 @@ dependencies {
9595
Only dependencies added to `implementation` configuration will be picked up by Shadow plugin
9696
and added to the resulting jar for our extension's distribution.
9797
*/
98-
implementation 'org.apache.commons:commons-lang3:3.18.0'
98+
implementation 'org.apache.commons:commons-lang3:3.19.0'
9999

100100
//All dependencies below are only for tests
101101
testImplementation("org.testcontainers:testcontainers:1.21.3")

gradle-plugins/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ dependencies {
4040
implementation("org.eclipse.aether:aether-transport-http:${aetherVersion}")
4141
implementation("org.apache.maven:maven-aether-provider:3.3.9")
4242

43-
implementation("com.gradleup.shadow:shadow-gradle-plugin:9.1.0")
43+
implementation("com.gradleup.shadow:shadow-gradle-plugin:9.2.1")
4444

4545
testImplementation("org.assertj:assertj-core:3.27.6")
4646

@@ -57,13 +57,13 @@ tasks {
5757

5858
withType<JavaCompile>().configureEach {
5959
with(options) {
60-
release.set(11)
60+
release.set(17)
6161
}
6262
}
6363

6464
withType(KotlinJvmCompile::class).configureEach {
6565
compilerOptions {
66-
jvmTarget = JvmTarget.JVM_11
66+
jvmTarget = JvmTarget.JVM_17
6767
}
6868
}
6969
}
@@ -87,7 +87,7 @@ gradlePlugin {
8787

8888
java {
8989
toolchain {
90-
languageVersion.set(JavaLanguageVersion.of(11))
90+
languageVersion.set(JavaLanguageVersion.of(17))
9191
}
9292
withJavadocJar()
9393
withSourcesJar()

0 commit comments

Comments
 (0)