Skip to content
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

fix: More metric / label name validations #16

Merged
merged 10 commits into from
Oct 18, 2023
Merged

fix: More metric / label name validations #16

merged 10 commits into from
Oct 18, 2023

Conversation

slowli
Copy link
Collaborator

@slowli slowli commented Oct 10, 2023

What ❔

  • Unifies metric and label name validation and performs it using functions from the main crate. Previously, label names were not checked in some cases.
  • Improves spanning of validation errors.
  • Tests errors using trybuild.

Why ❔

  • Label name validation is necessary to conform to Prometheus / Open Metrics text formats.
  • More intelligent error messages and spanning improve DevX.

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. not applicable
  • Code has been formatted and linted using cargo fmt and cargo clippy.

@slowli slowli marked this pull request as ready for review October 10, 2023 12:28
@slowli slowli requested a review from popzxc as a code owner October 10, 2023 12:28
@slowli slowli requested a review from RomanBrodetski October 10, 2023 12:28
@RomanBrodetski RomanBrodetski removed their request for review October 10, 2023 13:09
@slowli slowli merged commit 90e5423 into main Oct 18, 2023
5 checks passed
@slowli slowli deleted the more-validations branch October 18, 2023 13:33
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.

2 participants