Skip to content

docs: document juju_unit label injection for wildcard and non-wildcard scrape targets#246

Open
Abuelodelanada wants to merge 8 commits intotrack/2from
feat/juju-unit-metrics_documentation_track2
Open

docs: document juju_unit label injection for wildcard and non-wildcard scrape targets#246
Abuelodelanada wants to merge 8 commits intotrack/2from
feat/juju-unit-metrics_documentation_track2

Conversation

@Abuelodelanada
Copy link
Copy Markdown
Contributor

Issue

Document how the prometheus_scrape library injects the juju_unit topology label into Prometheus scrape jobs, covering both wildcard and non-wildcard targets.

Checklist

  • I have added or updated relevant documentation.
  • PR title makes an appropriate release note and follows conventional commits syntax.
  • Merge target is the correct branch, and relevant tandem backport PRs opened.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the documentation to explain how the prometheus_scrape library injects the juju_unit topology label into Prometheus scrape jobs for both wildcard and non-wildcard scrape targets, helping users understand when per-unit labeling is (and isn’t) applied.

Changes:

  • Document juju_unit label injection behavior for wildcard vs non-wildcard scrape targets under metrics-endpoint.
  • Extend the “exposing a metrics endpoint” how-to with guidance and an example for explicit (non-wildcard) targets.
  • Clean up minor Markdown formatting/indentation in the topology labels reference doc.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
docs/reference/juju-topology-labels.md Adds a new “metrics-endpoint” subsection describing juju_unit injection behavior for wildcard and non-wildcard scrape targets.
docs/how-to/exposing-a-metrics-endpoint.md Adds guidance and a code example for using explicit non-wildcard targets and explains juju_unit enrichment behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/how-to/exposing-a-metrics-endpoint.md Outdated
Comment thread docs/how-to/exposing-a-metrics-endpoint.md Outdated
Abuelodelanada and others added 4 commits April 15, 2026 16:57
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Jose Massón <939888+Abuelodelanada@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Jose Massón <939888+Abuelodelanada@users.noreply.github.com>
@Abuelodelanada Abuelodelanada requested a review from sed-i April 15, 2026 20:53
Copy link
Copy Markdown
Collaborator

@YanisaHS YanisaHS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

3 participants