microsoft / ApplicationInsights-ServiceFabric

ApplicationInsights SDK for ServiceFabric projects
MIT License
63 stars 26 forks source link

Track service/actor life cycle #17

Open ohadschn opened 7 years ago

ohadschn commented 7 years ago

It would be very handy to have automatic events tracked for the various life cycle events actors and services go through: registration, startup, shutdown, communication listener open/close, abort, etc.

For more information: https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-reliable-services-lifecycle.

BoeseB commented 4 years ago

@ohadschn I just implemented some logging like this yesterday with the use of Autofac.DynamicProxies to decorate all service instances with logging. A caveat is getting the async decoration right which we managed to get right with the help of this answer https://stackoverflow.com/a/39784559

I did not manage to decorate the hosting ActorService instance but only the actor classes them self.

Besides from that I am pretty happy with the logs generated and i can now see if any of the mentioned methods have performance problems etc.

Here is an example from the deployment yesterday afternoon: image

I am afraid I can not share the actual code as it is from a customer project.