spring-cloud / spring-cloud/spring-cloud-gateway
Spring Cloud Gateway MVC does not populate http_client_requests_* metrics correctly
Open
Nobody has claimed this yet.
waiting-for-triage
- Dominant language
- Java
- Stars
- 4.9k
- Forks
- 3.5k
- Avg merge
- 20h 57m
- Merged PRs (30d)
- 8
Description
Spring Cloud Gateway MVC (4.1.9)
While the http_client_requests_* metrics are populated, the uri tag is always set to none e.g.
http_client_requests_active_seconds_count{app="api-gateway-svc", application="api-gateway",
backstage_io_kubernetes_id="api-gateway-svc", client_name="address-svc.common", critical="true",
environment="prd", exception="none", instance="REDACTED", job="kubernetes-pods",
kubernetes_namespace="common", kubernetes_pod_name="api-gateway-svc-microservice-base-59c5c7dd6b-rnflv",
method="GET", outcome="UNKNOWN", pod_template_hash="59c5c7dd6b", release="api-gateway-svc",
security_istio_io_tlsMode="istio",
service_istio_io_canonical_name="api-gateway-svc", service_istio_io_canonical_revision="378",
status="CLIENT_ERROR", team_name="dev-ex", uri="none", version="378"}
Addtionally, outcome is set to "UNKNOWN" when status is "CLIENT_ERROR"
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 reproducing the Spring Cloud Gateway MVC 4.1.9 metrics output described in the issue, focusing on http_client_requests_* and its uri and outcome tags. Trace the metric instrumentation involved and verify that completed work reports the appropriate URI instead of none and does not report UNKNOWN for CLIENT_ERROR status.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- api, backend, observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100