Skip to content

Commit 8bdf614

Browse files
authored
Merge branch 'open-telemetry:main' into feat/oshi-issue-10358
2 parents ac17c45 + 05c66ce commit 8bdf614

File tree

40 files changed

+1185
-108
lines changed

40 files changed

+1185
-108
lines changed

.github/workflows/auto-update-otel-sdk.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
java-version: 17.0.6
7373

7474
- name: Update license report
75-
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
75+
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
7676
with:
7777
arguments: generateLicenseReport
7878

.github/workflows/build-common.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
java-version: 17.0.6
4343

4444
- name: Spotless
45-
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
45+
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
4646
env:
4747
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
4848
GE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
@@ -75,7 +75,7 @@ jobs:
7575
java-version: 17.0.6
7676

7777
- name: Generate license report
78-
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
78+
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
7979
env:
8080
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
8181
GE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
@@ -149,7 +149,7 @@ jobs:
149149
sed -i "s/org.gradle.jvmargs=/org.gradle.jvmargs=-Xmx3g /" gradle.properties
150150
151151
- name: Build
152-
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
152+
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
153153
env:
154154
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
155155
GE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
@@ -244,7 +244,7 @@ jobs:
244244
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
245245
GE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
246246
GE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}
247-
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
247+
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
248248
with:
249249
# "check" is needed to activate all tests for listing purposes
250250
# listTestsInPartition writes test tasks that apply to the given partition to a file named
@@ -264,7 +264,7 @@ jobs:
264264
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
265265
GE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
266266
GE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}
267-
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
267+
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
268268
with:
269269
# spotless is checked separately since it's a common source of failure
270270
arguments: >
@@ -338,7 +338,7 @@ jobs:
338338
java-version: 17.0.6
339339

340340
- name: Set up Gradle cache
341-
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
341+
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
342342
with:
343343
# only push cache for one matrix option per OS since github action cache space is limited
344344
cache-read-only: ${{ inputs.cache-read-only || matrix.smoke-test-suite != 'tomcat' }}
@@ -395,7 +395,7 @@ jobs:
395395
java-version: 17.0.6
396396

397397
- name: Build
398-
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
398+
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
399399
with:
400400
arguments: build ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
401401
build-root-directory: gradle-plugins
@@ -416,7 +416,7 @@ jobs:
416416
java-version: 17.0.6
417417

418418
- name: Set up Gradle cache
419-
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
419+
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
420420
with:
421421
cache-read-only: ${{ inputs.cache-read-only }}
422422

.github/workflows/build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
8484
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
8585
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
86-
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
86+
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
8787
with:
8888
arguments: assemble publishToSonatype
8989
# gradle enterprise is used for the build cache
@@ -96,7 +96,7 @@ jobs:
9696
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
9797
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
9898
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
99-
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
99+
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
100100
with:
101101
build-root-directory: gradle-plugins
102102
arguments: build publishToSonatype

.github/workflows/codeql-daily.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
# see https://github.com/github/codeql-action/issues/1555#issuecomment-1452228433
3838
tools: latest
3939

40-
- uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
40+
- uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
4141
with:
4242
# skipping build cache is needed so that all modules will be analyzed
4343
arguments: assemble -x javadoc --no-build-cache --no-daemon

.github/workflows/overhead-benchmark-daily.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
rsync -avv gh-pages/benchmark-overhead/results/ benchmark-overhead/results/
2525
2626
- name: Run tests
27-
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
27+
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
2828
with:
2929
arguments: test
3030
build-root-directory: benchmark-overhead

.github/workflows/owasp-dependency-check-daily.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
distribution: temurin
2525
java-version: 17.0.6
2626

27-
- uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
27+
- uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
2828
with:
2929
arguments: ":javaagent:dependencyCheckAnalyze"
3030
env:

.github/workflows/pr-smoke-test-fake-backend-images.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
java-version: 17.0.6
2626

2727
- name: Build Docker image
28-
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
28+
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
2929
with:
3030
arguments: ":smoke-tests:images:fake-backend:jibDockerBuild -Djib.httpTimeout=120000 -Djib.console=plain"
3131
cache-read-only: true
@@ -50,7 +50,7 @@ jobs:
5050
java-version: 17.0.6
5151

5252
- name: Build Docker image
53-
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
53+
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
5454
with:
5555
arguments: ":smoke-tests:images:fake-backend:windowsBackendImageBuild"
5656
cache-read-only: true

.github/workflows/publish-smoke-test-servlet-images.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
password: ${{ secrets.GITHUB_TOKEN }}
6868

6969
- name: Set up Gradle cache
70-
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
70+
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
7171
with:
7272
# only push cache for one matrix option per OS since github action cache space is limited
7373
cache-read-only: ${{ matrix.smoke-test-suite != 'tomcat' }}

.github/workflows/release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
java-version: 17.0.6
8787

8888
- name: Build and publish artifacts
89-
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
89+
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
9090
with:
9191
arguments: assemble publishToSonatype closeAndReleaseSonatypeStagingRepository
9292
env:
@@ -96,7 +96,7 @@ jobs:
9696
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
9797

9898
- name: Build and publish gradle plugins
99-
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
99+
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
100100
env:
101101
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
102102
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}

.github/workflows/reusable-muzzle.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
java-version: 17.0.6
3535

3636
- name: Run muzzle
37-
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
37+
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
3838
with:
3939
arguments: ${{ matrix.task }}
4040
cache-read-only: ${{ inputs.cache-read-only }}

.github/workflows/reusable-smoke-test-images.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
run: echo "TAG=$(date '+%Y%m%d').$GITHUB_RUN_ID" >> $GITHUB_ENV
6262

6363
- name: Set up Gradle cache
64-
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
64+
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
6565
with:
6666
cache-read-only: ${{ inputs.cache-read-only }}
6767

.github/workflows/reusable-test-indy.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
6868
GE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
6969
GE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}
70-
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
70+
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
7171
with:
7272
arguments: >
7373
check -x spotlessCheck
@@ -80,7 +80,7 @@ jobs:
8080
echo "test-tasks=$(cat test-tasks.txt | xargs echo | sed 's/\n/ /g')" >> $GITHUB_ENV
8181
8282
- name: Test
83-
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
83+
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
8484
env:
8585
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
8686
GE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}

.github/workflows/reusable-test-latest-deps.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
6161
GE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
6262
GE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}
63-
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
63+
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
6464
with:
6565
arguments: >
6666
check -x spotlessCheck
@@ -74,7 +74,7 @@ jobs:
7474
echo "test-tasks=$(cat test-tasks.txt | xargs echo | sed 's/\n/ /g')" >> $GITHUB_ENV
7575
7676
- name: Test
77-
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
77+
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
7878
env:
7979
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
8080
GE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}

CHANGELOG.md

+18
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22

33
## Unreleased
44

5+
- Remove deprecated config properties in favor of the new names (#10349):
6+
- `otel.instrumentation.kafka.client-propagation.enabled` ->
7+
`otel.instrumentation.kafka.producer-propagation.enabled`
8+
- `otel.instrumentation.netty.always-create-connect-span` ->
9+
`otel.instrumentation.netty.connection-telemetry.enabled`
10+
- `otel.instrumentation.http.capture-headers.client.request` ->
11+
`otel.instrumentation.http.client.capture-request-headers`
12+
- `otel.instrumentation.http.capture-headers.client.response` ->
13+
`otel.instrumentation.http.client.capture-response-headers`
14+
- `otel.instrumentation.http.capture-headers.server.request` ->
15+
`otel.instrumentation.http.server.capture-request-headers`
16+
- `otel.instrumentation.http.capture-headers.server.response` ->
17+
`otel.instrumentation.http.server.capture-response-headers`
18+
- `otel.instrumentation.http.client.emit-experimental-metrics` ->
19+
`otel.instrumentation.http.client.emit-experimental-telemetry`
20+
- `otel.instrumentation.http.server.emit-experimental-metrics` ->
21+
`otel.instrumentation.http.server.emit-experimental-telemetry`
22+
523
## Version 2.0.0 (2024-01-12)
624

725
The 2.0.0 release contains significant breaking changes that will most likely affect all users,

docs/supported-libraries.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ These are the supported libraries and frameworks:
2929
| [Apache DBCP](https://commons.apache.org/proper/commons-dbcp/) | 2.0+ | [opentelemetry-apache-dbcp-2.0](../instrumentation/apache-dbcp-2.0/library) | [Database Pool Metrics] |
3030
| [Apache Dubbo](https://github.com/apache/dubbo/) | 2.7+ | [opentelemetry-apache-dubbo-2.7](../instrumentation/apache-dubbo-2.7/library-autoconfigure) | [RPC Client Spans], [RPC Server Spans] |
3131
| [Apache HttpAsyncClient](https://hc.apache.org/index.html) | 4.1+ | N/A | [HTTP Client Spans], [HTTP Client Metrics] |
32-
| [Apache HttpClient](https://hc.apache.org/index.html) | 2.0+ | [opentelemetry-apache-httpclient-4.3](../instrumentation/apache-httpclient/apache-httpclient-4.3/library) | [HTTP Client Spans], [HTTP Client Metrics] |
32+
| [Apache HttpClient](https://hc.apache.org/index.html) | 2.0+ | [opentelemetry-apache-httpclient-4.3](../instrumentation/apache-httpclient/apache-httpclient-4.3/library),<br>[opentelemetry-apache-httpclient-5.2](../instrumentation/apache-httpclient/apache-httpclient-5.2/library) | [HTTP Client Spans], [HTTP Client Metrics] |
3333
| [Apache Kafka Producer/Consumer API](https://kafka.apache.org/documentation/#producerapi) | 0.11+ | [opentelemetry-kafka-clients-2.6](../instrumentation/kafka/kafka-clients/kafka-clients-2.6/library) | [Messaging Spans] |
3434
| [Apache Kafka Streams API](https://kafka.apache.org/documentation/streams/) | 0.11+ | N/A | [Messaging Spans] |
3535
| [Apache MyFaces](https://myfaces.apache.org/) | 1.2+ (not including 3.x yet) | N/A | Provides `http.route` [2], Controller Spans [3] |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Library Instrumentation for Apache Http client version 5.2
2+
3+
Provides OpenTelemetry instrumentation for [Apache Http Client 5.2](https://hc.apache.org/httpcomponents-client-5.2.x/).
4+
5+
## Quickstart
6+
7+
### Add these dependencies to your project
8+
9+
Replace `OPENTELEMETRY_VERSION` with the [latest
10+
release](https://search.maven.org/search?q=g:io.opentelemetry.instrumentation%20AND%20a:opentelemetry-apache-httpclient-5.2).
11+
12+
For Maven, add to your `pom.xml` dependencies:
13+
14+
```xml
15+
<dependencies>
16+
<dependency>
17+
<groupId>io.opentelemetry.instrumentation</groupId>
18+
<artifactId>opentelemetry-apache-httpclient-5.2</artifactId>
19+
<version>OPENTELEMETRY_VERSION</version>
20+
</dependency>
21+
</dependencies>
22+
```
23+
24+
For Gradle, add to your dependencies:
25+
26+
```groovy
27+
implementation("io.opentelemetry.instrumentation:opentelemetry-apache-httpclient-5.2:OPENTELEMETRY_VERSION")
28+
```
29+
30+
### Usage
31+
32+
The instrumentation library provides the class `ApacheHttpClient5Telemetry` that has a builder
33+
method and allows the creation of an instance of the `HttpClientBuilder` to provide
34+
OpenTelemetry-based spans and context propagation:
35+
36+
```java
37+
import io.opentelemetry.api.OpenTelemetry;
38+
import io.opentelemetry.instrumentation.apachehttpclient.v5_2.ApacheHttpClient5Telemetry;
39+
import org.apache.hc.client5.http.classic.HttpClient;
40+
import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;
41+
42+
public class ApacheHttpClient5Configuration {
43+
44+
private OpenTelemetry openTelemetry;
45+
46+
public ApacheHttpClient5Configuration(OpenTelemetry openTelemetry) {
47+
this.openTelemetry = openTelemetry;
48+
}
49+
50+
// creates a new http client builder for constructing http clients with open telemetry instrumentation
51+
public HttpClientBuilder createBuilder() {
52+
return ApacheHttpClient5Telemetry.builder(openTelemetry).build().newHttpClientBuilder();
53+
}
54+
55+
// creates a new http client with open telemetry instrumentation
56+
public HttpClient newHttpClient() {
57+
return ApacheHttpClient5Telemetry.builder(openTelemetry).build().newHttpClient();
58+
}
59+
}
60+
```

0 commit comments

Comments
 (0)