Skip to content

Commit 7803053

Browse files
committed
pr review
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
1 parent 099768f commit 7803053

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

.github/workflows/lint-rest.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ jobs:
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:

docs/content/otel/jvm-runtime-metrics.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,11 @@ OpenTelemetrySdk openTelemetry =
9696
RuntimeMetrics 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
```

examples/example-otel-jvm-runtime-metrics/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
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>

0 commit comments

Comments
 (0)