feat(metrics): chart host application Telemetry.Metrics definitions - #65
Open
thiagoesteves wants to merge 1 commit into
Open
feat(metrics): chart host application Telemetry.Metrics definitions#65thiagoesteves wants to merge 1 commit into
thiagoesteves wants to merge 1 commit into
Conversation
Allow host applications to chart their own Telemetry.Metrics on the
Metrics page via config :observer_web, telemetry_metrics: [...] (or a
{module, function, args} tuple resolved at startup). The definitions
are appended to the built-in VM/Phoenix list consumed by
ObserverWeb.Telemetry.Consumer, so custom series flow through the
existing storage, retention and Metric Hub modes unchanged.
A new generic Custom chart component renders any metric key that no
dedicated component claims, showing the series unit when available.
Invalid config entries are dropped with a warning instead of breaking
telemetry startup.
Risk assessment:
- Impact: opt-in feature; without the new config the metrics list and
page rendering are unchanged (the Custom component only claims keys
no built-in chart renders, which previously rendered nothing).
- Blast radius: Observer.Web.Telemetry metrics list, Metrics page
render loop, new component; storage/consumer untouched.
- Regression risk: low - config is validated defensively and the suite
is green (403 tests, 96.0% coverage).
- Rollback plan: revert the commit; hosts that adopted the config just
lose the extra charts.
thiagoesteves
force-pushed
the
thiagoesteves/host-telemetry-metrics
branch
from
July 17, 2026 18:14
59479a2 to
fcd7f83
Compare
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.
What
Closes the main capability gap with Phoenix LiveDashboard: the Metrics page can now chart the host application's own
Telemetry.Metricsdefinitions, not just the built-in VM/Phoenix series.config :observer_web, telemetry_metrics: [...]accepts a list ofTelemetry.Metricsstructs, or{module, function, args}for runtime-resolved definitions (e.g. reusing the list your other reporters consume).ObserverWeb.Telemetry.Consumer, so custom series flow through the existing storage, retention, and Metric Hub (:local/:observer/:broadcast) modes unchanged - including history that survives app restarts in hub mode, which LiveDashboard cannot do.Customchart component renders any metric key no dedicated component claims, labeling the series with its unit when available.Host application metrics (opt-in)) and theObserver.Web.Telemetrymoduledoc.Why
Part of the roadmap derived from comparing ObserverWeb against OTP observer, observer_cli and Phoenix LiveDashboard: rendering host-app telemetry was the main reason teams still run LiveDashboard alongside ObserverWeb.
Risk assessment
Observer.Web.Telemetrymetrics list, Metrics page render loop, one new component; storage/consumer untouched.Checklist
mix testgreen (403 tests)mix coveralls96.0% (threshold 95%)mix credo --strict,mix sobelow,mix dialyzer,mix format --check-formattedclean🤖 Generated with Claude Code