spring-cloud / spring-cloud/spring-cloud-gateway

Use GATEWAY_REQUEST_URL_ATTR value as tag in GatewayMetricsFilter

Open
#487 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

icebox
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.