ApplicationInsights-Go icon indicating copy to clipboard operation
ApplicationInsights-Go copied to clipboard

Export newExceptionTelemetry with skip

Open talsheldon opened this issue 5 years ago • 1 comments

I have some abstractions on the telemetries functions, thus the "Failed method" will always be the abstractions, and not the actual failed method.

If I'll set the skip to 3, then it will ignore my abstraction methods in the call stack, and I will get my desired output.

Currently I'm setting the skip=3 by explicitly defining ExceptionTelemetry.

Any reason the skip argument shouldn't be exported?

Using ApplicationInsights-Go v0.4.3 on go1.13.

Thanks

talsheldon avatar Aug 16 '20 14:08 talsheldon

Apologies, this came in while I was on leave.

Perhaps it ought to be, but GetCallstack is exported so as a workaround you could call it after NewExceptionTelemetry (after, i suppose, incurring a bit of additional overhead).

jjjordanmsft avatar Oct 09 '20 20:10 jjjordanmsft