ApplicationInsights-dotnet
ApplicationInsights-dotnet copied to clipboard
Improve RichPayloadEventSource
RichPayloadEventSource is attempting several type casts. Because of the if statements, there are several failed casts before finding the correct matching type.
https://github.com/Microsoft/ApplicationInsights-dotnet/blob/52e32b5695f35caf8548eb4bd256a408dbb9bb72/src/Microsoft.ApplicationInsights/Extensibility/Implementation/RichPayloadEventSource.cs#L41-L64
This can be eliminated with an internal interface returning private properties.
I closed the PR but I don't want to close this issue.
My PR broke the EventSource and exposed a gap in our tests that we don't currently catch. Even if we don't attempt to improve RichPayloadEventSource we should try to improve test coverage.
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.
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.