Skip to content

Bug: uri metric label on gateway routes appears as "UNKNOWN" in prometheus export #891

@jrushto1

Description

@jrushto1

http_server_requests metrics uri label shows up as "UNKNOWN" on gateway routes when using spring cloud gateway with spring boot release 2.1.3. This bug seems to have been introduced between spring boot 2.1.1 and 2.1.2 releases. Sample project here.

http_server_requests_seconds_count{exception="SSLHandshakeException",method="GET",outcome="SERVER_ERROR",status="500",uri="UNKNOWN",} 2.0
http_server_requests_seconds_sum{exception="SSLHandshakeException",method="GET",outcome="SERVER_ERROR",status="500",uri="UNKNOWN",} 1.022870125

Steps to reproduce:

  1. Clone repo
  2. Start Application
  3. curL http://localhost:8080/test-service/200 a couple of times
  4. Go to http://localhost:8080/actuator/prometheus

N.B. The curl command will result in 500 server errors due to separate https routing issue on gateway.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions