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

Allow templatize in labels #265

Open
bLd75 opened this issue Oct 26, 2023 · 1 comment
Open

Allow templatize in labels #265

bLd75 opened this issue Oct 26, 2023 · 1 comment

Comments

@bLd75
Copy link

bLd75 commented Oct 26, 2023

Currently it's not possible to use variables in metrics labels, but some APIs return responses without the input.
It would be great to be able to use variable values in metric labels.

Example

      labels:
        input_value: '{{ .myVal | first }}'

Error returned

caller=collector.go:134 level=error msg="Failed to parse jsonpath" err="unrecognized character in action: U+007B '{'" path="{{ .myVal | first }}"

Thanks in advance!

@davordbetter
Copy link

This would be very useful.
Additionally, being able to templatize headers would be great too.

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

No branches or pull requests

2 participants