-
Notifications
You must be signed in to change notification settings - Fork 287
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
Performance Enhancement: Request Tracking Properties & Post Sampling Execution Deferral #1380
Comments
I'm shocked that populating the I also see that removing it adds additional side effects...
I would love to hear @Mikhail-Pranovich explanation of this finding. |
@SergeyKanzhelev Would you approve of this proposal? |
@MS-TimothyMothra, I suggest very careful architectural review for such a change. The reason I didn't merge this change in, is due to the fact that it spot fixes the performance bottleneck, rather than fixing the rootcause problem - the sampling needs to happen much early in the pipeline, comparing to current design. @Dmitry-Matveev was doing performance investigations, please sync with him if he has better solutions to this performance issue. |
We may be able to sample early in .NET Core SDK in the near future, however, there is no certainty in the early sampling approach for ASP.NET SDK currently. Most of my ongoing performance investigations are in ASP.NET Core SDK repo, so they won't interact with this particular change. The change in the question is indeed a behavior change that can only be shipped by default with major version update. However, there is a possibility of shipping it behind the feature flag if absolutely necessary, thus making it opt-in scenario, where by default the experience does not change and any code leveraging the old sequencing of the property assignments will still continue to work for all the customers. Extension would need to enable this flag if extension is to consume this version from Nuget. Regarding the upcoming updates regarding perf or ASP.NET SDK specifically, I'd touch base with @cijothomas. |
Even though I agree that sampler may need to happen earlier in a better world - I think this fix (which will only change behavior for auto-enabled apps) is perfecty justifiable. BTW, for the easly sampling - in Open Census we use URL to get the |
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. |
@Mikhail-Pranovich identified performance issues in RequestTrackingTelemetryModule.
Specifically:
Setting the
requestTelemetry.Url
from the contexthttps://github.com/Microsoft/ApplicationInsights-dotnet-server/blob/3bee86d3f7ec3e81efe6c5ad3ebdbe37f79929bb/Src/Web/Web.Shared.Net/RequestTrackingTelemetryModule.cs#L164-L167
Setting the
requestTelemetry.Source
to the SourceAppIdhttps://github.com/Microsoft/ApplicationInsights-dotnet-server/blob/3bee86d3f7ec3e81efe6c5ad3ebdbe37f79929bb/Src/Web/Web.Shared.Net/RequestTrackingTelemetryModule.cs#L176-L203
Proposal
I'm proposing a feature flag to make this an opt-in feature:
RequestTrackingTelemetryModule.DisableTrackingProperties
(open to naming suggestions)https://github.com/Microsoft/ApplicationInsights-dotnet-server/blob/944ee584e39b79b6707479cc3762e5077f97b8e5/Src/Web/Web.Shared.Net/RequestTrackingTelemetryModule.cs#L56-L64
This would disable setting this properties in the RequestTrackingTelemetryModule.
https://github.com/Microsoft/ApplicationInsights-dotnet-server/blob/f145561f564ce3094115c5588920fc7eef0f8466/Src/Web/Web.Shared.Net/Extensibility/Implementation/PostSamplingTelemetryProcessor.cs#L12-L17
Risks
@cijothomas had a good comment:
Open Question
The text was updated successfully, but these errors were encountered: