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

Unified Storage: Modify handler metric label when for grafana api server #87851

Conversation

owensmallwood
Copy link
Contributor

@owensmallwood owensmallwood commented May 14, 2024

When collecting request metrics, all requests to the grafana apiserver have a handler label of /apis/*.

We need to be able to gather request metrics per group, so I changed the metrics middleware to modify the handler label from /apis/* to /apis/{group}.

@owensmallwood owensmallwood requested review from DanCech and a team May 14, 2024 17:22
@owensmallwood owensmallwood self-assigned this May 14, 2024
@owensmallwood owensmallwood requested a review from a team as a code owner May 14, 2024 17:22
@owensmallwood owensmallwood requested review from leonorfmartins and removed request for a team May 14, 2024 17:22
@grafana-delivery-bot grafana-delivery-bot bot added this to the 11.1.x milestone May 14, 2024
@owensmallwood owensmallwood requested a review from a team May 14, 2024 17:40
@@ -57,6 +57,14 @@ var unnamedHandlers = []struct {

// RouteOperationName receives the route operation name from context, if set.
func RouteOperationName(req *http.Request) (string, bool) {
// all requests to the grafana k8s api server have a handler of /apis/*. This modifies that to be /apis/{kind}.
Copy link
Member

@ryantxu ryantxu May 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// all requests to the grafana k8s api server have a handler of /apis/*. This modifies that to be /apis/{kind}.
// all requests to the grafana k8s api server have a handler of /apis/*. This modifies that to be /apis/{group}.

Kind (or resource) is later in the url

@owensmallwood
Copy link
Contributor Author

Closing bc we already have apiserver metrics

@grafana-delivery-bot grafana-delivery-bot bot removed this from the 11.1.x milestone May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants