Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: report correct request paths from workspace proxy metrics#21302

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
spikecurtis merged 1 commit intomainfromspike/api-metrics-path
Dec 17, 2025

Conversation

@spikecurtis
Copy link
Contributor

@spikecurtisspikecurtis commentedDec 17, 2025
edited
Loading

I noticed while looking at scale test metrics that we don't always report a useful path in the API request metrics.

image.png

There are a lot of requests with path/*. I chased this problem to the workspace proxy, where we mount a the proxy router as a child of a "root" router to support some high level endpoints likelatency-check.

Because we query the path from the Chi route context in the prometheus middlewarebefore the request is actually handled, we can have a partially resolved pattern match only corresponding to the root router. The fix is to always re-resolve the path, rather than accept a partially resolved path.

@spikecurtisGraphite App
Copy link
ContributorAuthor

This stack of pull requests is managed byGraphite. Learn more aboutstacking.

@spikecurtisspikecurtis marked this pull request as ready for reviewDecember 17, 2025 09:47
return""
}

ifpattern:=rctx.RoutePattern();pattern!="" {
Copy link
Contributor

Choose a reason for hiding this comment

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

IIRC the idea I had was to avoid double resolution as much as possible, if you are confident that's not going to be the problem - the rest looks good

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

It would be nice to avoid, but since we need to get the path in normalized formbefore we actually handle the request, we need to resolve it here.

@spikecurtisspikecurtis merged commitc5fc6de intomainDec 17, 2025
37 checks passed
@spikecurtisspikecurtis deleted the spike/api-metrics-path branchDecember 17, 2025 17:08
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsDec 17, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@ibetitsmikeibetitsmikeibetitsmike approved these changes

Assignees

@spikecurtisspikecurtis

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@spikecurtis@ibetitsmike

[8]ページ先頭

©2009-2025 Movatter.jp