-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
doc-updateA documentation updateA documentation updatespring-boot changeChange is needed in Spring Boot for this issueChange is needed in Spring Boot for this issue
Description
Created minimal working example by:
- start.spring.io with jersey, actuator, hateoas
- Created jersey endpoint:
@Path("ping")
@Component
public class PingResource {
@GET
@Path("/{id}")
public String ping(@PathParam("id") String id) {
return id;
}
}
- Registered jersey endpoint
@Component
public class JerseyConfig extends ResourceConfig {
public JerseyConfig() {
this.register(PingResource.class);
}
}
- Main method just in case:
@SpringBootApplication
@EnableAutoConfiguration
public class JerseymetricsApplication {
public static void main(String[] args) {
SpringApplication.run(JerseymetricsApplication.class, args);
}
}
- Genereted metrics: curl http://localhost:8080/ping/3
- 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
Labels
doc-updateA documentation updateA documentation updatespring-boot changeChange is needed in Spring Boot for this issueChange is needed in Spring Boot for this issue