spring-cloud / spring-cloud/spring-cloud-gateway
Use GATEWAY_REQUEST_URL_ATTR value as tag in GatewayMetricsFilter
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.9k
- Forks
- 3.5k
- Avg merge
- 20h 57m
- Merged PRs (30d)
- 8
Description
I am using the Gateway for a route service in Cloud Foundry by applying the CloudFoundryRouteService predicate and the RequestHeaderToRequestUri filter for forwarding the request. The GatewayMetricsFilter uses the URI attribute of the route for tagging, but this URI value is irrelevant with the RequestHeaderToRequestUri filter.
Would it make sense to use the GATEWAY_REQUEST_URL_ATTR value (probably only its scheme, host and port) either as an additional tag or even as a replacement for the route's URI attribute? I could create a PR as it is only a small change but I am not sure if I'm missing something.
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 reading GatewayMetricsFilter and the handling of GATEWAY_REQUEST_URL_ATTR, then trace how CloudFoundryRouteService and RequestHeaderToRequestUri affect the forwarded request. Compare the route URI with the request URL used for metrics tags and inspect related tests; done means the intended tag value is agreed and covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- api, observability
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100