I have around 10 microservice applications in .net, all hosted on Azure ServiceFabric. These applications are setup in a sequence for example
API call to Application 1 > stores data in cosmos > sends message to Application 2
Application 2 > Depending on data and business logic send a message to relative department (application 3, 4, 5, etc)
Application 3 processes and stores the data in database
I want a performance metric which shows some start/end time or total time taken to perform 1 End to End cycle for a payload.
I have come through certain solutions for tihs
Log metrics in Application Insights before and after method calls Example: Create and use a unique Guid as correlationId
Application 1 > Method1() - Record Start Time Application 1 > Method() - Record start and end time Application 3 > Method2() - Record start and end time
Application 3 > Method2() - Record End Time
This is available in Insights when I search for that Guid Even here I have a question how could I improve the visibility of this, maybe charts, reports, what options I could use in Application Insights?
- Log as above but in a separate database, this way we have control on data (application insights have huge data and cant be a separate API) Create a new API with input as Guid, the response will be seomthing like below Total EndToEnd Time: 10seconds Application1> Method2(): 2 seconds ...
I know there could be better options but need some direction on this please.