tricoder: add prometheus compatible metrics http endpoint#5
Open
DhanasekaranBaskar wants to merge 5 commits intoCloud-Foundations:masterfrom
Open
tricoder: add prometheus compatible metrics http endpoint#5DhanasekaranBaskar wants to merge 5 commits intoCloud-Foundations:masterfrom
DhanasekaranBaskar wants to merge 5 commits intoCloud-Foundations:masterfrom
Conversation
Vikramarjuna
reviewed
Jan 2, 2026
Vikramarjuna
approved these changes
Feb 16, 2026
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
This PR adds a built-in text metrics exporter to tricorder, exposing all metrics via a new
/prometheus-metrics/HTTP endpoint. It also updates documentation headings to Go#-style sections.Motivation
Tricorder currently exposes metrics via HTML, JSON, and Go RPC. This change extends tricorder’s functionality by introducing a text exposition–based metrics endpoint over HTTP, allowing external monitoring systems to scrape tricorder metrics directly without external adapters.
Key Changes
Text exporter
/foo/bar/baz→foo_bar_baz), lowercased and sanitized.*-totalmetrics, network stats under/sys/netif, and selected event-style metrics are treated as counters._seconds,_bytes,_celsius, with_totalfor counters).PrometheusNumericValueexposes the same normalized values.*_info,*_bool_info,*_time_seconds)._sumand_count.Metric initialization
GoTime,GoDuration) viaInitPromMetric/UpdatePromMetric, keeping the exporter independent of JSON encodings.HTTP endpoint
/prometheus-metrics/endpoint registered on the default HTTP mux.Documentation
#-style sections.Compatibility
This change is fully additive. Existing endpoints and APIs remain unchanged.