prometheus / prometheus/docs

Enhance writing_exporters.md: Add actionable examples, checklists, and improved structure

Open
#2,719 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/enhancement
Dominant language
TypeScript
Stars
717
Forks
1.2k
Avg merge
3d 15h
Merged PRs (30d)
19

Description

Description

Proposal:

I would like to significantly improve the writing_exporters.md documentation by adding concrete code examples, clarifying best practices, and introducing a more actionable structure for new and experienced exporter authors.

Motivation

The current writing_exporters.md is comprehensive but can be dense for newcomers and lacks practical, ready-to-use examples in several key sections. Given that this document is a primary reference for anyone building Prometheus exporters, improving its clarity and usability will have a high impact on the community and ecosystem.

Proposed Improvements
  • Add concrete code examples for:
    • Types & Labels (clarifying exporter vs. application labels)
    • Help strings (with troubleshooting context)
    • Scheduling (why exporters should not scrape on their own timers)
    • Exporter landing pages (minimal HTML example)
  • Introduce a quick-start checklist at the end for new exporter authors.
  • Clarify and expand best practices with before/after code snippets.
  • Improve document structure for easier navigation (e.g., section summaries, cross-links to related docs).
  • Add a troubleshooting section for common mistakes and anti-patterns.
Implementation Plan
  1. Refactor the document to group related concepts and add section summaries.
  2. Add new and improved code examples in Go (and/or pseudo-code where appropriate).
  3. Insert a quick-start checklist and a “common mistakes” section.
  4. Cross-link to related documentation (e.g., instrumentation.md, naming.md).
  5. Solicit feedback from exporter maintainers and users for further improvements.
Refrences

[current_structure] https://prometheus.io/docs/instrumenting/writing_exporters/
[expected} https://prometheus.io/docs/prometheus/latest/getting_started/
[expected (even better)] https://kubernetes.io/docs/tasks/debug/debug-cluster/resource-metrics-pipeline/

Request for Feedback
  • - Would maintainers and the community be open to a PR with these improvements?
  • - Are there any specific pain points, requests, or recent exporter patterns you would like to see addressed in this update?

If approved, I will submit the changes as a single, well-structured PR with clear commit history and before/after documentation diffs.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with writing_exporters.md and compare its current structure with instrumentation.md and naming.md. Add the proposed Go or pseudocode examples, section summaries, cross-links, quick-start checklist, and troubleshooting content, then verify that the document is easier to navigate and actionable for exporter authors.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.