Skip to content

Commit 9cb6f97

Browse files
committed
Merge branch 'main' of github.com:open-telemetry/opentelemetry-java-contrib into scraper-advanced-security
2 parents c6f2dc2 + 5c6be9d commit 9cb6f97

File tree

12 files changed

+646
-139
lines changed

12 files changed

+646
-139
lines changed

.github/renovate.json5

Lines changed: 112 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,119 +1,163 @@
11
{
2-
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": [
4-
"config:recommended",
5-
"docker:pinDigests",
6-
"helpers:pinGitHubActionDigests"
2+
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
3+
extends: [
4+
'config:recommended',
5+
'docker:pinDigests',
6+
'helpers:pinGitHubActionDigests',
77
],
8-
"ignorePresets": [":ignoreModulesAndTests"], // needed to keep maven-extension test pom files up-to-date
9-
"packageRules": [
8+
ignorePresets: [
9+
':ignoreModulesAndTests', // needed to keep maven-extension test pom files up-to-date
10+
],
11+
packageRules: [
1012
{
1113
// this is to reduce the number of renovate PRs
12-
"matchManagers": [
13-
"github-actions",
14-
"dockerfile"
14+
matchManagers: [
15+
'github-actions',
16+
'dockerfile',
17+
],
18+
extends: [
19+
'schedule:weekly',
1520
],
16-
"extends": ["schedule:weekly"],
17-
"groupName": "weekly update"
21+
groupName: 'weekly update',
1822
},
1923
{
20-
"matchPackageNames": [
21-
"io.opentelemetry:**",
22-
"io.opentelemetry.instrumentation:**",
23-
"io.opentelemetry.semconv:**",
24-
"io.opentelemetry.proto:**"
24+
matchPackageNames: [
25+
'io.opentelemetry:**',
26+
'io.opentelemetry.instrumentation:**',
27+
'io.opentelemetry.semconv:**',
28+
'io.opentelemetry.proto:**',
2529
],
2630
// Renovate's default behavior is only to update from unstable -> unstable if it's for the
2731
// major.minor.patch, under the assumption that you would want to update to the stable version
2832
// of that release instead of the unstable version for a future release
29-
"ignoreUnstable": false
33+
ignoreUnstable: false,
3034
},
3135
{
3236
// prevent 3.0.1u2 -> 3.0.1
33-
"matchPackageNames": ["com.google.code.findbugs:annotations"],
34-
"allowedVersions": "!/^3\\.0\\.1$/"
37+
matchPackageNames: [
38+
'com.google.code.findbugs:annotations',
39+
],
40+
allowedVersions: '!/^3\\.0\\.1$/',
3541
},
3642
{
3743
// disruptor 4+ requires Java 11+
38-
"matchPackageNames": ["com.lmax:disruptor"],
39-
"matchUpdateTypes": ["major"],
40-
"enabled": false
44+
matchPackageNames: [
45+
'com.lmax:disruptor',
46+
],
47+
matchUpdateTypes: [
48+
'major',
49+
],
50+
enabled: false,
4151
},
4252
{
4353
// junit-pioneer 2+ requires Java 11+
44-
"matchPackageNames": ["org.junit-pioneer:junit-pioneer"],
45-
"matchUpdateTypes": ["major"],
46-
"enabled": false
54+
matchPackageNames: [
55+
'org.junit-pioneer:junit-pioneer',
56+
],
57+
matchUpdateTypes: [
58+
'major',
59+
],
60+
enabled: false,
4761
},
4862
{
4963
// mockito 5+ requires Java 11+
50-
"matchPackagePrefixes": ["org.mockito:"],
51-
"matchUpdateTypes": ["major"],
52-
"enabled": false
64+
matchUpdateTypes: [
65+
'major',
66+
],
67+
enabled: false,
68+
matchPackageNames: [
69+
'org.mockito:{/,}**',
70+
],
5371
},
5472
{
5573
// agrona 1.23+ requires Java 17+
56-
"matchPackageNames": ["org.agrona:agrona"],
57-
"matchUpdateTypes": ["major", "minor"],
58-
"enabled": false
74+
matchPackageNames: [
75+
'org.agrona:agrona',
76+
],
77+
matchUpdateTypes: [
78+
'major',
79+
'minor',
80+
],
81+
enabled: false,
5982
},
6083
{
6184
// system-stubs-jupiter 2.1+ requires Java 11+
62-
"matchPackageNames": ["uk.org.webcompere:system-stubs-jupiter"],
63-
"matchUpdateTypes": ["major", "minor"],
64-
"enabled": false
85+
matchPackageNames: [
86+
'uk.org.webcompere:system-stubs-jupiter',
87+
],
88+
matchUpdateTypes: [
89+
'major',
90+
'minor',
91+
],
92+
enabled: false,
6593
},
6694
{
6795
// pinned version for compatibility
68-
"matchPackageNames": ["io.micrometer:micrometer-core"],
69-
"matchCurrentVersion": "1.5.0",
70-
"enabled": false
96+
matchPackageNames: [
97+
'io.micrometer:micrometer-core',
98+
],
99+
matchCurrentVersion: '1.5.0',
100+
enabled: false,
71101
},
72102
{
73103
// pinned version for compatibility
74-
"matchPackagePrefixes": ["org.apache.maven:"],
75-
"matchCurrentVersion": "3.5.0",
76-
"enabled": false
104+
matchCurrentVersion: '3.5.0',
105+
enabled: false,
106+
matchPackageNames: [
107+
'org.apache.maven:{/,}**',
108+
],
77109
},
78110
{
79-
"matchPackagePrefixes": ["com.diffplug.spotless"],
80-
"groupName": "spotless packages"
111+
groupName: 'spotless packages',
112+
matchPackageNames: [
113+
'com.diffplug.spotless{/,}**',
114+
],
81115
},
82116
{
83117
// pinned version for compatibility with java 8 JFR parsing
84-
"matchPackagePrefixes": ["org.openjdk.jmc"],
85-
"matchUpdateTypes": ["major"],
86-
"enabled": false
118+
matchUpdateTypes: [
119+
'major',
120+
],
121+
enabled: false,
122+
matchPackageNames: [
123+
'org.openjdk.jmc{/,}**',
124+
],
87125
},
88126
{
89127
// pinned version for compatibility
90-
"matchFileNames": ["jmx-scraper/test-webapp/build.gradle.kts"],
91-
"matchPackagePrefixes": ["jakarta.servlet:"],
92-
"matchCurrentVersion": "5.0.0",
93-
"enabled": false
128+
matchFileNames: [
129+
'jmx-scraper/test-webapp/build.gradle.kts',
130+
],
131+
matchCurrentVersion: '5.0.0',
132+
enabled: false,
133+
matchPackageNames: [
134+
'jakarta.servlet:{/,}**',
135+
],
94136
},
95137
{
96138
// intentionally using Spring Boot 2 in gcp-auth-extension in order to test with Java 8+
97-
"matchFileNames": [
98-
"gcp-auth-extension/build.gradle.kts"
139+
matchFileNames: [
140+
'gcp-auth-extension/build.gradle.kts',
99141
],
100-
"matchPackagePrefixes": [
101-
"org.springframework.boot"
142+
matchUpdateTypes: [
143+
'major',
102144
],
103-
"matchUpdateTypes": ["major"],
104-
"enabled": false,
105-
}
145+
enabled: false,
146+
matchPackageNames: [
147+
'org.springframework.boot{/,}**',
148+
],
149+
},
106150
],
107-
"customManagers": [
151+
customManagers: [
108152
{
109-
"customType": "regex",
110-
"datasourceTemplate": "npm",
111-
"fileMatch": [
112-
"^.github/workflows/"
113-
],
114-
"matchStrings": [
115-
"npx (?<depName>[^@]+)@(?<currentValue>[^\\s]+)"
116-
]
117-
}
118-
]
153+
customType: 'regex',
154+
datasourceTemplate: 'npm',
155+
fileMatch: [
156+
'^.github/workflows/',
157+
],
158+
matchStrings: [
159+
'npx (?<depName>[^@]+)@(?<currentValue>[^\\s]+)',
160+
],
161+
},
162+
],
119163
}

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ feature or via instrumentation, this project is hopefully for you.
1515
## Provided Libraries
1616

1717
| Status* | Library |
18-
| ------- |-------------------------------------------------------------------|
18+
|---------|-------------------------------------------------------------------|
1919
| beta | [AWS Resources](./aws-resources/README.md) |
2020
| stable | [AWS X-Ray SDK Support](./aws-xray/README.md) |
2121
| alpha | [AWS X-Ray Propagator](./aws-xray-propagator/README.md) |
22-
| alpha | [Baggage Processors](./baggage-processor/README.md) |
22+
| alpha | [Baggage Processors](./baggage-processor/README.md) |
2323
| alpha | [zstd Compressor](./compressors/compressor-zstd/README.md) |
2424
| alpha | [Consistent Sampling](./consistent-sampling/README.md) |
2525
| alpha | [Disk Buffering](./disk-buffering/README.md) |
@@ -29,6 +29,7 @@ feature or via instrumentation, this project is hopefully for you.
2929
| alpha | [JFR Connection](./jfr-connection/README.md) |
3030
| alpha | [JFR Events](./jfr-events/README.md) |
3131
| alpha | [JMX Metric Gatherer](./jmx-metrics/README.md) |
32+
| alpha | [JMX Metric Scraper](./jmx-scraper/README.md) |
3233
| alpha | [Kafka Support](./kafka-exporter/README.md) |
3334
| alpha | [OpenTelemetry Maven Extension](./maven-extension/README.md) |
3435
| alpha | [Micrometer MeterProvider](./micrometer-meter-provider/README.md) |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ testing {
136136
implementation(project(project.path))
137137

138138
implementation(enforcedPlatform("org.junit:junit-bom:5.11.4"))
139-
implementation(enforcedPlatform("org.testcontainers:testcontainers-bom:1.20.4"))
139+
implementation(enforcedPlatform("org.testcontainers:testcontainers-bom:1.20.5"))
140140
implementation(enforcedPlatform("com.google.guava:guava-bom:33.4.0-jre"))
141141
implementation(enforcedPlatform("com.linecorp.armeria:armeria-bom:1.31.3"))
142142

jmx-scraper/README.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,29 @@ Configuration can be provided through:
2929
`otel.jmx.service.url=service:jmx:rmi:///jndi/rmi://tomcat:9010/jmxrmi` is written to stdin.
3030
- environment variables: `OTEL_JMX_TARGET_SYSTEM=tomcat OTEL_JMX_SERVICE_URL=service:jmx:rmi:///jndi/rmi://tomcat:9010/jmxrmi java -jar scraper.jar`
3131

32-
SDK auto-configuration is being used, so all the configuration options can be set using the java
32+
SDK autoconfiguration is being used, so all the configuration options can be set using the java
3333
properties syntax or the corresponding environment variables.
3434

3535
For example the `otel.jmx.service.url` option can be set with the `OTEL_JMX_SERVICE_URL` environment variable.
3636

3737
## Configuration reference
3838

39-
| config option | description |
40-
|--------------------------|---------------------------------------------------------------------------------------------------------------------|
41-
| `otel.jmx.service.url` | mandatory JMX URL to connect to the remote JVM |
42-
| `otel.jmx.target.system` | comma-separated list of systems to monitor, mandatory unless a custom configuration is used |
43-
| `otel.jmx.config` | comma-separated list of paths to custom YAML metrics definition, mandatory when `otel.jmx.target.system` is not set |
44-
| `otel.jmx.username` | user name for JMX connection, mandatory when JMX authentication is enabled on target JVM |
45-
| `otel.jmx.password` | password for JMX connection, mandatory when JMX authentication is enabled on target JVM |
39+
| config option | default value | description |
40+
|--------------------------------|---------------|-------------------------------------------------------------------------------------------------------------------------------------------|
41+
| `otel.jmx.service.url` | - | mandatory JMX URL to connect to the remote JVM |
42+
| `otel.jmx.target.system` | - | comma-separated list of systems to monitor, mandatory unless `otel.jmx.config` is set |
43+
| `otel.jmx.config` | empty | comma-separated list of paths to custom YAML metrics definition, mandatory when `otel.jmx.target.system` is not set |
44+
| `otel.jmx.username` | - | user name for JMX connection, mandatory when JMX authentication is set on target JVM with`com.sun.management.jmxremote.authenticate=true` |
45+
| `otel.jmx.password` | - | password for JMX connection, mandatory when JMX authentication is set on target JVM with `com.sun.management.jmxremote.authenticate=true` |
46+
| `otel.jmx.remote.registry.ssl` | `false` | connect to an SSL-protected registry when enabled on target JVM with `com.sun.management.jmxremote.registry.ssl=true` |
47+
48+
When both `otel.jmx.target.system` and `otel.jmx.config` configuration options are used at the same time:
49+
50+
- `otel.jmx.target.system` provides ready-to-use metrics and `otel.jmx.config` allows to add custom definitions.
51+
- The metrics definitions will be the aggregation of both.
52+
- There is no guarantee on the priority or any ability to override the definitions.
53+
54+
If there is a need to override existing ready-to-use metrics or to keep control on the metrics definitions, using a custom YAML definition with `otel.jmx.config` is the recommended option.
4655

4756
Supported values for `otel.jmx.target.system`:
4857

jmx-scraper/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ testing {
3737
implementation("com.linecorp.armeria:armeria-junit5")
3838
implementation("com.linecorp.armeria:armeria-grpc")
3939
implementation("io.opentelemetry.proto:opentelemetry-proto:1.5.0-alpha")
40+
implementation("org.bouncycastle:bcprov-jdk18on:1.80")
41+
implementation("org.bouncycastle:bcpkix-jdk18on:1.80")
4042
}
4143
}
4244
}

0 commit comments

Comments
 (0)