spring-cloud / spring-cloud/spring-cloud-gateway
Add metric tracking the time spent inside gateway
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.9k
- Forks
- 3.5k
- Avg merge
- 20h 57m
- Merged PRs (30d)
- 8
Description
Is your feature request related to a problem? Please describe.
No. Feature is not related to a problem
Describe the solution you'd like
In the same vain as spring.cloud.gateway.requests it would be useful to have a metric like spring.cloud.gateway.internal.latency (example, not necessarily real name) tracking the time spend inside the gateway.
It would have the same kind of tags as spring.cloud.gateway.requests to be able to monitor the latency based on criterion.
Ex:
For a 100 ms round trip spring.cloud.gateway.requests , spring.cloud.gateway.requests would report 3ms. Meaning that gateway counted for 3% of the total time.
We do not have the capability to determine gateway latency and therefore cannot measure the impact of changes or improvements in our security or caching inside the gateway.
Describe alternatives you've considered
We considered developing our own metric collection inside that gateway but we're not familiar (tbh competent would be a better word).
Additional context
Versions
- spring-cloud-gateway: 3.1.0
- java 11
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing spring.cloud.gateway.requests metric instrumentation and its tags. Determine where gateway-internal time can be measured separately from round-trip time, then verify that the new metric reports gateway latency with equivalent tags and distinguishes it from total request duration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- api, backend, observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100