Skip to content

Provide a URI tag for HTTP requests handled by MessageDispatcherServlet #15390

Open
@SorokinStanislav

Description

@SorokinStanislav

Trying to use http_server_requests actuator metrics (Spring Boot 2.1.1) for web-method annotated by

@PayloadRoot(namespace = NAMESPACE_URI, localPart = "getName")
@ResponsePayload
@Timed

in @Endpoint class.

Do request like this:

POST /soap/getPerson HTTP/1.1
Host: localhost:1882
Content-Type: text/xml
Cache-Control: no-cache

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://example.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:personRequest>
         <id>18</id>
      </ser:personRequest>
   </soapenv:Body>
</soapenv:Envelope>

And in prometheus I see:

http_server_requests_seconds_count{exception="None",method="POST",outcome="SUCCESS",status="200",uri="UNKNOWN",} 1.0
http_server_requests_seconds_sum{exception="None",method="POST",outcome="SUCCESS",status="200",uri="UNKNOWN",} 0.290792324
http_server_requests_seconds_max{exception="None",method="POST",outcome="SUCCESS",status="200",uri="UNKNOWN",} 0.290792324

This issue like a micrometer issue #431, but there were URI cutting and not UNKNOWN. This is because of update WebMvcTags solving #12447.

So as I can see, new uri method doesn't support MessageDispatcherServlet which request does not contain BEST_MATCHING_PATTERN_ATTRIBUTE attribute.

You can reproduce this and look at whole code at my repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: blockedAn issue that's blocked on an external project changetype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions