Repository navigation
fix(core): show the Metrics tab for covered endpoints - #6050
Merged
norman-abramovitz merged 3 commits intoOct 22, 2026
Merged
Conversation
The application, Cloud Foundry and Kubernetes node pages add a Metrics tab when EndpointsService.hasMetrics() says a metrics endpoint covers the endpoint. hasMetrics() read endpoint.metricsAvailable, which only the ngrx endpoint reducer set, from the metrics link in the endpoint's metadata. That reducer went in 858d56b and nothing replaced it, so the tab has not appeared since, even with Prometheus connected. Read metadata.metrics, as endpointHasMetrics() already did; it had no callers. Remove the helper that read the flag and the flag itself.
The parent range selector started the range manager before it subscribed to its requests. Starting the manager commits the first windowed request at once, on a plain Subject, so the charts missed it and fetched their base request, which has no start or end. Prometheus rejected it, and every chart said "No results found" until the first 10 second poll. Subscribe first, then start the manager.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Metrics tab has not appeared on an application, a Cloud Foundry or a Kubernetes node page since 858d56b (May 2026), even with a metrics endpoint registered and connected. When it did open, its charts said "No results found" for the first 10 seconds. This PR fixes both.
What changes
Metrics tab (
fix(core): show the Metrics tab for covered endpoints)EndpointsService.hasMetrics()says a metrics endpoint covers the endpoint.hasMetrics()readendpoint.metricsAvailable, which only the ngrx endpoint reducer set, from the metrics link in the endpoint's metadata. That reducer was removed in 858d56b and nothing replaced it.hasMetrics()now readsmetadata.metrics, asendpointHasMetrics()already did. That helper had no callers. The helper that read the flag and the flag itself are removed.First chart request (
fix(metrics): send the time window on first load)Subject, so the charts missed it and fetched their base request, which has no start or end.Tests
endpoints.service.spec.ts:hasMetrics()is true for an endpoint whose metadata carries a metrics link. It failed on develop.metrics-parent-range-selector.component.spec.ts: the first request the charts receive carries the time window. It failed on develop.make check gate: passed (4583 tests passed, 1 skipped). Go lint: 0 issues in all seven modules.Live check
Against a Cloud Foundry lab with a real Prometheus endpoint connected: on an application page the Metrics tab appears, and its first chart requests carry the time window (
startandendset, all 200) instead of the base request Prometheus rejected. Checked before and after the rebase onto develop f88c08f; the second run was on develop + this branch + #6044.Release note:
changelog.d/0025-metrics-tab.md.AI disclosure (RFC-0047): prepared with AI coding assistance; reviewed by the author.