Skip to content

fix: Escape label values #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

slowli
Copy link
Collaborator

@slowli slowli commented May 16, 2025

What ❔

Escapes ", \n (LF) and \ chars in label values.

Why ❔

The prometheus-client library doesn't escape label values as expected by OpenMetrics and Prometheus text formats. This leads to metric reporting getting corrupted if the label value contains any of the 3 chars mentioned above.

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted and linted using cargo fmt and cargo clippy.

@slowli slowli force-pushed the aov-pla-1133-escape-label-values-in-vise branch from 65f6563 to c1c0ea5 Compare May 16, 2025 10:30
@slowli slowli marked this pull request as ready for review May 16, 2025 10:50
@slowli slowli requested a review from popzxc as a code owner May 16, 2025 10:50
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