Skip to content

URI tag for WebMvc and WebFlux metrics is empty, rather than "root", when the path pattern is empty #21392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

jkschneider
Copy link
Contributor

This handles the case where you have an empty path in @GetMapping, which yields an empty string for the uri tag.

# HELP http_server_requests_seconds  
# TYPE http_server_requests_seconds summary
http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/actuator/prometheus",} 48764.0
http_server_requests_seconds_sum{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/actuator/prometheus",} 1460.28618
http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="",} 1.0
http_server_requests_seconds_sum{exception="None",method="GET",outcome="SUCCESS",status="200",uri="",} 0.055319
# HELP http_server_requests_seconds_max  
# TYPE http_server_requests_seconds_max gauge
http_server_requests_seconds_max{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/actuator/prometheus",} 0.0599019
http_server_requests_seconds_max{exception="None",method="GET",outcome="SUCCESS",status="200",uri="",} 0.055319

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 11, 2020
@wilkinsona wilkinsona changed the title WebMvc/WebFlux metrics uri tag for empty path should be 'root' URI tag for WebMvc and WebFlux metrics is empty when the path pattern is empty May 11, 2020
@wilkinsona wilkinsona changed the title URI tag for WebMvc and WebFlux metrics is empty when the path pattern is empty URI tag for WebMvc and WebFlux metrics is empty, rather than "root", when the path pattern is empty May 11, 2020
@wilkinsona wilkinsona added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels May 11, 2020
@wilkinsona wilkinsona added this to the 2.2.x milestone May 11, 2020
@snicoll snicoll self-assigned this May 25, 2020
snicoll pushed a commit that referenced this pull request May 25, 2020
snicoll added a commit that referenced this pull request May 25, 2020
@snicoll snicoll closed this in 3f37282 May 25, 2020
@snicoll snicoll modified the milestones: 2.2.x, 2.2.8 May 25, 2020
@snicoll
Copy link
Member

snicoll commented May 25, 2020

Thanks @jkschneider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants