How to create Elastic APM spans for each pipeline call

549 Views Asked by At

I would like a recommendation on how to instrument each pipeline call using Elastic APM API on Intershop 7.10.

I want to to create a separate span as described here: https://www.elastic.co/guide/en/apm/agent/java/master/public-api.html#api-span-start-span (Using try catch block with parent.startSpan())

For now I have tried looking into ICM knowledge base for topics regarding ELK stack (found none) and looked in Component Framework section on how to inject some code around PipelineProcessorImpl.executePipeline or put another pipeline processor implementation through component framewowrk but couldn't find nothing, it seems for now that pipeline processor implementation are not hooked through Component Framework.

1

There are 1 best solutions below

0
Johannes Metzner On

General answer is, you should not bother replacing PipelineProcessor with your own implementation. Even for such a seemingly small task of feeding your own monitoring solution.

I (may) have a better solution for you. Haven't tested it though. Have a look at the detailed answer to this intershop question: Adding a servlet to run in Intershop 7.4 application server context

You don't want to add a new servlet but you want to bind a new javax.servlet.Filter implementation that hooks into the Application Server request chain. You can do that the same way as described, but invoke method filter("/servlet/Beehive/*") instead of serve("/servlet/DEMO/*")