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

Custom Metric Attributes #22

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

Conversation

rassmate
Copy link

@rassmate rassmate commented May 6, 2024

If applied, plugins can use the LabelExtractor to get the Labeler from the context and use the returned Labeler to add custom metric labels to the server and client metrics generated.

With this in place, a server plugin could easily add custom metrics to the standard ones to customize the metrics. We could for example write a simple plugin that decodes a JWT Bearer Token and adds a claim value to the server and client metrics.

The auth validator could then with some small adjustments allow for this to be configured since it already reads the JWT and the claims.

If applied, plugins can use the LabelExtractor to get the Labeler from the context and use the returned Labeler to add custom metric labels to the server and client metrics generated.
1. removed unused variable
2. refactoring test method to reduce complexity
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