Skip to content

docs: expand metric mapping examples#346

Open
ihopenre-eng wants to merge 1 commit into
prometheus:masterfrom
ihopenre-eng:docs/mapping-examples
Open

docs: expand metric mapping examples#346
ihopenre-eng wants to merge 1 commit into
prometheus:masterfrom
ihopenre-eng:docs/mapping-examples

Conversation

@ihopenre-eng

Copy link
Copy Markdown

Fixes #82.

@pedro-stanaka, this expands the mapping documentation with Graphite-specific examples and behavior.

Summary

  • separate glob and regular expression mapping examples
  • document glob precedence, regex ordering, and capture group references
  • compare default unmatched handling, strict matching, a diagnostic catch-all, and an explicit drop rule
  • correct the existing sanitized metric name example
  • call out the cardinality cost of retaining original names as labels

Verification

  • validated the regex, catch-all, and drop YAML snippets with MetricMapper.InitFromYAMLString and GetMapping
  • go test ./cmd/graphite_exporter ./collector
  • go test ./e2e
  • go vet ./cmd/graphite_exporter ./collector ./e2e

Signed-off-by: ihopenre-eng <247072151+ihopenre-eng@users.noreply.github.com>
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.

Expand documentation of mapping

1 participant