Skip to content

Commit

Permalink
Merge branch 'otel_main' into add_metric_annotation_instrument_merge_…
Browse files Browse the repository at this point in the history
…main
  • Loading branch information
Duncan-tree-zhou committed Jan 6, 2025
2 parents 0010367 + fea4542 commit 349b93a
Show file tree
Hide file tree
Showing 2,404 changed files with 74,839 additions and 49,154 deletions.
28 changes: 16 additions & 12 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"config:base"
],
"ignorePaths": ["instrumentation/**"],
"baseBranches": ["main", "release/v1.33.x"],
// needed in order to get patch-only updates in package rules below
// unfortunately you can't combine updateTypes and separateMinorPatch in the same package rule
// so we have to apply it globally here, see
Expand Down Expand Up @@ -34,13 +33,6 @@
"ignoreUnstable": false,
"allowedVersions": "!/\\-SNAPSHOT$/"
},
{
// we are not going to update the semconv in 1.x branch
"matchPackageNames": ["io.opentelemetry.semconv:opentelemetry-semconv"],
"matchUpdateTypes": ["minor"],
"matchBaseBranches": ["release/v1.33.x"],
"enabled": false
},
{
"matchPackagePrefixes": ["ch.qos.logback:"],
"groupName": "logback packages"
Expand All @@ -54,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 All @@ -77,6 +69,10 @@
"matchPackagePrefixes": ["com.fasterxml.jackson"],
"groupName": "jackson packages"
},
{
"matchPackagePrefixes": ["com.gradleup.shadow"],
"groupName": "gradle shadow packages"
},
{
// prevent update to 2.4-groovy-4.0-SNAPSHOT
"matchPackageNames": ["org.spockframework:spock-bom"],
Expand Down Expand Up @@ -124,7 +120,7 @@
],
"matchPackageNames": [
"org.slf4j:slf4j-api",
"org.springframework.boot",
"org.springframework.boot:org.springframework.boot.gradle.plugin", // this is for plugin id "org.springframework.boot"
"org.springframework.boot:spring-boot-dependencies"],
"matchUpdateTypes": ["major", "minor"],
"enabled": false,
Expand Down Expand Up @@ -153,6 +149,14 @@
"matchUpdateTypes": ["major"],
"enabled": false
},
{
// intentionally pinning specifically to guice 5 in the play smoke test
// until we are able to test against the latest version of play
"matchFileNames": ["smoke-tests/images/play/build.gradle.kts"],
"matchPackagePrefixes": ["com.google.inject:", "com.google.inject.extensions:"],
"matchUpdateTypes": ["major"],
"enabled": false
},
{
// intentionally aligning both netty 4.0 and 4.1 version in this convention
"matchFileNames": ["conventions/src/main/kotlin/otel.java-conventions.gradle.kts"],
Expand All @@ -163,7 +167,7 @@
{
// intentionally using scala 2.11 in otel.scala-conventions.gradle.kts
"matchFileNames": ["conventions/src/main/kotlin/otel.scala-conventions.gradle.kts"],
"matchPackagePrefixes": ["org.scala-lang:scala-library"],
"matchPackageNames": ["org.scala-lang:scala-library"],
"matchUpdateTypes": ["major", "minor"],
"enabled": false
},
Expand Down
13 changes: 8 additions & 5 deletions .github/repository-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,18 @@ 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>`,
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`
54 changes: 54 additions & 0 deletions .github/scripts/check-javaagent-suppression-keys.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/bash -e

# shellcheck disable=SC2044
for file in $(find instrumentation -name "*Module.java"); do

if ! grep -q "extends InstrumentationModule" "$file"; then
continue
fi

if [[ "$file" != *"/javaagent/src/"* ]]; then
continue
fi

# shellcheck disable=SC2001
module_name=$(echo "$file" | sed 's#.*/\([^/]*\)/javaagent/src/.*#\1#')
# shellcheck disable=SC2001
simple_module_name=$(echo "$module_name" | sed 's/-[0-9.]*$//')

if [[ "$simple_module_name" == *jaxrs* ]]; then
# TODO these need some work still
continue
fi
if [[ "$simple_module_name" == *jaxws* ]]; then
# TODO these need some work still
continue
fi
if [[ "$simple_module_name" == jdbc ]]; then
# TODO split jdbc-datasource out into separate instrumentation?
continue
fi
if [[ "$simple_module_name" == kafka-clients ]]; then
# TODO split kafka client metrics out into separate instrumentation?
continue
fi
if [[ "$simple_module_name" == quarkus-resteasy-reactive ]]; then
# TODO module is missing a base version
continue
fi

if [ "$module_name" == "$simple_module_name" ]; then
expected="super\(\n? *\"$simple_module_name\""
else
expected="super\(\n? *\"$simple_module_name\",\n? *\"$module_name\""
fi

echo "$module_name"

matches=$(perl -0 -ne "print if /$expected/" "$file" | wc -l)
if [ "$matches" == 0 ]; then
echo "Expected to find $expected in $file"
exit 1
fi

done
21 changes: 21 additions & 0 deletions .github/scripts/check-latest-dep-test-overrides.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash -e

# all missing version coverage should be documented in supported-libraries.md

if grep -r --include build.gradle.kts latestDepTestLibrary instrumentation \
| grep -v :+\" \
| grep -v "// see .* module" \
| grep -v "// see test suite below" \
| grep -v "// no longer applicable" \
| grep -v "// related dependency" \
| grep -v "// native on-by-default instrumentation after this version" \
| grep -v "// documented limitation" \
| grep -v "instrumentation/jaxrs-client/jaxrs-client-2.0-testing/build.gradle.kts"; then

echo
echo "Found an undocumented latestDepTestLibrary (see above)."
echo
echo "See .gith/scripts/check-latest-dep-test-overrides.sh in this repository"
echo "and add one of the required comments."
exit 1
fi

This file was deleted.

2 changes: 1 addition & 1 deletion .github/scripts/get-version.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash -e

grep -Po "val stableVersion = \"\K[0-9]+.[0-9]+.[0-9]+" version.gradle.kts
grep "val stableVersion = " version.gradle.kts | grep -Eo "[0-9]+.[0-9]+.[0-9]+"
27 changes: 0 additions & 27 deletions .github/scripts/markdown-link-check-config.json

This file was deleted.

17 changes: 0 additions & 17 deletions .github/scripts/markdown-link-check-with-retry.sh

This file was deleted.

2 changes: 2 additions & 0 deletions .github/scripts/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ sed -Ei "s/(opentelemetryJavaagentAlpha *: )\"[^\"]*\"/\1\"$alpha_version\"/" ex

sed -Ei "s/(io.opentelemetry.instrumentation.muzzle-generation\" version )\"[^\"]*\"/\1\"$alpha_version\"/" examples/extension/build.gradle
sed -Ei "s/(io.opentelemetry.instrumentation.muzzle-check\" version )\"[^\"]*\"/\1\"$alpha_version\"/" examples/extension/build.gradle

sed -Ei "1 s/(Comparing source compatibility of [a-z-]+)-[0-9]+\.[0-9]+\.[0-9]+(-SNAPSHOT)?.jar/\1-$version.jar/" docs/apidiffs/current_vs_latest/*.txt
8 changes: 4 additions & 4 deletions .github/workflows/auto-update-otel-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
latest-version: ${{ steps.check-versions.outputs.latest-version }}
already-opened: ${{ steps.check-versions.outputs.already-opened }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- id: check-versions
name: Check versions
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
needs:
- check-versions
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Update version
env:
Expand All @@ -66,13 +66,13 @@ jobs:
run: .github/scripts/gha-free-disk-space.sh

- name: Set up JDK for running Gradle
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4.2.2
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
distribution: temurin
java-version-file: .java-version

- name: Setup Gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2

- name: Update license report
run: ./gradlew generateLicenseReport
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
exit 1
fi
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# history is needed to run git cherry-pick below
fetch-depth: 0
Expand Down
Loading

0 comments on commit 349b93a

Please sign in to comment.