Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.

Logging exceptions with ExceptionTelemetry #393

Closed
henkmollema opened this issue Apr 19, 2017 · 1 comment
Closed

Logging exceptions with ExceptionTelemetry #393

henkmollema opened this issue Apr 19, 2017 · 1 comment

Comments

@henkmollema
Copy link
Contributor

When you log an error with an exception through the ILogger interface like this:

logger.Log(LogLevel.Error, 0, state, exception, messageFormatter);

it will use a TraceTelemetry instance.

Is it possible to use an ExceptionTelemetry instance in the case where an exception is present? Exception telemetries provide a nicer experience in UI's such as Visual Studio and the Azure portal.

@andrasg
Copy link
Contributor

andrasg commented Sep 8, 2017

This new behavior actually makes less sense if someone uses a global exception filter where all exceptions are tracked in a unified way.
With this new version, I get two exception telemetries (one at the LogError and one in my global exception filter. Of course, in the model I am using (using a global exception filter), I can change my .TrackException() into .LogError()...
I would have considered this as a bigger change than what makes into a .1 upgrade...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants