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

Smarter path label flooding avoidance #39

Open
ghost opened this issue Jul 24, 2017 · 2 comments
Open

Smarter path label flooding avoidance #39

ghost opened this issue Jul 24, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Jul 24, 2017

@diasdavid and I have a little service running that we instrument with epimetheus. There's two little issues:

  • Every possible request coming from the internet is counted, e.g. path="/phpmyadmin" or path="/wp-login.php"
  • We have only one route, which is at the root and parameterized (/{email}). Every possible parameter is counted, e.g. path="/david@example.com" and path="/lars@example.com".

I'd propose using request.route.path instead of the actual path, which would end up as e.g. a path="/{email}" label. If the route is undefined, we'd fall back to path="".

We're using HAPI here, and I'm not sure whether the other server libraries expose the route of a request.

@ashoksahoo
Copy link

I have a flooding of /callback/id and my Prometheus server went down.

@sijmenvos
Copy link

Agreed, for Restify I'm also getting multiple paths:

http_request_duration_milliseconds{quantile="0.95",method="get",path="/api/resource/1/",cardinality="one",status="200"} 187
http_request_duration_milliseconds{quantile="0.9",method="get",path="/api/resource/2/",cardinality="one",status="200"} 59
etc..

In Restify I've changed the path to request.route.path so it shows /api/resource/:id/

Like in pull request: #24

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