Skip to content

Commit

Permalink
Merge branch 'main' into feature/logstash-markers
Browse files Browse the repository at this point in the history
  • Loading branch information
laurit committed Nov 15, 2024
2 parents 7a4e388 + 805ce0a commit c0076c2
Show file tree
Hide file tree
Showing 394 changed files with 9,065 additions and 7,018 deletions.
4 changes: 2 additions & 2 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
"groupName": "quarkus packages"
},
{
"matchPackagePrefixes": ["com.gradle.enterprise"],
"groupName": "gradle enterprise packages"
"matchPackagePrefixes": ["com.gradle.develocity"],
"groupName": "gradle develocity packages"
},
{
"matchPackagePrefixes": ["org.eclipse.jetty:"],
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
java-version-file: .java-version

- name: Initialize CodeQL
uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
uses: github/codeql-action/init@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1
with:
languages: java
# using "latest" helps to keep up with the latest Kotlin support
Expand All @@ -45,7 +45,7 @@ jobs:
run: ./gradlew assemble -x javadoc --no-build-cache --no-daemon

- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
uses: github/codeql-action/analyze@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1

workflow-notification:
needs:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ jobs:
run: .github/scripts/use-cla-approved-github-bot.sh

- name: Wait for release to be available in maven central
env:
VERSION: ${{ needs.release.outputs.version }}
run: |
until curl --silent \
--show-error \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
uses: github/codeql-action/upload-sarif@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1
with:
sarif_file: results.sarif
52 changes: 51 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,59 @@

## Unreleased

## Version 2.10.0 (2024-11-13)

### 🌟 New javaagent instrumentation

- Ktor 3 instrumentation
([#12562](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/12562))

### 🌟 New library instrumentation

- Ktor 3 instrumentation
([#12562](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/12562))

### Migration notes

- Spring Boot Starter Scheduling instrumentation scope name changed from
`io.opentelemetry.spring-scheduling-3.1` to `io.opentelemetry.spring-boot-autoconfigure`
to reflect the module's name.
- Default flush timeout for aws lambda javaagent instrumentation changed from 1 second
to 10 seconds to match the flush timeout used in the aws lambda library instrumentation.
([#12576](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/12576))

### 📈 Enhancements

- Delegate loading of java package to platform loader
([#12505](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/12505))
- Set up virtual field transforms before otel sdk is initialized
([#12444](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/12444))
- Update azure-core-tracing-opentelemetry version and improve HTTP suppression to back off
when Azure SDK tracing was disabled.
when Azure SDK tracing is disabled.
([#12489](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/12489))
- Ktor2 http client uses low level instrumentation
([#12530](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/12530))
- Add logback mdc instrumentation to spring boot starter
([#12515](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/12515))
- Run class load listener only once
([#12565](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/12565))
- Remove duplicate byte buddy classes to reduce agent jar file size
([#12571](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/12571))
- Support additional JVM arg syntax in service name resource detector
([#12544](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/12544))

### 🛠️ Bug fixes

- Fix derby directory connection string parser
([#12479](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/12479))
- Improve whitespace handling in oracle jdbc url parser
([#12512](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/12512))
- Fix SpanKey bridging for unbridgeable span
([#12511](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/12511))
- Fix lettuce instrumentation and tests to pass against latest version
([#12552](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/12552))
- Fix Kafka initialization occasionally failed due to concurrent injection of OpenTelemetryMetricsReporter
([#12583](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/12583))

## Version 2.9.0 (2024-10-17)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public K6Container(

public GenericContainer<?> build() {
String k6OutputFile = namingConventions.container.k6Results(agent);
return new GenericContainer<>(DockerImageName.parse("loadimpact/k6"))
return new GenericContainer<>(DockerImageName.parse("grafana/k6"))
.withNetwork(network)
.withNetworkAliases("k6")
.withLogConsumer(new Slf4jLogConsumer(logger))
Expand Down
4 changes: 2 additions & 2 deletions conventions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ dependencies {
implementation("gradle.plugin.com.google.protobuf:protobuf-gradle-plugin:0.8.18")
implementation("com.gradleup.shadow:shadow-gradle-plugin:8.3.5")
implementation("org.apache.httpcomponents:httpclient:4.5.14")
implementation("com.gradle.develocity:com.gradle.develocity.gradle.plugin:3.18.1")
implementation("com.gradle.develocity:com.gradle.develocity.gradle.plugin:3.18.2")
implementation("org.owasp:dependency-check-gradle:11.1.0")
implementation("ru.vyarus:gradle-animalsniffer-plugin:1.7.1")
implementation("org.spdx:spdx-gradle-plugin:0.8.0")
Expand All @@ -69,7 +69,7 @@ dependencies {
implementation("me.champeau.jmh:jmh-gradle-plugin:0.7.2")
implementation("net.ltgt.gradle:gradle-errorprone-plugin:4.1.0")
implementation("net.ltgt.gradle:gradle-nullaway-plugin:2.1.0")
implementation("me.champeau.gradle:japicmp-gradle-plugin:0.4.4")
implementation("me.champeau.gradle:japicmp-gradle-plugin:0.4.5")

testImplementation(enforcedPlatform("org.junit:junit-bom:5.11.3"))
testImplementation("org.junit.jupiter:junit-jupiter-api")
Expand Down
6 changes: 3 additions & 3 deletions conventions/src/main/kotlin/otel.java-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ abstract class NettyAlignmentRule : ComponentMetadataRule {
with(ctx.details) {
if (id.group == "io.netty" && id.name != "netty") {
if (id.version.startsWith("4.1.")) {
belongsTo("io.netty:netty-bom:4.1.114.Final", false)
belongsTo("io.netty:netty-bom:4.1.115.Final", false)
} else if (id.version.startsWith("4.0.")) {
belongsTo("io.netty:netty-bom:4.0.56.Final", false)
}
Expand All @@ -161,7 +161,7 @@ dependencies {
compileOnly("com.google.errorprone:error_prone_annotations")

codenarc("org.codenarc:CodeNarc:3.5.0")
codenarc(platform("org.codehaus.groovy:groovy-bom:3.0.22"))
codenarc(platform("org.codehaus.groovy:groovy-bom:3.0.23"))

modules {
// checkstyle uses the very old google-collections which causes Java 9 module conflict with
Expand Down Expand Up @@ -434,7 +434,7 @@ codenarc {
checkstyle {
configFile = rootProject.file("buildscripts/checkstyle.xml")
// this version should match the version of google_checks.xml used as basis for above configuration
toolVersion = "10.20.0"
toolVersion = "10.20.1"
maxWarnings = 0
}

Expand Down
4 changes: 2 additions & 2 deletions dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ val dependencyVersions = hashMapOf<String, String>()
rootProject.extra["versions"] = dependencyVersions

// this line is managed by .github/scripts/update-sdk-version.sh
val otelSdkVersion = "1.43.0"
val otelSdkVersion = "1.44.1"
val otelContribVersion = "1.40.0-alpha"
val otelSdkAlphaVersion = otelSdkVersion.replaceFirst("(-SNAPSHOT)?$".toRegex(), "-alpha$1")

// Need both BOM and groovy jars
val groovyVersion = "4.0.23"
val groovyVersion = "4.0.24"

// We don't force libraries we instrument to new versions since we compile and test against specific
// old baseline versions but we do try to force those libraries' transitive dependencies to new
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Comparing source compatibility of opentelemetry-instrumentation-annotations-2.10.0-SNAPSHOT.jar against opentelemetry-instrumentation-annotations-2.9.0.jar
Comparing source compatibility of opentelemetry-instrumentation-annotations-2.11.0-SNAPSHOT.jar against opentelemetry-instrumentation-annotations-2.10.0.jar
No changes.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Comparing source compatibility of opentelemetry-instrumentation-api-2.10.0-SNAPSHOT.jar against opentelemetry-instrumentation-api-2.9.0.jar
Comparing source compatibility of opentelemetry-instrumentation-api-2.11.0-SNAPSHOT.jar against opentelemetry-instrumentation-api-2.10.0.jar
No changes.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Comparing source compatibility of opentelemetry-spring-boot-autoconfigure-2.10.0-SNAPSHOT.jar against opentelemetry-spring-boot-autoconfigure-2.9.0.jar
Comparing source compatibility of opentelemetry-spring-boot-autoconfigure-2.11.0-SNAPSHOT.jar against opentelemetry-spring-boot-autoconfigure-2.10.0.jar
No changes.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Comparing source compatibility of opentelemetry-spring-boot-starter-2.10.0-SNAPSHOT.jar against opentelemetry-spring-boot-starter-2.9.0.jar
Comparing source compatibility of opentelemetry-spring-boot-starter-2.11.0-SNAPSHOT.jar against opentelemetry-spring-boot-starter-2.10.0.jar
No changes.
4 changes: 4 additions & 0 deletions docs/contributing/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ builds by adding the following to `~/.gradle/gradle.properties` before building.
disableShadowRelocate=true
```

WARNING: disabling shadow renaming will make some of the tests fail. In some cases it can also make
tests pass when they really should be failing. Use with caution and be prepared for unexpected
behavior.

## Missing GraalVM hints

Enable the GraalVM tracing agent:
Expand Down
2 changes: 1 addition & 1 deletion docs/supported-libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ These are the supported libraries and frameworks:
| [Jodd Http](https://http.jodd.org/) | 4.2+ | N/A | [HTTP Client Spans], [HTTP Client Metrics] |
| [JSP](https://javaee.github.io/javaee-spec/javadocs/javax/servlet/jsp/package-summary.html) | 2.3+ | N/A | Controller Spans [3] |
| [Kotlin Coroutines](https://kotlinlang.org/docs/coroutines-overview.html) | 1.0+ | N/A | Context propagation |
| [Ktor](https://github.com/ktorio/ktor) | 1.0+ | [opentelemetry-ktor-1.0](../instrumentation/ktor/ktor-1.0/library),<br>[opentelemetry-ktor-2.0](../instrumentation/ktor/ktor-2.0/library) | [HTTP Client Spans], [HTTP Client Metrics], [HTTP Server Spans], [HTTP Server Metrics] |
| [Ktor](https://github.com/ktorio/ktor) | 1.0+ | [opentelemetry-ktor-1.0](../instrumentation/ktor/ktor-1.0/library),<br>[opentelemetry-ktor-2.0](../instrumentation/ktor/ktor-2.0/library),<br>[opentelemetry-ktor-3.0](../instrumentation/ktor/ktor-3.0/library) | [HTTP Client Spans], [HTTP Client Metrics], [HTTP Server Spans], [HTTP Server Metrics] |
| [Kubernetes Client](https://github.com/kubernetes-client/java) | 7.0+ | N/A | [HTTP Client Spans] |
| [Lettuce](https://github.com/lettuce-io/lettuce-core) | 4.0+ | [opentelemetry-lettuce-5.1](../instrumentation/lettuce/lettuce-5.1/library) | [Database Client Spans] |
| [Log4j 1](https://logging.apache.org/log4j/1.2/) | 1.2+ | N/A | none |
Expand Down
8 changes: 4 additions & 4 deletions examples/distro/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ buildscript {
dependencies {
classpath "com.diffplug.spotless:spotless-plugin-gradle:6.25.0"
classpath "com.gradleup.shadow:shadow-gradle-plugin:8.3.5"
classpath "io.opentelemetry.instrumentation:gradle-plugins:2.10.0-alpha-SNAPSHOT"
classpath "io.opentelemetry.instrumentation:gradle-plugins:2.11.0-alpha-SNAPSHOT"
}
}

Expand All @@ -27,11 +27,11 @@ subprojects {
ext {
versions = [
// this line is managed by .github/scripts/update-sdk-version.sh
opentelemetrySdk : "1.43.0",
opentelemetrySdk : "1.44.1",

// these lines are managed by .github/scripts/update-version.sh
opentelemetryJavaagent : "2.10.0-SNAPSHOT",
opentelemetryJavaagentAlpha: "2.10.0-alpha-SNAPSHOT",
opentelemetryJavaagent : "2.11.0-SNAPSHOT",
opentelemetryJavaagentAlpha: "2.11.0-alpha-SNAPSHOT",

autoservice : "1.1.1",
junit : "5.11.3"
Expand Down
10 changes: 5 additions & 5 deletions examples/extension/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ plugins {
id "com.gradleup.shadow" version "8.3.5"
id "com.diffplug.spotless" version "6.25.0"

id "io.opentelemetry.instrumentation.muzzle-generation" version "2.10.0-alpha-SNAPSHOT"
id "io.opentelemetry.instrumentation.muzzle-check" version "2.10.0-alpha-SNAPSHOT"
id "io.opentelemetry.instrumentation.muzzle-generation" version "2.11.0-alpha-SNAPSHOT"
id "io.opentelemetry.instrumentation.muzzle-check" version "2.11.0-alpha-SNAPSHOT"
}

group 'io.opentelemetry.example'
Expand All @@ -23,11 +23,11 @@ version '1.0'
ext {
versions = [
// this line is managed by .github/scripts/update-sdk-version.sh
opentelemetrySdk : "1.43.0",
opentelemetrySdk : "1.44.1",

// these lines are managed by .github/scripts/update-version.sh
opentelemetryJavaagent : "2.10.0-SNAPSHOT",
opentelemetryJavaagentAlpha: "2.10.0-alpha-SNAPSHOT",
opentelemetryJavaagent : "2.11.0-SNAPSHOT",
opentelemetryJavaagentAlpha: "2.11.0-alpha-SNAPSHOT",

junit : "5.11.3"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,23 @@ public InternalNetworkAttributesExtractor(
}

public void onEnd(AttributesBuilder attributes, REQUEST request, @Nullable RESPONSE response) {
String protocolName = lowercase(getter.getNetworkProtocolName(request, response));
String protocolVersion = lowercase(getter.getNetworkProtocolVersion(request, response));

if (captureProtocolAttributes) {
String transport = lowercase(getter.getNetworkTransport(request, response));
internalSet(attributes, NetworkAttributes.NETWORK_TRANSPORT, transport);
internalSet(
attributes,
NetworkAttributes.NETWORK_TRANSPORT,
lowercase(getter.getNetworkTransport(request, response)));
internalSet(
attributes,
NetworkAttributes.NETWORK_TYPE,
lowercase(getter.getNetworkType(request, response)));
internalSet(attributes, NetworkAttributes.NETWORK_PROTOCOL_NAME, protocolName);
internalSet(attributes, NetworkAttributes.NETWORK_PROTOCOL_VERSION, protocolVersion);
internalSet(
attributes,
NetworkAttributes.NETWORK_PROTOCOL_NAME,
lowercase(getter.getNetworkProtocolName(request, response)));
internalSet(
attributes,
NetworkAttributes.NETWORK_PROTOCOL_VERSION,
lowercase(getter.getNetworkProtocolVersion(request, response)));
}

if (captureLocalSocketAttributes) {
Expand Down
Loading

0 comments on commit c0076c2

Please sign in to comment.