Skip to content

Commit 57418b4

Browse files
committed
Merge branch 'main' of github.com:open-telemetry/opentelemetry-java-instrumentation into openai-embeddings
2 parents 78bee52 + ff91c28 commit 57418b4

File tree

133 files changed

+1830
-242
lines changed

Some content is hidden

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

133 files changed

+1830
-242
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}}"
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: opentelemetry.io documentation disable list audit
2+
3+
on:
4+
schedule:
5+
- cron: "30 1 * * *" # daily at 1:30 UTC
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
crawl:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
17+
- uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
18+
with:
19+
distribution: temurin
20+
java-version: 17
21+
22+
- name: Set up gradle
23+
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
24+
25+
- name: Run instrumentation analyzer (identify any module changes)
26+
run: ./gradlew :instrumentation-docs:runAnalysis
27+
28+
- name: Run doc site audit
29+
run: ./gradlew :instrumentation-docs:docSiteAudit
30+
31+
workflow-notification:
32+
permissions:
33+
contents: read
34+
issues: write
35+
needs:
36+
- crawl
37+
if: always()
38+
uses: ./.github/workflows/reusable-workflow-notification.yml
39+
with:
40+
success: ${{ needs.crawl.result == 'success' }}

.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 }}

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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"

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)