APM Traces for thrift server and getting clubbed into doPost

I have integrated my java thrift service with APM.
Transactions are not getting segregated according to the functions.
All the functions exposed in thrift are getting clubbed in doPost transactions.
Is there any way to get transactions listed by functions inside my thrift service?

Hi @dilip1992, welcome to our forum !

I am not familiar with Thrift framework, can you confirm that it's Apache Thrift ?

From what I understand, it's an RPC framework, thus I guess that in your case there is

  • a dispatcher Servlet that our agent instruments at the doPost method level and creates transactions for every HTTP request. This Servlet dispaches calls to a service defined with Thrift
  • a Thrift service layer that have some entry points (functions) that you want to use to properly name your transactions.

Does Thrift has a concept of a filter or dispatcher where you can wrap a call to the Thrift layer ? If yes, that means you can easily use agent API to set the transaction name accordingly with something similar to :

String thriftFunctionName = null; // get value from Thrift filter or similar
Transaction transaction = ElasticApm.currentTransaction();
transaction.setName(thriftFunctionName);
1 Like

Hey Sylvain,

 Yes, I am using apache thrift. It is an RPC framework.
 Setting a name to the current transaction worked.
 Thank you for your help.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.