Skip to content

Commit ae673f1

Browse files
authored
Merge branch 'main' into declarative-config-thread-details-provider
2 parents 7bb98aa + 701529d commit ae673f1

File tree

63 files changed

+1010
-394
lines changed

Some content is hidden

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

63 files changed

+1010
-394
lines changed

.fossa.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ targets:
44
only:
55
# only scanning the modules which are published
66
# (as opposed to internal testing modules
7+
- type: gradle
8+
path: ./
9+
target: ':declarative-config-bridge'
710
- type: gradle
811
path: ./
912
target: ':instrumentation-annotations'
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Survey on Merged PR by Non-Member
2+
3+
on:
4+
pull_request_target:
5+
types: [closed]
6+
7+
permissions:
8+
contents: read
9+
10+
env:
11+
PR_NUM: ${{ github.event.pull_request.number }}
12+
SURVEY_URL: https://docs.google.com/forms/d/e/1FAIpQLSf2FfCsW-DimeWzdQgfl0KDzT2UEAqu69_f7F2BVPSxVae1cQ/viewform?entry.1540511742=open-telemetry/opentelemetry-java-instrumentation
13+
14+
jobs:
15+
comment-on-pr:
16+
name: Add survey to PR if author is not a member
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: write
20+
pull-requests: write
21+
if: github.event.pull_request.merged == true
22+
steps:
23+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
24+
- uses: actions/create-github-app-token@v1
25+
id: otelbot-token
26+
with:
27+
app-id: ${{ vars.OTELBOT_APP_ID }}
28+
private-key: ${{ secrets.OTELBOT_RIVATE_KEY }}
29+
- name: Check if user is a member of the org
30+
id: check-membership
31+
run: |
32+
USERNAME=$(jq -r '.pull_request.user.login' "$GITHUB_EVENT_PATH")
33+
ORG="${{ github.repository_owner }}"
34+
STATUS=$(gh api "orgs/$ORG/members/$USERNAME" --silent && echo "true" || echo "false")
35+
if [[ "$STATUS" == "true" ]]; then
36+
echo "MEMBER_FOUND=true" >> $GITHUB_ENV
37+
else
38+
echo "MEMBER_FOUND=false" >> $GITHUB_ENV
39+
fi
40+
env:
41+
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
42+
43+
- name: Add comment to PR if author is not a member
44+
if: env.MEMBER_FOUND == 'false'
45+
run: |
46+
USERNAME=$(jq -r '.pull_request.user.login' "$GITHUB_EVENT_PATH")
47+
gh pr comment ${PR_NUM} --repo open-telemetry/opentelemetry-java-instrumentation --body "Thank you for your contribution @${USERNAME}! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this [survey](${SURVEY_URL})."
48+
env:
49+
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}

conventions/src/main/kotlin/otel.java-conventions.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ abstract class NettyAlignmentRule : ComponentMetadataRule {
143143
with(ctx.details) {
144144
if (id.group == "io.netty" && id.name != "netty") {
145145
if (id.version.startsWith("4.1.")) {
146-
belongsTo("io.netty:netty-bom:4.1.124.Final", false)
146+
belongsTo("io.netty:netty-bom:4.1.126.Final", false)
147147
} else if (id.version.startsWith("4.0.")) {
148148
belongsTo("io.netty:netty-bom:4.0.56.Final", false)
149149
}

instrumentation-api-incubator/README.md renamed to declarative-config-bridge/README.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
1-
# OpenTelemetry Instrumentation API Incubator
2-
3-
Instrumentation API Incubator is a collection of libraries that provide additional functionality
4-
for OpenTelemetry instrumentation and auto-configuration. It is intended to be used by
5-
instrumentation authors and auto-configuration providers to enhance their capabilities and provide a
6-
more consistent experience when working with OpenTelemetry.
7-
8-
## Declarative Config Bridge
1+
# Declarative Config Bridge
92

103
Declarative Config Bridge allows instrumentation authors to access configuration in a uniform way,
114
regardless of the configuration source.
125

136
The bridge allows you to read configuration using the system property style when dealing with
147
declarative configuration.
158

16-
### Example
9+
## Example
1710

1811
As an example, let's look at the inferred spans configuration.
1912
First, there is a configuration method that reads the properties and is unaware of the source of the
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
plugins {
2+
id("otel.java-conventions")
3+
id("otel.publish-conventions")
4+
id("otel.nullaway-conventions")
5+
}
6+
7+
group = "io.opentelemetry.instrumentation"
8+
9+
dependencies {
10+
compileOnly("io.opentelemetry:opentelemetry-sdk-extension-autoconfigure")
11+
implementation("io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi")
12+
implementation("io.opentelemetry:opentelemetry-api-incubator")
13+
14+
testImplementation("io.opentelemetry:opentelemetry-sdk-extension-incubator")
15+
testImplementation("io.opentelemetry:opentelemetry-sdk-extension-autoconfigure")
16+
17+
compileOnly("com.google.code.findbugs:annotations")
18+
testCompileOnly("com.google.code.findbugs:annotations")
19+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
package io.opentelemetry.instrumentation.api.incubator.sdk.config.bridge;
6+
package io.opentelemetry.instrumentation.config.bridge;
77

88
public final class ConfigPropertiesUtil {
99
private ConfigPropertiesUtil() {}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
package io.opentelemetry.instrumentation.api.incubator.sdk.config.bridge;
6+
package io.opentelemetry.instrumentation.config.bridge;
77

88
import static io.opentelemetry.api.incubator.config.DeclarativeConfigProperties.empty;
99

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
package io.opentelemetry.instrumentation.api.incubator.sdk.config.bridge;
6+
package io.opentelemetry.instrumentation.config.bridge;
77

88
import static io.opentelemetry.api.incubator.config.DeclarativeConfigProperties.empty;
99

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
package io.opentelemetry.instrumentation.api.incubator.sdk.config.bridge;
6+
package io.opentelemetry.instrumentation.config.bridge;
77

88
import static org.assertj.core.api.Assertions.assertThat;
99

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
package io.opentelemetry.instrumentation.api.incubator.sdk.config.bridge;
6+
package io.opentelemetry.instrumentation.config.bridge;
77

88
import static org.assertj.core.api.Assertions.assertThat;
99
import static org.mockito.ArgumentMatchers.eq;

0 commit comments

Comments
 (0)