Skip to content

Commit

Permalink
Merge branch 'main' of github.com:open-telemetry/opentelemetry-java-i…
Browse files Browse the repository at this point in the history
…nstrumentation into indy-servlet3
  • Loading branch information
SylvainJuge committed Nov 25, 2024
2 parents a43b667 + 057ba16 commit 1427f9f
Show file tree
Hide file tree
Showing 85 changed files with 1,484 additions and 660 deletions.
11 changes: 9 additions & 2 deletions .github/repository-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,22 @@ for [`dependabot/**/**`](https://github.com/open-telemetry/community/blob/main/d

## Secrets and variables > Actions

### Repository secrets

- `GPG_PASSWORD` - stored in OpenTelemetry-Java 1Password
- `GPG_PRIVATE_KEY` - stored in OpenTelemetry-Java 1Password
- `GRADLE_ENTERPRISE_ACCESS_KEY` - owned by [@trask](https://github.com/trask)
- Generated at https://ge.opentelemetry.io > My settings > Access keys
- format of env var is `ge.opentelemetry.io=<access key>`,
- Format of env var is `ge.opentelemetry.io=<access key>`,
see [docs](https://docs.gradle.com/enterprise/gradle-plugin/#via_environment_variable)
- `GRADLE_PUBLISH_KEY`
- `GRADLE_PUBLISH_SECRET`
- `NVD_API_KEY` - stored in OpenTelemetry-Java 1Password
- `OPENTELEMETRYBOT_GITHUB_TOKEN` - owned by [@trask](https://github.com/trask)
- Generated at https://nvd.nist.gov/developers/request-an-api-key
- Key is associated with [@trask](https://github.com/trask)'s gmail address
- `SONATYPE_KEY` - owned by [@trask](https://github.com/trask)
- `SONATYPE_USER` - owned by [@trask](https://github.com/trask)

### Organization secrets

- `OPENTELEMETRYBOT_GITHUB_TOKEN`
2 changes: 1 addition & 1 deletion .github/workflows/auto-update-otel-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
java-version-file: .java-version

- name: Setup Gradle
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1

- name: Update license report
run: ./gradlew generateLicenseReport
Expand Down
20 changes: 9 additions & 11 deletions .github/workflows/build-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
java-version-file: .java-version

- name: Setup Gradle
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
with:
cache-read-only: ${{ inputs.cache-read-only }}
# gradle enterprise is used for the build cache
Expand All @@ -54,7 +54,7 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- uses: gradle/actions/wrapper-validation@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
- uses: gradle/actions/wrapper-validation@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1

license-check:
runs-on: ubuntu-latest
Expand All @@ -71,7 +71,7 @@ jobs:
java-version-file: .java-version

- name: Setup Gradle
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
with:
cache-read-only: ${{ inputs.cache-read-only }}
# gradle enterprise is used for the build cache
Expand All @@ -80,9 +80,7 @@ jobs:
- name: Generate license report
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
# currently ignoring inputs.no-build-cache and always running with --no-build-cache
# see https://github.com/jk1/Gradle-License-Report/issues/231
run: ./gradlew generateLicenseReport --no-build-cache
run: ./gradlew generateLicenseReport ${{ inputs.no-build-cache && '--no-build-cache' || '' }}

- name: Check licenses
run: |
Expand Down Expand Up @@ -144,7 +142,7 @@ jobs:
sed -i "s/org.gradle.jvmargs=/org.gradle.jvmargs=-Xmx3g /" gradle.properties
- name: Setup Gradle
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
with:
cache-read-only: ${{ inputs.cache-read-only }}
# gradle enterprise is used for the build cache
Expand Down Expand Up @@ -247,7 +245,7 @@ jobs:
run: .github/scripts/deadlock-detector.sh

- name: Setup Gradle
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
with:
# only push cache for one matrix option since github action cache space is limited
cache-read-only: ${{ inputs.cache-read-only || matrix.test-java-version != 11 || matrix.vm != 'hotspot' }}
Expand Down Expand Up @@ -346,7 +344,7 @@ jobs:
java-version-file: .java-version

- name: Set up Gradle cache
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
with:
# only push cache for one matrix option per OS since github action cache space is limited
cache-read-only: ${{ inputs.cache-read-only || matrix.smoke-test-suite != 'tomcat' }}
Expand Down Expand Up @@ -399,7 +397,7 @@ jobs:
java-version-file: .java-version

- name: Setup Gradle
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
with:
cache-read-only: ${{ inputs.cache-read-only }}

Expand All @@ -422,7 +420,7 @@ jobs:
java-version-file: .java-version

- name: Set up Gradle cache
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
with:
cache-read-only: ${{ inputs.cache-read-only }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
java-version-file: .java-version

- name: Setup Gradle
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
with:
# gradle enterprise is used for the build cache
gradle-home-cache-excludes: caches/build-cache-1
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,22 @@ jobs:
java-version-file: .java-version

- name: Initialize CodeQL
uses: github/codeql-action/init@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # v3.27.4
uses: github/codeql-action/init@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
with:
languages: java
# using "latest" helps to keep up with the latest Kotlin support
# see https://github.com/github/codeql-action/issues/1555#issuecomment-1452228433
tools: latest

- name: Setup Gradle
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1

- name: Build
# skipping build cache is needed so that all modules will be analyzed
run: ./gradlew assemble -x javadoc --no-build-cache --no-daemon

- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # v3.27.4
uses: github/codeql-action/analyze@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5

workflow-notification:
needs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/overhead-benchmark-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
rsync -avv gh-pages/benchmark-overhead/results/ benchmark-overhead/results/
- name: Setup Gradle
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1

- name: Run tests
working-directory: benchmark-overhead
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/owasp-dependency-check-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
run: |
sed -i "s/org.gradle.jvmargs=/org.gradle.jvmargs=-Xmx3g /" gradle.properties
- uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
- uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1

- run: ./gradlew :javaagent:dependencyCheckAnalyze
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-smoke-test-early-jdk8-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
java-version-file: .java-version

- name: Setup Gradle
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
with:
cache-read-only: true
# gradle enterprise is used for the build cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-smoke-test-fake-backend-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
java-version-file: .java-version

- name: Setup Gradle
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
with:
cache-read-only: true
# gradle enterprise is used for the build cache
Expand All @@ -52,7 +52,7 @@ jobs:
java-version-file: .java-version

- name: Setup Gradle
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
with:
cache-read-only: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-smoke-test-servlet-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
java-version-file: .java-version

- name: Set up Gradle cache
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
with:
cache-read-only: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-smoke-test-early-jdk8-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
run: echo "TAG=$(date '+%Y%m%d').$GITHUB_RUN_ID" >> $GITHUB_ENV

- name: Setup Gradle
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1

- name: Build Docker image
run: ./gradlew :smoke-tests:images:early-jdk8:dockerPush -PextraTag=${{ env.TAG }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-smoke-test-fake-backend-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
run: echo "TAG=$(date '+%Y%m%d').$GITHUB_RUN_ID" >> $GITHUB_ENV

- name: Setup Gradle
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1

- name: Build Docker image
run: ./gradlew :smoke-tests:images:fake-backend:jib -Djib.httpTimeout=120000 -Djib.console=plain -PextraTag=${{ env.TAG }}
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
run: echo "TAG=$(date '+%Y%m%d').$GITHUB_RUN_ID" >> $GITHUB_ENV

- name: Setup Gradle
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1

- name: Build Docker image
run: ./gradlew :smoke-tests:images:fake-backend:dockerPush -PextraTag=${{ env.TAG }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-smoke-test-servlet-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Gradle cache
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
with:
# only push cache for one matrix option per OS since github action cache space is limited
cache-read-only: ${{ matrix.smoke-test-suite != 'tomcat' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
java-version-file: .java-version

- name: Setup Gradle
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1

- name: Build and publish artifacts
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-muzzle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
java-version-file: .java-version

- name: Setup Gradle
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
with:
cache-read-only: ${{ inputs.cache-read-only }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-smoke-test-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
run: echo "TAG=$(date '+%Y%m%d').$GITHUB_RUN_ID" >> $GITHUB_ENV

- name: Set up Gradle cache
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
with:
cache-read-only: ${{ inputs.cache-read-only }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-test-indy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
key: ${{ runner.os }}-test-latest-cache-pnpm-modules

- name: Setup Gradle
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
with:
cache-read-only: ${{ inputs.cache-read-only }}
# gradle enterprise is used for the build cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-test-latest-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
run: .github/scripts/deadlock-detector.sh

- name: Setup Gradle
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
with:
cache-read-only: ${{ inputs.cache-read-only }}
# gradle enterprise is used for the build cache
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@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # v3.27.4
uses: github/codeql-action/upload-sarif@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
with:
sarif_file: results.sarif
7 changes: 6 additions & 1 deletion benchmark-overhead-jmh/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ plugins {
id("otel.jmh-conventions")
}

otelJava {
// Spring Boot 3 requires java 17
minJavaVersionSupported.set(JavaVersion.VERSION_17)
}

dependencies {
jmhImplementation("org.springframework.boot:spring-boot-starter-web:3.3.5")
jmhImplementation("org.springframework.boot:spring-boot-starter-web:3.4.0")
}

tasks {
Expand Down
4 changes: 2 additions & 2 deletions benchmark-overhead/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ repositories {
dependencies {
implementation(enforcedPlatform("org.junit:junit-bom:5.11.3"))

testImplementation("org.testcontainers:testcontainers:1.20.3")
testImplementation("org.testcontainers:postgresql:1.20.3")
testImplementation("org.testcontainers:testcontainers:1.20.4")
testImplementation("org.testcontainers:postgresql:1.20.4")
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("org.junit.jupiter:junit-jupiter-params")
testImplementation("com.squareup.okhttp3:okhttp:4.12.0")
Expand Down
4 changes: 2 additions & 2 deletions benchmark-overhead/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=57dafb5c2622c6cc08b993c85b7c06956a2f53536432a30ead46166dbca0f1e9
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
distributionSha256Sum=f397b287023acdba1e9f6fc5ea72d22dd63669d59ed4a289a29b1a76eee151c6
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
5 changes: 0 additions & 5 deletions conventions/src/main/kotlin/otel.java-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,6 @@ tasks {
charSet = "UTF-8"
breakIterator(true)

// TODO (trask) revisit to see if url is fixed
// currently broken because https://docs.oracle.com/javase/8/docs/api/element-list is missing
// and redirects
// links("https://docs.oracle.com/javase/8/docs/api/")

addStringOption("Xdoclint:none", "-quiet")
// non-standard option to fail on warnings, see https://bugs.openjdk.java.net/browse/JDK-8200363
addStringOption("Xwerror", "-quiet")
Expand Down
6 changes: 3 additions & 3 deletions dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ rootProject.extra["versions"] = dependencyVersions

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

// Need both BOM and groovy jars
Expand All @@ -34,7 +34,7 @@ val DEPENDENCY_BOMS = listOf(
"io.opentelemetry:opentelemetry-bom:${otelSdkVersion}",
"io.opentelemetry:opentelemetry-bom-alpha:${otelSdkAlphaVersion}",
"org.junit:junit-bom:5.11.3",
"org.testcontainers:testcontainers-bom:1.20.3",
"org.testcontainers:testcontainers-bom:1.20.4",
"org.spockframework:spock-bom:2.4-M4-groovy-4.0"
)

Expand Down Expand Up @@ -103,7 +103,7 @@ val DEPENDENCIES = listOf(
"io.opentelemetry.contrib:opentelemetry-aws-xray-propagator:${otelContribVersion}",
"io.opentelemetry.contrib:opentelemetry-gcp-resources:${otelContribVersion}",
"io.opentelemetry.contrib:opentelemetry-baggage-processor:${otelContribVersion}",
"io.opentelemetry.proto:opentelemetry-proto:1.3.2-alpha",
"io.opentelemetry.proto:opentelemetry-proto:1.4.0-alpha",
"io.opentelemetry:opentelemetry-extension-annotations:1.18.0", // deprecated, no longer part of bom
"org.assertj:assertj-core:3.26.3",
"org.awaitility:awaitility:4.2.2",
Expand Down
1 change: 1 addition & 0 deletions docs/contributing/style-guideline.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ rough guideline of what are commonly accepted static imports:
- Immutable constants (where clearly named)
- Singleton instances (especially where clearly named and hopefully immutable)
- `tracer()` methods that expose tracer singleton instances
- Semantic convention attribute keys used in tests

Some of these are enforced by checkstyle rules:

Expand Down
Loading

0 comments on commit 1427f9f

Please sign in to comment.