-
Notifications
You must be signed in to change notification settings - Fork 64
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
Remove whitespace from instrumentation parameters #461
Remove whitespace from instrumentation parameters #461
Conversation
} | ||
|
||
// void as the parameters means parameterless method call (not all overloads) | ||
if (Strings::AreEqualCaseInsensitive(*(rawParams), _X("void"))) |
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.
This is not related to this PR but rather interesting to me. I don't know if void
parameter is a thing in C#. It is a thing in C++ or C but we are instrumenting C# functions.
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 actually found my answer. Whatever method signatures we declare in the instrumetation xml are IL method signatures as opposed to C# or languages. So I believe void
parameter is a thing in IL world.
We should add the newly built NewRelic.Profiler.dlls to _profilerBuild folders. |
Ran unit tests, Profiler tests, IntegrationTests. Looks good. |
Description
Resolves #169 by removing whitespace characters from the parameter list in a custom instrumentation XML method matcher.
Testing
Added unit test for matching multiple parameters with a space between the comma and the second parameter type.
Manually tested custom instrumentation matching a method with multiple parameters, with spaces between the parameters in the list, like this:
Method in code:
static void doSomething(int aNumber, bool aBool, string aString)
Method matcher in CI XML:
<exactMethodMatcher methodName="doSomething" parameters="System.Int32, System.Boolean, System.String" />
Tested on both Windows and Linux. With the current released profiler, this CI would not match and this method would not be instrumented. With the profiler built from this PR branch, the CI matches the method and the method is instrumented.
Changelog
Updated changelog.