-
Notifications
You must be signed in to change notification settings - Fork 772
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
Removed Moq dependency from Instrumentation.AspNetCore.Tests #5123
Removed Moq dependency from Instrumentation.AspNetCore.Tests #5123
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #5123 +/- ##
==========================================
+ Coverage 82.85% 83.04% +0.18%
==========================================
Files 296 296
Lines 12320 12320
==========================================
+ Hits 10208 10231 +23
+ Misses 2112 2089 -23
Flags with carried forward coverage won't be shown. Click here to find out more. |
#pragma warning disable SA1010 | ||
public List<string> ExtractValues = []; | ||
public Dictionary<string, Func<PropagationContext, string>> InjectValues = []; |
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.
SA1010: OpeningSquareBracketsMustBeSpacedCorrectly
Is the pragma warning disable because of the List and Dictionary initializations (Lines 25 & 26)?
Just curious if the pragma disable could be removed if we used = new()
instead?
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.
@TimothyMothra :
Yes, indeed.
If I use = new()
I get the following compiler warning:
IDE0028 (Simplify collection initialization)
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.
haha. okay, then leave it as you had it. Thanks for checking :)
internal sealed class CustomTextMapPropagator : TextMapPropagator | ||
{ | ||
#pragma warning disable SA1010 | ||
public List<string> ExtractValues = []; |
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.
nit: Define traceId, spanId and flags as individual fields.
// limitations under the License. | ||
// </copyright> | ||
|
||
using OpenTelemetry.Context.Propagation; |
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.
can be removed now that we are using Action delegate
Related to #4758.
Changes
BasicTests.cs