12 Jun 2024 02:11 PM
Hello,
We are having event driven workflow calls via RabbitMQ.
For e.g.
ServiceA receives the request (say trace start timestamp T1), process it and at the end-of-processing places message to a queue (=topicA)
ServiceB picks-up the message and process it. At the end-of-processing places message to a queue (=topicB)
ServiceC picks-up the message from queue (say trace start timestamp T2) and updates Database.
Message carries common workflowID which is observed in all service carries this WorkFlowID in the request header.
We want to create M&A capability for T2-T1.
Thank you in advance for your suggestion.
12 Jun 2024 02:31 PM
Tracing for Rabbit MQ works already. Since your services are .Net based make sure you enable the support for it in your Oneagent features: Settings -> Preferences -> Oneagent features -> switch on ".NET messaging RabbitMQ Sensor V2"
12 Jun 2024 04:40 PM
Yes, we have enabled RMQ sensor and we are seeing it reflected in the distributed traces. My question however is, since my custom metric is based on the two different services start time, how to get/extract start-time for each of services.
T2 is start time of Service C
T1 is start time for Service A
13 Jun 2024 08:24 AM
Ah now I got it right.
I fear your only way to get to this data is via a DQL query on spans (traces on grail).
The other idea how this could be achieved is via BizEvents, but since Dynatrace still doesn't support the creation of BizEvents from code-level sensors (only from incoming http calls) you would have to implement the ingestion of a BizEvent yourself in the producer/consumer ...