| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Signed-off-by: Jay DeLuca <jaydeluca4@gmail.com>
There was a problem hiding this comment.
This PR fixes an issue where the OpenTelemetry exporter was attempting to export metrics with empty data points, causing server errors. The fix addresses a scenario where metrics like jvm_memory_pool_allocated_bytes are registered with label names but have no data points until after garbage collection occurs.
Changes:
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| MetricDataFactory.java | Added @Nullable annotations and empty data point checks to all create methods (Counter, Gauge, Summary, Info, StateSet, Unknown) |
| ExportTest.java | Made OpenTelemetryExtension static and added test for metrics without data points |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
Signed-off-by: Jay DeLuca <jaydeluca4@gmail.com>
There was a problem hiding this comment.
great!
Sorry, something went wrong.
🤖 I have created a release *beep* *boop* --- <details><summary>1.5.1</summary> ## [1.5.1](v1.5.0...v1.5.1) (2026-03-19) ### Bug Fixes * **deps:** update dependency io.prometheus:prometheus-metrics-bom to v1.5.0 ([#1877](#1877)) ([043fc57](043fc57)) * **deps:** update dependency org.springframework.boot:spring-boot-starter-parent to v4.0.3 ([#1900](#1900)) ([0d800d0](0d800d0)) * **deps:** update jetty monorepo to v12.1.7 ([#1932](#1932)) ([5bd3b79](5bd3b79)) * **deps:** update junit-framework monorepo to v6.0.3 ([#1880](#1880)) ([05ad751](05ad751)) * exclude standalone examples from `mise run format` ([#1931](#1931)) ([537fb88](537fb88)) * Handle empty datapoints in otel exporter ([#1898](#1898)) ([59c8552](59c8552)) * inline set-version logic in build-release.sh ([#1884](#1884)) ([c050435](c050435)) * reduce lychee retries to avoid compounding GitHub 429s ([#1940](#1940)) ([cc17d6e](cc17d6e)) * remove version manipulation from build-release.sh ([#1886](#1886)) ([93e2b6d](93e2b6d)) * trigger Maven deploy on release-please published events ([#1966](#1966)) ([643d0e7](643d0e7)) * use /tree/ instead of /blob/ for directory URL ([#1944](#1944)) ([b81332e](b81332e)) * use maven release type for release-please ([#1967](#1967)) ([ff3bd2d](ff3bd2d)) ### Documentation * document DCO sign-off requirement for contributions ([#1937](#1937)) ([0860e77](0860e77)) </details> --- > [!IMPORTANT] > Close and reopen this PR to trigger CI checks. --------- Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
🤖 I have created a release *beep* *boop* --- ## [1.5.1](v1.5.0...v1.5.1) (2026-03-20) ### Bug Fixes * **deps:** update dependency io.prometheus:prometheus-metrics-bom to v1.5.0 ([#1877](#1877)) ([043fc57](043fc57)) * **deps:** update dependency org.springframework.boot:spring-boot-starter-parent to v4.0.3 ([#1900](#1900)) ([0d800d0](0d800d0)) * **deps:** update jetty monorepo to v12.1.7 ([#1932](#1932)) ([5bd3b79](5bd3b79)) * **deps:** update junit-framework monorepo to v6.0.3 ([#1880](#1880)) ([05ad751](05ad751)) * exclude standalone examples from `mise run format` ([#1931](#1931)) ([537fb88](537fb88)) * fix release-please PR title pattern and permissions ([#1978](#1978)) ([d737978](d737978)) * Handle empty datapoints in otel exporter ([#1898](#1898)) ([59c8552](59c8552)) * inline set-version logic in build-release.sh ([#1884](#1884)) ([c050435](c050435)) * reduce lychee retries to avoid compounding GitHub 429s ([#1940](#1940)) ([cc17d6e](cc17d6e)) * remove version manipulation from build-release.sh ([#1886](#1886)) ([93e2b6d](93e2b6d)) * trigger Maven deploy on release-please published events ([#1966](#1966)) ([643d0e7](643d0e7)) * use /tree/ instead of /blob/ for directory URL ([#1944](#1944)) ([b81332e](b81332e)) * use maven release type for release-please ([#1967](#1967)) ([ff3bd2d](ff3bd2d)) ### Documentation * document DCO sign-off requirement for contributions ([#1937](#1937)) ([0860e77](0860e77)) --- > [!IMPORTANT] > Close and reopen this PR to trigger CI checks. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
From @dhoard on slack, There was an error in the jmx-exporter project smoke tests:
I updated the method to return null when the data points are empty, which is then handled via the addUnlessNull method.
After applying this change locally, I ran the quick test a few times and the error was no longer present.