Glowroot 0.10.12 agent not caturing teh context paths and the HTTP method correctly

121 views
Skip to first unread message

Pavani Manthana

unread,
Jun 4, 2019, 6:49:06 PM6/4/19
to Glowroot
Hi Trask - We are observing that the http method and the context path of the rest service calls being captured by glowroot agent is not consistent. Sometimes the Http method like GET, POST etc is captures and sometimes not. The child context path is captured at times and rolled up into a parent at other times. What is the logic behind the context path capture and does glowroot group them into a parent context at rollup level? I have attached a screen shot as well. 

Question:2 - Sometimes calls maed to external services are not getting captured. Is there a specific support for some api to make external calls that glowroot captures and not the others. We have several clients that sometimes use a company standard frmework and sometimes develop their own. Looking for a list of software that tapm does or does not support.

Appreciate a quick reply. 

Thanks,
Pavani



Pavani Manthana

unread,
Jun 4, 2019, 6:50:26 PM6/4/19
to Glowroot

Here is the attachment....
tapm.png

Trask Stalnaker

unread,
Jun 6, 2019, 10:01:19 PM6/6/19
to Glowroot
Hi Pavani!

The servlet instrumentation does not add the Http Method (GET/POST) but the JAX-RS and some of the other instrumentation does.

I'm planning to make them all add the Http Method, if you create a GitHub issue that would be great so I don't forget :-).

I'm not sure about the child context path question, can you provide more details?

For external service calls, Glowroot instruments the HTTP clients at https://glowroot.org/features.html:
  • Apache HttpClient
  • Apache HttpAsyncClient
  • AsyncHttpClient
  • OkHttp
  • java.net.HttpURLConnection
Thanks,
Trask

Pavani Manthana

unread,
Jun 12, 2019, 4:26:38 PM6/12/19
to Glowroot
Hey Trask - I will create the github issue. 

So what I mean by child context paths is ...

Say we have a service that exposes rest api like 
/msapi/riskassessment/v1/assess

 

/msapi/riskassessment/v1/readiness


When we send in requests for these rest calls, the transactions page in glowroot is caturing those calls under "/msapi" only. Only for some trans it captures the extire context path  and I was not able to figure out under what scenarios it is capturing the exact path for some transactions. Same with errors and slow traces, they do not show the exact context path.


Here how the resource is defined ...

@Api(value = "/riskassessment/v1")

@Path("/")

@Produces({MediaType.APPLICATION_JSON})

public interface OnlineFraudResource {

@GET

    @Path("/onlineFraud/execute")

    @Consumes({MediaType.APPLICATION_JSON})

    public Response executeOnlineFraud();

@GET

    @Path("/onlineFraud/result")

    @Consumes({MediaType.APPLICATION_JSON})

    public Response resultOnlineFraud();


}



This is an issue for our clients since they want to know the performance of specific apis. 


Is that a bug in glowroot? I have attached the screen shots to show the transactions for the api.


Thanks,

Pavani

Context paths.docx

Pavani Manthana

unread,
Jul 12, 2019, 5:32:24 PM7/12/19
to Glowroot
Hi Trask - Looks like if the @Path at Resource class level is defined as "/" then it is not capturing the method path. Found this in ResourceMethodMeta.java

   // VisibleForTesting
    static String combine(@Nullable String classPath, @Nullable String methodPath) {
        if (classPath == null || classPath.isEmpty() || classPath.equals("/")) {
            return normalize(methodPath);
        }
        if (methodPath == null || methodPath.isEmpty() || methodPath.equals("/")) {
            return normalize(classPath);
        }
        return normalize(classPath) + normalize(methodPath);
    }

Is this the reason why the complete context path of the method is not being captured and requests are only getting consolidated at parent context path? Appreciate a quick response. This is causing an issue to some of our clients. We need to undetrstand exactly what annotations glowroot expects for it to capture full contextpath of each transaction.

Thanks,
Pavani

Trask Stalnaker

unread,
Jul 16, 2019, 1:00:03 AM7/16/19
to Glowroot
Hi Pavani,

What is the @Api annotation above?

    @Api(value = "/riskassessment/v1")

Is that a standard JAXRS annotation, or something application/framework specific?

Thanks,
Trask

Pavani Manthana

unread,
Jul 29, 2019, 4:04:25 PM7/29/19
to Glowroot
Hi Trask - It is a custom annotation. Looks like you have fixed this issue in 0.13.1 ->
Reply all
Reply to author
Forward
0 new messages