Unable to filter out exceptions using "ITelemetryProcessor" in Azure Web API

Marius H Enerud 1 Reputation point

I have a Azure Web API were I try to ignore a specific exception from being shown in Application Insight:


In order to do so, I need to inspect the exception message that is related to the exception being thrown (defined in the "ReasonPhrase"):


My problem is that the code logic for "ExceptionTelemetry" never seems to be executed.
Here is my implementation of the ITelemetryProcessor:


I need the code line marked in yellow to be hit, but it seems that I never get any "ExceptionTelemetry".
NB! When I run the code locallly, I see that other types of telemetry data is fetched (like "RequestTelemetry" etc.) So the ITelemetryProcessor seems to trigger at least, but not on my specific exception...

Any tips on what I need to do to achieve this?

Marius H. Enerud

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,501 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Marius H Enerud 1 Reputation point

    Anyone having similar issues?

    0 comments No comments