Skip to content

docs: add a docs/ directory - #815

Open
jacksontj wants to merge 2 commits into
masterfrom
docs/build-out-docs-dir
Open

jacksontj wants to merge 2 commits into
masterfrom
docs/build-out-docs-dir

Conversation

@jacksontj

Copy link
Copy Markdown
Owner

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.

Layout

Path Contents
docs/README.md Index
docs/getting-started.md Install → minimal config → first query
docs/configuration/ Config file anatomy, every server_groups option, every CLI flag, alert templates
docs/concepts/ Query path and pushdown rules; the anti-affinity merge algorithm
docs/guides/ Multi-tenancy, rules and alerting, native histograms, label filtering, security
docs/operations/ Endpoints and shutdown, metrics, troubleshooting
docs/development.md Build tags, vendoring, the prometheus fork, repo layout

configuration/README.md rather than index.md so GitHub auto-renders it when browsing the directory.

What is not changed

  • The README keeps its overview, quickstart and FAQ, and gains a Documentation section linking into docs/.
  • cmd/promxy/config.yaml stays as the annotated example and is linked from the docs.
  • Nothing was moved or deleted, so existing links and anchors still resolve.

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 /metrics output. 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

  1. Config.WebConfig is dead config. pkg/config/config.go:103 parses a top-level tls_server_config key in the main config file, but nothing reads it — pkg/server/api.go is driven entirely by --web.config.file. A user setting it today gets silent plaintext. Documented as having no effect.
  2. /-/quit is routed but inert. The vendored web handler registers it under --web.enable-lifecycle and closes quitCh, but main.go never selects on webHandler.Quit(). It answers "Goodbye!" and keeps running. Documented as "use SIGTERM".
  3. label_filter's default on_sync_error: abort blocks 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.mod fork pin. I left the README prose alone and did not repeat those claims in docs/.

🤖 Generated with Claude Code

https://claude.ai/code/session_015SskNFpr2yDqGLR2NYA6yW

jacksontj and others added 2 commits September 3, 2026 10:39
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant