ApplicationInsights-dotnet icon indicating copy to clipboard operation
ApplicationInsights-dotnet copied to clipboard

Improve RichPayloadEventSource

Open TimothyMothra opened this issue 7 years ago • 2 comments

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.

TimothyMothra avatar Nov 13 '18 17:11 TimothyMothra

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.

TimothyMothra avatar May 09 '19 20:05 TimothyMothra

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[bot] avatar Jan 04 '22 00:01 github-actions[bot]

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.

github-actions[bot] avatar Nov 01 '22 00:11 github-actions[bot]