Skip to content

Commit 26cc42d

Browse files
committed
Merge remote-tracking branch 'origin/main' into span-stacktrace
2 parents 4b10dda + 83a195d commit 26cc42d

File tree

278 files changed

+2536
-1581
lines changed

Some content is hidden

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

278 files changed

+2536
-1581
lines changed

.github/config/lychee.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
timeout = 30
2+
retry_wait_time = 5
3+
max_retries = 6
4+
max_concurrency = 4
5+
6+
# Check link anchors
7+
include_fragments = true
8+
9+
exclude = [
10+
# until https://github.com/open-telemetry/opentelemetry-java-contrib/issues/2221 is resolved
11+
"^https?://www.ibm.com",
12+
# excluding links to pull requests and issues is done for performance
13+
"^https://github.com/open-telemetry/opentelemetry-java-contrib/(issues|pull)/\\d+$",
14+
]

.github/copilot-instructions.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Copilot Instructions for OpenTelemetry Java Contrib
2+
3+
This repository provides observability instrumentation for Java applications.
4+
5+
## Code Review Priorities
6+
7+
### Style Guide Compliance
8+
9+
**PRIORITY**: Verify that all code changes follow the [Style Guide](../docs/style-guide.md). Check:
10+
11+
- Code formatting (auto-formatting, static imports, class organization)
12+
- Java language conventions (`final` usage, `@Nullable` annotations, `Optional` usage)
13+
- Performance constraints (hot path allocations)
14+
- Implementation patterns (SPI registration, configuration conventions)
15+
- Gradle conventions (Kotlin DSL, plugin usage, module naming)
16+
- Documentation standards (README files, deprecation processes)
17+
18+
### Critical Areas
19+
20+
- **Public APIs**: Changes affect downstream users and require careful review
21+
- **Performance**: Instrumentation must have minimal overhead
22+
- **Thread Safety**: Ensure safe concurrent access patterns
23+
- **Memory Management**: Prevent leaks and excessive allocations
24+
25+
### Quality Standards
26+
27+
- Proper error handling with appropriate logging levels
28+
- OpenTelemetry specification and semantic convention compliance
29+
- Resource cleanup and lifecycle management
30+
- Comprehensive unit tests for new functionality
31+
32+
### Test suites
33+
34+
This project uses gradle 9 which requires specifying test classes and paths explicitly.
35+
36+
For example, this will NOT work because it registers a `Test` without specifying the test classes or paths:
37+
38+
```kotlin
39+
tasks.register<Test>("IntegrationTestUserCreds") {
40+
dependsOn(tasks.shadowJar)
41+
dependsOn(tasks.named("copyAgent"))
42+
...
43+
}
44+
```
45+
46+
This is fixed by specifying the test classes and classpath explicitly:
47+
48+
```kotlin
49+
tasks.register<Test>("IntegrationTestUserCreds") {
50+
testClassesDirs = sourceSets.test.get().output.classesDirs
51+
classpath = sourceSets.test.get().runtimeClasspath
52+
53+
dependsOn(tasks.shadowJar)
54+
dependsOn(tasks.named("copyAgent"))
55+
...
56+
}
57+
```
58+
59+
## Coding Agent Instructions
60+
61+
When implementing changes or new features:
62+
63+
1. Follow all [Style Guide](../docs/style-guide.md) conventions and the Code Review Priorities above
64+
2. Run tests to ensure they still pass (use `./gradlew test` and `./gradlew integrationTest` as needed)
65+
3. **Always run `./gradlew spotlessApply`** after making code changes to ensure proper formatting
66+
4. Run markdown lint to ensure it still passes: `npx [email protected] -c .github/config/markdownlint.yml **/*.md`

.github/renovate.json5

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
],
8686
enabled: false,
8787
matchPackageNames: [
88-
'org.mockito:{/,}**',
88+
'org.mockito:**',
8989
],
9090
},
9191
{
@@ -123,25 +123,33 @@
123123
matchCurrentVersion: '3.5.0',
124124
enabled: false,
125125
matchPackageNames: [
126-
'org.apache.maven:{/,}**',
126+
'org.apache.maven:**',
127127
],
128128
},
129129
{
130130
groupName: 'spotless packages',
131131
matchPackageNames: [
132-
'com.diffplug.spotless{/,}**',
132+
'com.diffplug.spotless',
133+
'com.diffplug.spotless:**',
133134
],
134135
},
135136
{
136137
groupName: 'hipparchus packages',
137138
matchPackageNames: [
138-
'org.hipparchus{/,}**',
139+
'org.hipparchus:**',
139140
],
140141
},
141142
{
142143
groupName: 'errorprone packages',
143144
matchPackageNames: [
144-
'com.google.errorprone{/,}**',
145+
'com.google.errorprone:**',
146+
],
147+
},
148+
{
149+
groupName: 'jackson packages',
150+
matchPackageNames: [
151+
'com.fasterxml.jackson:**',
152+
'com.fasterxml.jackson.core:**',
145153
],
146154
},
147155
{
@@ -151,7 +159,7 @@
151159
],
152160
enabled: false,
153161
matchPackageNames: [
154-
'org.openjdk.jmc{/,}**',
162+
'org.openjdk.jmc:**',
155163
],
156164
},
157165
{
@@ -162,7 +170,7 @@
162170
matchCurrentVersion: '5.0.0',
163171
enabled: false,
164172
matchPackageNames: [
165-
'jakarta.servlet:{/,}**',
173+
'jakarta.servlet:**',
166174
],
167175
},
168176
{
@@ -175,7 +183,7 @@
175183
],
176184
enabled: false,
177185
matchPackageNames: [
178-
'org.springframework.boot{/,}**',
186+
'org.springframework.boot:**',
179187
],
180188
},
181189
],
@@ -202,5 +210,15 @@
202210
depNameTemplate: 'java',
203211
extractVersionTemplate: '^(?<version>\\d+)',
204212
},
213+
{
214+
customType: 'regex',
215+
datasourceTemplate: 'github-releases',
216+
managerFilePatterns: [
217+
'**/build.gradle.kts',
218+
],
219+
matchStrings: [
220+
'"https://github.com/(?<depName>[^/]+/[^/]+)/zipball/(?<currentValue>.+?)"',
221+
],
222+
},
205223
],
206224
}

.github/scripts/dependencies.Dockerfile

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/scripts/draft-change-log-entries.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ component_names["consistent-sampling/"]="Consistent sampling"
3535
component_names["disk-buffering/"]="Disk buffering"
3636
component_names["gcp-resources/"]="GCP resources"
3737
component_names["gcp-auth-extension/"]="GCP authentication extension"
38+
component_names["ibm-mq-metrics/"]="IBM MQ metrics"
3839
component_names["inferred-spans/"]="Inferred spans"
3940
component_names["jfr-connection/"]="JFR connection"
4041
component_names["jfr-events/"]="JFR events"
@@ -44,6 +45,7 @@ component_names["kafka-exporter/"]="Kafka exporter"
4445
component_names["maven-extension/"]="Maven extension"
4546
component_names["micrometer-meter-provider/"]="Micrometer MeterProvider"
4647
component_names["noop-api/"]="No-op API"
48+
component_names["opamp-client/"]="OpAMP client"
4749
component_names["processors/"]="Telemetry processors"
4850
component_names["prometheus-client-bridge/"]="Prometheus client bridge"
4951
component_names["runtime-attach/"]="Runtime attach"

.github/scripts/link-check.sh

Lines changed: 0 additions & 62 deletions
This file was deleted.

.github/scripts/lychee-config.toml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/scripts/package-lock.json

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/scripts/package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"//": "Dependencies for GitHub Actions workflows that use actions/github-script",
3+
"name": "github-scripts",
4+
"version": "1.0.0",
5+
"private": true,
6+
"dependencies": {
7+
"yaml": "2.8.1"
8+
}
9+
}

.github/workflows/assign-issue-owners.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ jobs:
1919
- name: Checkout repository
2020
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2121

22-
- name: Install js-yaml
23-
run: npm install js-yaml
22+
- name: Install yaml dependency used below
23+
run: npm install .github/scripts
2424

2525
- name: Parse component label and assign owners
26-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
26+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
2727
with:
2828
script: |
2929
const fs = require('fs');
30-
const yaml = require('js-yaml');
30+
const { parse } = require('yaml');
3131
3232
// Extract component name from label
3333
const labelName = context.payload.label.name;
@@ -42,7 +42,7 @@ jobs:
4242
4343
// Read and parse component_owners.yml
4444
const yamlContent = fs.readFileSync('.github/component_owners.yml', 'utf8');
45-
const data = yaml.load(yamlContent);
45+
const data = parse(yamlContent);
4646
4747
if (!data || !data.components) {
4848
core.setFailed('Invalid component_owners.yml structure');

0 commit comments

Comments
 (0)