-
Notifications
You must be signed in to change notification settings - Fork 287
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
ExceptionTelemetry clears all Context setting after setting ExceptionTelemetry.Exception #2086
Comments
+1. It was totally unexpected to me after I implemented a telemetry processor which analyzes and hides sensitive exception data. I had to copy data from original context into a new one created by ExceptionTelemetry.Exception setter. |
This issue is stale because it has been open 300 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
AFAICT this is still an active issue. I'm not a collaborator so I can't reopen this. |
This issue is stale because it has been open 300 days with no activity. Remove stale label or this will be closed in 7 days. Commenting will instruct the bot to automatically remove the label. |
It's still there. Double-checked on Microsoft.ApplicationInsight 2.21. |
Describe the bug
A new context is created in an ExceptionTelemetry instance when using the Exception property setter. This unexpectedly clears any previously set Context values from the object.
To Reproduce
Example output:
Observe that in the "Before", the Context.User object is populated with values, and in the "After" it has been cleared away. Looking at the code, it looks like a brand new TelemetryContext is created when the setter for the Exception property is used.
This seems like unexpected behavior and it is not specifically called out in the API documentation. Setting the exception value from outside of the .ctor should not clear the existing Context values.
The text was updated successfully, but these errors were encountered: