Skip to content

Add prometheus metric for in flight requests #17212

@deansheather

Description

@deansheather

Add a prometheus gauge metric that tracks the amount of in flight requests. Using a middleware, we would increment the gauge, and decrement it with a deferred function.

This metric will be useful to detect strange behavior (like websocket spam) or something, which will be super useful to alert on especially once we have #16904.

If it's easy, this should also label by route pattern e.g. route="/api/v2/workspaceagents/:id or something. Don't include IDs in the metrics to avoid ballooning labels.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions