Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track RunAsync exceptions #15

Open
ohadschn opened this issue Jul 25, 2017 · 8 comments
Open

Track RunAsync exceptions #15

ohadschn opened this issue Jul 25, 2017 · 8 comments

Comments

@ohadschn
Copy link

ohadschn commented Jul 25, 2017

RunAsync exceptions can have various consequences:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.servicefabric.services.runtime.statelessservice.runasync?view=azure-dotnet.

It stands to reason that such exceptions would be automatically logged by ApplicationInsights-ServiceFabric using TelemetryClient.TrackException (similar to how request exceptions are tracked by the ASP.NET Application Insights SDKs).

@brahmnes
Copy link
Contributor

brahmnes commented Aug 1, 2017

Hi Ohad,

Thank you for your suggestion. I think your suggestion is good and valid. For now, you can manually add that call in your RunAsync method. We will see how we can do that automatically from Application Insights SDK.

@nizarq
Copy link
Contributor

nizarq commented Oct 19, 2017

@SergeyKanzhelev @Dmitry-Matveev
I read about Microsoft.ApplicationInsights.WindowsServer.UnhandledExceptionTelemetryModule and Microsoft.ApplicationInsights.WindowsServer.UnobservedExceptionTelemetryModule in the config reference.

Where can I read more about them? How to add them? If there are any specific type of applications they work on? How do they work?

@ohadjas - I suspect this might be the answer here. Let's wait for the experts to comment.

@SergeyKanzhelev
Copy link

(new UnhandledExceptionTelemetryModule()).Initialize(TelemetryConfiguraiton.Active) or simply add it into the list of telemetry modules in ApplicationInsights.config.

@nizarq
Copy link
Contributor

nizarq commented Oct 20, 2017

Cool! Closing this for now since this addresses automatic capturing of unhandled exceptions.

I future we can take a holistic look at smart defaults - as in - what set of AI sdks should be added by default for service fabric projects (based on the type of project). For now the model is that the user would use AI.SF nuget package to compliment other AI sdks. The other sdks are added and configured by the user as they would do for non service fabric projects. This puts user in full control of opting-in into what they want to auto collect. The AI.SF sdk just ensures that the collected telemetry is decorated with the right SF context before being sent.

@nizarq nizarq closed this as completed Oct 20, 2017
@ohadjas
Copy link

ohadjas commented Oct 20, 2017 via email

@nizarq
Copy link
Contributor

nizarq commented Oct 20, 2017

oops - sorry!

@ohadschn
Copy link
Author

Hi @nizarq,

I am aware of UnhandledExceptionTelemetryModule and UnobservedExceptionTelemetryModule but neither will be triggered when an exception is thrown from RunAsync as the latter would catch it (and handle per the docs).

@nizarq
Copy link
Contributor

nizarq commented Oct 31, 2017

I see. Let me reactivate this issue so that it stays on the backlog.

@nizarq nizarq reopened this Oct 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants