Conversation
Until now the only user-facing documentation was the README (overview +
FAQ) and the ~300 lines of YAML comments in cmd/promxy/config.yaml. A
number of things that exist in code had no prose documentation at all:
the CLI flags, the query path, the metrics promxy exposes, the feature
guides, and the remote_write_exporter binary.
This adds docs/ as plain markdown (no site generator, nothing new to
maintain in CI), organized as:
getting-started install -> minimal config -> first query
configuration/ config file anatomy, every server_groups
option, every CLI flag, alert templates
concepts/ query path and pushdown rules; the
anti-affinity merge algorithm
guides/ multi-tenancy, rules and alerting, native
histograms, label filtering, security
operations/ endpoints and shutdown, metrics,
troubleshooting
development.md build tags, vendoring, the prometheus fork
The README keeps its overview, quickstart and FAQ and gains a link to
docs/; cmd/promxy/config.yaml stays as the annotated example. Nothing
was moved or deleted, so existing links and anchors still resolve.
Content was written against the source rather than paraphrased from the
config comments. The metrics reference in particular was checked against
a running promxy, so the metric names, label sets and the note about
which series only appear after their first observation reflect actual
/metrics output.
Three things documented as-is that may be worth fixing separately:
- Config.WebConfig (`tls_server_config` in the main config file) is
parsed in pkg/config/config.go but never read; pkg/server/api.go is
driven entirely by --web.config.file.
- /-/quit is routed by the embedded prometheus web handler under
--web.enable-lifecycle, but main.go never selects on Quit(), so it
answers "Goodbye!" and keeps running.
- label_filter's default on_sync_error: abort blocks startup with no
log output at default level when a downstream is unreachable.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015SskNFpr2yDqGLR2NYA6yW
Editing pass for concision. Cuts motivational preambles that restate the
README, meta-commentary ("this is worth stating precisely", "the naive
implementation would..."), and editorial asides that carried no
information. Converts several prose explanations to tables where the
content was really a set of options.
No facts, tables, examples or links removed; ~11.9k words -> ~10.0k.
All internal links and anchors re-verified.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015SskNFpr2yDqGLR2NYA6yW
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.
Until now the only user-facing documentation was the README (overview + FAQ) and the ~300 lines of YAML comments in
cmd/promxy/config.yaml. A number of things that exist in code had no prose documentation at all: the CLI flags, the query path, the metrics promxy exposes, the feature guides, and theremote_write_exporterbinary.This adds
docs/as plain markdown — no site generator, nothing new to maintain in CI.Layout
docs/README.mddocs/getting-started.mddocs/configuration/server_groupsoption, every CLI flag, alert templatesdocs/concepts/docs/guides/docs/operations/docs/development.mdconfiguration/README.mdrather thanindex.mdso GitHub auto-renders it when browsing the directory.What is not changed
docs/.cmd/promxy/config.yamlstays as the annotated example and is linked from the docs.On accuracy
Content was written against the source rather than paraphrased from the config comments. The metrics reference in particular was checked against a running promxy, so the metric names, label sets (
server_group_request_duration_seconds{host,call,status},server_group_targets{ordinal,name}) and the note about which series only appear after their first observation reflect actual/metricsoutput. The error format quoted in the troubleshooting doc is copied from live output too.All ~60 internal links and anchors were verified to resolve, using GitHub's slug rules.
Three things documented as-is that may be worth fixing separately
Config.WebConfigis dead config.pkg/config/config.go:103parses a top-leveltls_server_configkey in the main config file, but nothing reads it —pkg/server/api.gois driven entirely by--web.config.file. A user setting it today gets silent plaintext. Documented as having no effect./-/quitis routed but inert. The vendored web handler registers it under--web.enable-lifecycleand closesquitCh, butmain.gonever selects onwebHandler.Quit(). It answers "Goodbye!" and keeps running. Documented as "use SIGTERM".label_filter's defaulton_sync_error: abortblocks startup silently when a downstream is unreachable — no log output at default level, so it looks like a hang. (Hit this accidentally while testing.) The retry loop is intentional and documented, but a periodic "blocked waiting on label_filter sync" warning would help.Also worth noting: the README FAQ's version claims ("a fork based on prometheus 2.24", "as recent as 2.13") look stale against the current
go.modfork pin. I left the README prose alone and did not repeat those claims indocs/.🤖 Generated with Claude Code
https://claude.ai/code/session_015SskNFpr2yDqGLR2NYA6yW