Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop AI tracing #310

Closed
tom-r-o opened this issue Sep 15, 2016 · 29 comments
Closed

Stop AI tracing #310

tom-r-o opened this issue Sep 15, 2016 · 29 comments

Comments

@tom-r-o
Copy link

tom-r-o commented Sep 15, 2016

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...

@SergeyKanzhelev
Copy link
Contributor

Use this:

TelemetryDebugWriter.IsTracingDisabled = true;

@Leonardo-Ferreira
Copy link

@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...

@SergeyKanzhelev
Copy link
Contributor

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

@gardnerjr
Copy link

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.

@dasjestyr
Copy link

dasjestyr commented Jul 30, 2017

"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.

@alexvy86
Copy link

alexvy86 commented Aug 1, 2017

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.

@SergeyKanzhelev
Copy link
Contributor

@gardnerjr any updates on this?

@SergeyKanzhelev
Copy link
Contributor

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

@gardnerjr
Copy link

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.

@erictor
Copy link

erictor commented Sep 15, 2017

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.

@user1568891
Copy link

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.

@RyanTaite
Copy link

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.

@SergeyKanzhelev
Copy link
Contributor

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

@gardnerjr
Copy link

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.

@RyanTaite
Copy link

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.

@Hassmann
Copy link

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.

@SergeyKanzhelev
Copy link
Contributor

@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.

@gardnerjr
Copy link

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?

@SergeyKanzhelev
Copy link
Contributor

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.

@EnCey
Copy link

EnCey commented Oct 2, 2018

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

TimothyMothra added a commit that referenced this issue Oct 25, 2019
* fix signing (#301)

* nupkg and symbols (#300)

* Nuget.props and new symbols format

* fixing compile issues

* fix doc file

* ApplicationInsights.NLogTarget - Updated docs with NLog.config example (#294)

* new cert (#303)

* new cert

* update

* bump version 2.11-beta2 (#309)

* bump version 2.11-beta2

* Update CHANGELOG.md
@hallidev
Copy link

hallidev commented Dec 8, 2020

Since @EnCey asked in 2018, I might as well ask again - is there any way to shut off this ridiculous output spamming me and my developers constantly?

Is this something we're going to be asking about in 2030? Humanity got to the moon faster. How is this not a change that requires a grand total of 5 lines of code?

Is there a workaround for this? More than 90% of the output from my entire (large) codebase is Application Insights spam. And no, we don't want to disable AppInsights entirely for local development, we just want the output window spam to stop.

@cijothomas
Copy link
Contributor

@hallidev No work is done to fix this in SDK or Visual Studio tooling. Please upvote the issue here, to help SDK team increase its priority.

You may want to submit additional feedback to Visual Studio using its feedback link, to get it prioritized by Visual Studio team.
image

@hallidev
Copy link

hallidev commented Dec 8, 2020

Thanks - I've suggested the feature. Worth noting is that there was a previous request that was closed. Hope this one makes it.

@Muhomorik
Copy link

@hallidev , can you share the link?

@github-actions
Copy link

github-actions bot commented Oct 6, 2021

This issue is stale because it has been open 300 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Oct 6, 2021
@user1568891
Copy link

Bump?

@TimothyMothra
Copy link
Member

Hello All,
Sergey's answer from 2016 is still valid, this will disable the Debug Output:

Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryDebugWriter.IsTracingDisabled = true;

Note that this will also disable the Data From last Debug Session.
This is because our SDK makes a single output and Visual Studio subscribes to that for both the Debug Output and the Debug Session.

For more fine control within Visual Studio, please leave feedback for their team and reference this github issue.

I found this on their forum: https://developercommunity2.visualstudio.com/t/Implement-a-way-to-suppress-Application/1283382
They need upvotes to prioritize work.

@github-actions github-actions bot removed the stale label Oct 7, 2021
@github-actions
Copy link

github-actions bot commented Aug 3, 2022

This issue is stale because it has been open 300 days with no activity. Remove stale label or this will be closed in 7 days. Commenting will instruct the bot to automatically remove the label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests