-
Notifications
You must be signed in to change notification settings - Fork 198
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
Add a filter for faults to avoid bucketing #10921
Add a filter for faults to avoid bucketing #10921
Conversation
src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/Telemetry/TelemetryReporter.cs
Outdated
Show resolved
Hide resolved
@@ -16,6 +17,15 @@ namespace Microsoft.VisualStudio.Razor.Telemetry; | |||
|
|||
internal abstract class TelemetryReporter : ITelemetryReporter | |||
{ | |||
private const string CodeAnalysisNamespace = nameof(Microsoft) + "." + nameof(CodeAnalysis); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're going to have a half dozen of these where we want to report the caller; is there a unittest to write to make sure we are detecting/rewriting info as we expect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately I didn't see a way to check the properties being set here. @pieandcakes do you know?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll ask a different way. Are there reasonable unittests for GetModifiedFaultParameters to prove it extracts the stack top OR the correct depth within it, and when we add 'more' examples of frames to skip, we keep the same behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That I can add, but if we can find a way to assert the fault behavior I would prefer that. If not testing GetModifiedFaultParameters
is still a good test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't process the bucket parameters until PostEvent is called and then it processes them and adds them to the properties. I don't think you'd have a way to validate that the values are correct/not correct .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Should the Module
be something like Microsoft.VisualStudio.LanguageServices.Razor.Test.dll
or should it be the containing type full name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be FileNameNoExtensions. The code that does it today is here:
61cb332
to
1676a54
Compare
Helps remove
AssumeNotNull
from the fault parameters and blame something in our code stack instead