Skip to content

Commit 460dbb4

Browse files
committed
Merge branch 'main' of github.com:jaydeluca/opentelemetry-java-instrumentation into docsite-audit
2 parents e8ade8b + 09e2ff0 commit 460dbb4

File tree

114 files changed

+1667
-712
lines changed

Some content is hidden

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

114 files changed

+1667
-712
lines changed

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
cache-read-only: ${{ github.event_name == 'pull_request' }}
6464

6565
- name: Initialize CodeQL
66-
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
66+
uses: github/codeql-action/init@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4
6767
with:
6868
languages: ${{ matrix.language }}
6969
# using "latest" helps to keep up with the latest Kotlin support
@@ -79,6 +79,6 @@ jobs:
7979
run: ./gradlew assemble -x javadoc -x :instrumentation:quarkus-resteasy-reactive:quarkus3-testing:quarkusGenerateCodeDev -x :instrumentation:quarkus-resteasy-reactive:quarkus2-testing:quarkusGenerateCodeDev --no-build-cache --no-daemon
8080

8181
- name: Perform CodeQL analysis
82-
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
82+
uses: github/codeql-action/analyze@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4
8383
with:
8484
category: "/language:${{matrix.language}}"

.github/workflows/ossf-scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ jobs:
4242
# Upload the results to GitHub's code scanning dashboard (optional).
4343
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
4444
- name: "Upload to code-scanning"
45-
uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
45+
uses: github/codeql-action/upload-sarif@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4
4646
with:
4747
sarif_file: results.sarif

.github/workflows/reusable-native-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2828
- id: read-java
2929
run: echo "version=$(cat .java-version)" >> "$GITHUB_OUTPUT"
30-
- uses: graalvm/setup-graalvm@e1df20a713a4cc6ab5b0eb03f0e0dcdc0199b805 # v1.3.4.1
30+
- uses: graalvm/setup-graalvm@7f488cf82a3629ee755e4e97342c01d6bed318fa # v1.3.5.1
3131
with:
3232
version: "latest"
3333
java-version: ${{ matrix.test-java-version }}

benchmark-overhead-jmh/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ otelJava {
1313
}
1414

1515
dependencies {
16-
jmhImplementation("org.springframework.boot:spring-boot-starter-web:3.5.3")
16+
jmhImplementation("org.springframework.boot:spring-boot-starter-web:3.5.4")
1717
}
1818

1919
tasks {

custom-checks/src/main/java/com/google/errorprone/bugpatterns/checkreturnvalue/CanIgnoreReturnValueSuggesterFactory.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66
package com.google.errorprone.bugpatterns.checkreturnvalue;
77

88
import com.google.errorprone.ErrorProneFlags;
9+
import com.google.errorprone.bugpatterns.WellKnownKeep;
910

1011
public final class CanIgnoreReturnValueSuggesterFactory {
1112

1213
// calls package private constructor of CanIgnoreReturnValueSuggester
1314
public static CanIgnoreReturnValueSuggester createCanIgnoreReturnValueSuggester(
14-
ErrorProneFlags errorProneFlags) {
15-
return new CanIgnoreReturnValueSuggester(errorProneFlags);
15+
ErrorProneFlags errorProneFlags, WellKnownKeep wellKnownKeep) {
16+
return new CanIgnoreReturnValueSuggester(errorProneFlags, wellKnownKeep);
1617
}
1718

1819
private CanIgnoreReturnValueSuggesterFactory() {}

custom-checks/src/main/java/io/opentelemetry/javaagent/customchecks/OtelCanIgnoreReturnValueSuggester.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import com.google.errorprone.ErrorProneFlags;
1313
import com.google.errorprone.VisitorState;
1414
import com.google.errorprone.bugpatterns.BugChecker;
15+
import com.google.errorprone.bugpatterns.WellKnownKeep;
1516
import com.google.errorprone.bugpatterns.checkreturnvalue.CanIgnoreReturnValueSuggester;
1617
import com.google.errorprone.bugpatterns.checkreturnvalue.CanIgnoreReturnValueSuggesterFactory;
1718
import com.google.errorprone.matchers.Description;
@@ -33,9 +34,10 @@ public class OtelCanIgnoreReturnValueSuggester extends BugChecker
3334
private final CanIgnoreReturnValueSuggester delegate;
3435

3536
@Inject
36-
OtelCanIgnoreReturnValueSuggester(ErrorProneFlags errorProneFlags) {
37+
OtelCanIgnoreReturnValueSuggester(ErrorProneFlags errorProneFlags, WellKnownKeep wellKnownKeep) {
3738
delegate =
38-
CanIgnoreReturnValueSuggesterFactory.createCanIgnoreReturnValueSuggester(errorProneFlags);
39+
CanIgnoreReturnValueSuggesterFactory.createCanIgnoreReturnValueSuggester(
40+
errorProneFlags, wellKnownKeep);
3941
}
4042

4143
public OtelCanIgnoreReturnValueSuggester() {

dependencyManagement/build.gradle.kts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ data class DependencySet(val group: String, val version: String, val modules: Li
66

77
// this line is managed by .github/scripts/update-sdk-version.sh
88
val otelSdkVersion = "1.52.0"
9-
val otelContribVersion = "1.47.0-alpha"
9+
val otelContribVersion = "1.48.0-alpha"
1010
val otelSdkAlphaVersion = otelSdkVersion.replaceFirst("(-SNAPSHOT)?$".toRegex(), "-alpha$1")
1111

1212
// Need both BOM and groovy jars
13-
val groovyVersion = "4.0.27"
13+
val groovyVersion = "4.0.28"
1414

1515
// We don't force libraries we instrument to new versions since we compile and test against specific
1616
// old baseline versions but we do try to force those libraries' transitive dependencies to new
@@ -38,7 +38,7 @@ val DEPENDENCY_BOMS = listOf(
3838

3939
val autoServiceVersion = "1.1.1"
4040
val autoValueVersion = "1.11.0"
41-
val errorProneVersion = "2.40.0"
41+
val errorProneVersion = "2.41.0"
4242
val byteBuddyVersion = "1.17.6"
4343
val asmVersion = "9.8"
4444
val jmhVersion = "1.37"
@@ -93,7 +93,7 @@ val DEPENDENCIES = listOf(
9393
"com.uber.nullaway:nullaway:0.12.7",
9494
"commons-beanutils:commons-beanutils:1.11.0",
9595
"commons-cli:commons-cli:1.9.0",
96-
"commons-codec:commons-codec:1.18.0",
96+
"commons-codec:commons-codec:1.19.0",
9797
"commons-collections:commons-collections:3.2.2",
9898
"commons-digester:commons-digester:2.1",
9999
"commons-fileupload:commons-fileupload:1.6.0",
@@ -121,7 +121,7 @@ val DEPENDENCIES = listOf(
121121
"org.objenesis:objenesis:3.4",
122122
"javax.validation:validation-api:2.0.1.Final",
123123
"org.snakeyaml:snakeyaml-engine:2.10",
124-
"org.elasticmq:elasticmq-rest-sqs_2.13:1.6.12"
124+
"org.elasticmq:elasticmq-rest-sqs_2.13:1.6.14"
125125
)
126126

127127
javaPlatform {

docs/advanced-configuration-options.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,19 @@ this option if your application relies on security manager to run untrusted code
3939

4040
## JavaScript snippet injection
4141

42-
This experimental feature allows you to inject JavaScript code into HTML responses from servlet applications. The agent will look for the `</head>` tag in HTML responses, and inject the configured JavaScript snippet before the closing `</head>` tag.
42+
This experimental feature allows you to inject JavaScript code into HTML responses from servlet applications. The agent will look for the `<head>` tag in HTML responses, and inject the configured JavaScript snippet after it.
4343

4444
This feature is designed for integrating client-side monitoring.
4545
We plan to integrate OpenTelemetry's own client-side monitoring solution by default once it's available
4646
(see the [browser instrumentation proposal](https://github.com/open-telemetry/community/blob/main/projects/browser-phase-1.md)).
4747

48-
| System property | Environment variable | Purpose |
49-
|-----------------------------------------|-----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
50-
| otel.experimental.javascript-snippet | OTEL_EXPERIMENTAL_JAVASCRIPT_SNIPPET | JavaScript code to inject into HTML responses before the closing `</head>` tag. The value should be a complete JavaScript snippet including `<script>` tags if needed, e.g. `-Dotel.experimental.javascript-snippet="<script>console.log('Hello world!');</script>"` |
48+
| System property | Environment variable | Purpose |
49+
|--------------------------------------|--------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
50+
| otel.experimental.javascript-snippet | OTEL_EXPERIMENTAL_JAVASCRIPT_SNIPPET | Experimental setting to inject a JavaScript snippet into HTML responses after the opening `<head>` tag. The value should be a complete JavaScript snippet including `<script>` tags if needed, e.g. `-Dotel.experimental.javascript-snippet="<script>console.log('Hello world!');</script>"` |
5151

5252
**Important notes:**
5353

5454
- This only works with servlet-based applications currently
55-
- The snippet is injected only into HTML responses that contain a `</head>` tag
55+
- The snippet is injected only into HTML responses that contain a `<head>` tag
5656
- The agent will attempt to preserve the original character encoding of the response
5757
- If the response already has a `Content-Length` header, it will be updated to reflect the additional content

0 commit comments

Comments
 (0)