Repository navigation
feat(output): prometheus-scrape pull endpoint (PIPE-1488, BP-469) - #321
Open
Dylan-M wants to merge 2 commits into
Conversation
eKuG
requested changes
Sep 28, 2026
| sort.Slice(sorted, func(i, j int) bool { return sorted[i].Name < sorted[j].Name }) | ||
|
|
||
| var b strings.Builder | ||
| for _, fam := range sorted { |
There was a problem hiding this comment.
The registry keeps one family per label set, and this loop writes # HELP/# TYPE for each one, so system_cpu_time got 80 TYPE lines. promtool check metrics fails with text format parsing error in line 13: second HELP line for metric name "system_cpu_time", and client_golang/expfmt-based consumers reject the scrape. The Prometheus server tolerates it.
| func (r *registry) upsert(fam prommap.MetricFamily) { | ||
| k := familyKey(fam) | ||
| r.mu.Lock() | ||
| r.fams[k] = fam |
Assisted-By: Claude Opus 4.8
…et_info Assisted-By: Claude Opus 5.5
Dylan-M
force-pushed
the
dylanmyers/pipe-1488-prometheus-scrape-output-pull-endpoint
branch
from
September 28, 2026 18:09
ee5b3c0 to
c791197
Compare
eKuG
approved these changes
Sep 28, 2026
eKuG
added this pull request to stack #326
September 28, 2026 18:41
This branch has not been deployed
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.
Proposed Change
Adds a
prometheus-scrapeoutput: a metrics-only pull endpoint. It hosts an HTTP/metricsendpoint in Prometheus text exposition format, so a Prometheus server or the collectorprometheusreceiverscrapes blitz directly. Sibling to the push-basedprometheus-remote-writeoutput; both serialize from the sharedinternal/prommapmodel.The output keeps the latest value per series (name, type, label set) in an in-memory registry and serves a snapshot on each scrape.
By default no explicit timestamp is written and the scraper stamps at scrape time (idiomatic).
Option
emitTimestamps: trueappends each sample's millisecond timestamp (rare, but does exist in the wild).Hand-rolled as a Round 3 output now. Will need to migrate to the later Effector / Push Core server model.
Checklist