kentcb / azure_application_insights

Dart client for Azure's Application Insights service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to set the "Exception type" for AppInsights exceptions

SogoGolf opened this issue · comments

Is it possible to set/pass through the "Exception type" to AppInsights ?

As you can see in the screenshot, in this example we've got a PUT request that failed due to timeout. The current value in the "Exception type" field is wrong as it shows "String". It should show "PUT". I had a look but could not see a property to set on your API. Do you know if its possible to get this value being correctly passed through to AppInsights ?

image

Hi @SogoGolf. The exception type is set here. As you can see, it's the runtime type of whatever the underlying error is (i.e. whatever was thrown). Usually this would be an exception type name, but in your case something must be throwing a String rather than an exception.

That said, you say you're expecting "PUT" but I don't understand why that would be. Are you saying you have an exception type called PUT?

hey @kentcb , ok thanks maybe thats it I'm just not passing the exception (object) through. I'll have a closer look. Basically what I'm hoping to achieve is for App Insights to pick up errors from REST API requests and categorise them eg. error was from a PUT call, or a POST call, or ... etc