-
Notifications
You must be signed in to change notification settings - Fork 830
Add docs and example for OTel JVM runtime metrics #1861
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| - uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8 # v3.6.1 | ||
|
|
||
| - name: Remap main branch URLs to PR branch for link checking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not related to this PR, but a good opportunity to fix - last time I merged with this check failing and I didn't like it
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Adds documentation and a runnable example showing how to expose OpenTelemetry JVM runtime metrics (runtime-telemetry) alongside Prometheus Java client metrics on a single /metrics endpoint, including configuration notes and name-mapping guidance.
Changes:
- Adds a new runnable Maven example module demonstrating combined Prometheus + OTel JVM runtime metrics on one endpoint.
- Adds a new docs page describing standalone vs combined setup, configuration toggles, Java 17 JFR notes, and OTel→Prometheus metric name mapping.
- Adjusts link-lint workflow behavior to handle links pointing at
mainfor newly added files.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/pom.xml | Adds the new example module to the examples reactor build. |
| examples/example-otel-jvm-runtime-metrics/src/main/java/io/prometheus/metrics/examples/otelruntimemetrics/Main.java | Demonstrates wiring PrometheusMetricReader into a shared PrometheusRegistry and serving via HTTPServer. |
| examples/example-otel-jvm-runtime-metrics/pom.xml | Adds OTel SDK/exporter/runtime-telemetry dependencies and shaded runnable jar packaging. |
| examples/example-otel-jvm-runtime-metrics/README.md | Provides build/run instructions and expected /metrics output excerpts. |
| docs/content/otel/jvm-runtime-metrics.md | New documentation page describing OTel runtime metrics usage patterns and options. |
| docs/content/instrumentation/jvm.md | Adds a note linking to the new OTel runtime metrics alternative docs. |
| .github/workflows/lint-rest.yml | Updates permissions and adds PR-branch URL remapping for link checking. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jaydeluca
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couple small nitpicks but lgtm
Alternative for #1854
Summary
Test plan