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

Marius H Enerud 1 Reputation point
2021-12-13T08:32:56.017+00:00

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

157113-ex3.jpg

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

157131-ex4.jpg

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

157075-ex1.jpg

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?

Regards,
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.
7,408 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Marius H Enerud 1 Reputation point
    2022-01-24T09:57:43.39+00:00

    Anyone having similar issues?

    0 comments No comments