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

Stop AI tracing

Open tom-r-o opened this issue 10 years ago • 29 comments

I noticed that in TelemetryDebugWriter there's code that writes to VS's output window (line #56). Is there an option to disable it? It interferes with my ability to debug my application...

tom-r-o avatar Sep 15 '16 14:09 tom-r-o

Use this:

TelemetryDebugWriter.IsTracingDisabled = true;

SergeyKanzhelev avatar Sep 15 '16 16:09 SergeyKanzhelev

@SergeyKanzhelev this does more than stop writing on the debug output window! it stops insights recording at all! my "Data From last Debug Session" now is completely empty...

Leonardo-Ferreira avatar Mar 03 '17 20:03 Leonardo-Ferreira

Visual Studio relies on debug output data to show the session's data. We have plans to switch to ETW instead. @gardnerjr can share more details

SergeyKanzhelev avatar Mar 03 '17 21:03 SergeyKanzhelev

Yes, the VS tools get this information by watching the debug output.

@Leonardo-Ferreira we've discussed at various point adding a right click option in the output window for "show application insight output" that would hide/show the output, without having to disable output from the sdk itself.

gardnerjr avatar Mar 03 '17 21:03 gardnerjr

"we've discussed at various point adding a right click option in the output window for "show application insight output" that would hide/show the output, without having to disable output from the sdk itself."

Yes please! This seems to be the most appropriate solution imo. One almost expects to find it there.

dasjestyr avatar Jul 30 '17 07:07 dasjestyr

Is there an issue to track adding that option, or moving away from using the Debug window? I'm also very eager to get rid of those messages and I'd like to follow the discussion.

alexvy86 avatar Aug 01 '17 05:08 alexvy86

@gardnerjr any updates on this?

SergeyKanzhelev avatar Aug 01 '17 16:08 SergeyKanzhelev

temporary re-opening the issue to follow up on the plans

SergeyKanzhelev avatar Aug 01 '17 16:08 SergeyKanzhelev

It's been discussed but never prioritized.

I've added User Story 1049894: Add functionality to hide AI output in the debug output window to our backlog, but I can't make any promises on if it will get scheduled in 15.4. The next VS update is a servicing release and is very tightly scoped.

gardnerjr avatar Aug 01 '17 17:08 gardnerjr

Thank you for adding User Story 1049894. It's helpful to know that it is on the backlog and will be looked at when feasible.

erictor avatar Sep 15 '17 07:09 erictor

Is there an update to the filter? Since the telemetry appears in the Application Insights search most don't have a need for it to still be in the debug, and it really makes any other debug output really hard to read.

user1568891 avatar Jan 08 '18 22:01 user1568891

Any update on this? Would really like an option setting somewhere to not have to scroll through hundreds of lines of AI Telemetry to see my one line of debug output.

RyanTaite avatar Mar 27 '18 21:03 RyanTaite

@gardnerjr do you know if this work was scheduled yet?

SergeyKanzhelev avatar Mar 28 '18 18:03 SergeyKanzhelev

No work has been scheduled for it. If you haven't already, you might want to submit an item directly from the VS feedback tool as well, especially if this is an asp.net related thing. Some other teams outside of AI are starting to take over work in our VS extension to make their experiences better. This would be one place we could maybe get another team to help out.

gardnerjr avatar Mar 28 '18 19:03 gardnerjr

Will do.

Looks like there is one thread active on it right now: https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/19370182-add-filter-for-application-insights-debug-events-i

Though it was posted in late May of 2017, so hopefully it gains more traction/notice.

RyanTaite avatar Mar 28 '18 19:03 RyanTaite

Please. It really has become more than a nuisance that the same service we happily use to understand our code runs denial-of-service against another major source of "application insight". A jealous and ruthless mistress, although otherwise quite sexy. Please silence her.

Hassmann avatar Apr 30 '18 23:04 Hassmann

@glennc and @acearun any chance this will be prioritized? I want to make sure you heard the feedback.

@Hassmann nicely said. Sorry for inconvenience. It is hard choice - telemetry vs. debug output. I re-opened this issue to highlight it, but will close it couple days later. From SDK perspective - all the data needed to be surfaced is already exposed via ETW. So it is a matter of powering search experience from ETW instead of the debug output.

SergeyKanzhelev avatar May 01 '18 03:05 SergeyKanzhelev

when you say it is exposed, where are the details of how that works? is it explicitly documented somewhere?

will ETW work for places when the app being debugged is occurring somewhere else, like inside a container? will it work for different apps being debugged multiple instances of VS at the same time?

gardnerjr avatar May 01 '18 15:05 gardnerjr

Nope, it is not documented, but it is used. For instance for integration with Application Insights profiler. This provider: Microsoft-ApplicationInsights-Data exposes events in the form very close to debug output JSON. I believe intelliTrace is using ETW and my assumption was that they have solved all problems you mentioned.

However, you know Visual Studio and all scenarios better than me. So if the feature of hiding strings from Output window is more viable - I'm all for it!

Thank you for looking into it again.

SergeyKanzhelev avatar May 01 '18 16:05 SergeyKanzhelev

Any updates? Is there a workaround, like a way to filter the debug window contents or something ..?

EnCey avatar Oct 02 '18 16:10 EnCey