File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
examples/example-otel-jvm-runtime-metrics Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 2222 - name : Remap main branch URLs to PR branch for link checking
2323 env :
2424 GITHUB_HEAD_REF : ${{ github.head_ref }}
25+ PR_HEAD_REPO : ${{ github.event.pull_request.head.repo.full_name }}
2526 run : |
26- sed -i "/^remap = \[$/a\ \"https://github.com/prometheus/client_java/blob/main/(.*) https://github.com/prometheus/client_java /blob/${GITHUB_HEAD_REF}/\$1\"," .github/config/lychee.toml
27- sed -i "/^remap = \[$/a\ \"https://github.com/prometheus/client_java/tree/main/(.*) https://github.com/prometheus/client_java /tree/${GITHUB_HEAD_REF}/\$1\"," .github/config/lychee.toml
27+ sed -i "/^remap = \[$/a\ \"https://github.com/prometheus/client_java/blob/main/(.*) https://github.com/${PR_HEAD_REPO} /blob/${GITHUB_HEAD_REF}/\$1\"," .github/config/lychee.toml
28+ sed -i "/^remap = \[$/a\ \"https://github.com/prometheus/client_java/tree/main/(.*) https://github.com/${PR_HEAD_REPO} /tree/${GITHUB_HEAD_REF}/\$1\"," .github/config/lychee.toml
2829
2930 - name : Lint for pull requests
3031 env :
Original file line number Diff line number Diff line change @@ -96,9 +96,11 @@ OpenTelemetrySdk openTelemetry =
9696RuntimeMetrics runtimeMetrics =
9797 RuntimeMetrics . builder(openTelemetry). build();
9898
99- // Close on shutdown to stop JMX metric collection
100- Runtime . getRuntime()
101- .addShutdownHook(new Thread (runtimeMetrics:: close));
99+ // Close on shutdown to stop metric collection and server
100+ Runtime . getRuntime(). addShutdownHook(new Thread (() - > {
101+ runtimeMetrics. close();
102+ prometheusServer. close();
103+ }));
102104
103105// Scrape at http://localhost:9464/metrics
104106```
Original file line number Diff line number Diff line change 2222 <dependency >
2323 <groupId >io.opentelemetry.instrumentation</groupId >
2424 <artifactId >opentelemetry-instrumentation-bom-alpha</artifactId >
25- <version >2.24.0-alpha </version >
25+ <version >${otel.instrumentation.version} </version >
2626 <type >pom</type >
2727 <scope >import</scope >
2828 </dependency >
You can’t perform that action at this time.
0 commit comments