Skip to content

URI tag of http.server.requests meter does NOT contain templated URI for jersey #486

@mikksoone

Description

@mikksoone

Created minimal working example by:

  1. start.spring.io with jersey, actuator, hateoas
  2. Created jersey endpoint:
@Path("ping")
@Component
public class PingResource {

	@GET
	@Path("/{id}")
	public String ping(@PathParam("id") String id) {
		return id;
	}
}
  1. Registered jersey endpoint
@Component
public class JerseyConfig extends ResourceConfig {

	public JerseyConfig() {
		this.register(PingResource.class);
	}

}
  1. Main method just in case:
@SpringBootApplication
@EnableAutoConfiguration
public class JerseymetricsApplication {

	public static void main(String[] args) {
		SpringApplication.run(JerseymetricsApplication.class, args);
	}
}
  1. Genereted metrics: curl http://localhost:8080/ping/3
  2. Output from metrics: curl http://localhost:15556/actuator/metrics/http.server.requests
{"name":"http.server.requests","measurements":[{"statistic":"COUNT","value":4.0},{"statistic":"TOTAL_TIME","value":0.142668096},{"statistic":"MAX","value":0.069735286}],"availableTags":[{"tag":"exception","values":["None"]},{"tag":"method","values":["GET"]},{"tag":"uri","values":["/ping/4","/ping/3"]},{"tag":"status","values":["200"]}]}%

The bug?: Notice how /ping/4 and /ping/3 are both uris, and its not templated to /ping/{id}

Metadata

Metadata

Assignees

No one assigned

    Labels

    doc-updateA documentation updatespring-boot changeChange is needed in Spring Boot for this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions