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

Add constrained labels and Constrained variant for all MetricVecs #1151

Merged
merged 2 commits into from
Dec 13, 2022

Commits on Dec 13, 2022

  1. Introduce MetricVecOpts and add constraints to VariableLabels

    MetricVecOpts exposes options specific to MetricVec initialisation. The
    first option exposed by MetricVecOpts are constraints on VariableLabels,
    allowing restrictions on the possible values a label can take, to
    prevent cardinality explosion when the label value comes from a
    non-trusted source (as a user input or HTTP header).
    
    Signed-off-by: Quentin Devos <4972091+Okhoshi@users.noreply.github.com>
    Okhoshi committed Dec 13, 2022
    Configuration menu
    Copy the full SHA
    578920e View commit details
    Browse the repository at this point in the history
  2. Add tests

    Signed-off-by: Quentin Devos <4972091+Okhoshi@users.noreply.github.com>
    Okhoshi committed Dec 13, 2022
    Configuration menu
    Copy the full SHA
    0ec2554 View commit details
    Browse the repository at this point in the history