This repository has been archived by the owner on Jun 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 123
remove correlationIdLookupHelper. #636
Merged
Merged
Changes from 6 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
5a4bbfb
remove correlationIdLookupHelper.
TimothyMothra 411e0a4
Merge branch 'develop' into tilee/remove_correlationidlookuphelper
cijothomas 1c2fe70
change to allow nullable IApplicationIdProvider
TimothyMothra 05c0b27
change to the configuration
TimothyMothra bb4620c
merge branch 'develop'
TimothyMothra 09c1283
Merge branch 'develop' into tilee/remove_correlationidlookuphelper
TimothyMothra 6084c4f
update TelemetryConfig setup
TimothyMothra 9533849
changing to TelemetryConfiguration injection
TimothyMothra 3c218f2
Merge branch 'develop' into tilee/remove_correlationidlookuphelper
TimothyMothra fd1cdc8
added tests
TimothyMothra 6244f9c
nullable ApplicationIdProvider.
TimothyMothra 6e2c1c4
merge local
TimothyMothra b3ad343
Revert "added tests"
TimothyMothra dc4edfc
revert
TimothyMothra 92f8c14
include missing using
TimothyMothra e1ff218
Merge branch 'tilee/remove_correlationidlookuphelper' of https://gith…
TimothyMothra 3eaab02
Merge branch 'develop' into tilee/remove_correlationidlookuphelper
TimothyMothra 554705d
update changelog
TimothyMothra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
375 changes: 0 additions & 375 deletions
375
...cationInsights.AspNetCore/DiagnosticListeners/Implementation/CorrelationIdLookupHelper.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
...ationInsights.AspNetCore/DiagnosticListeners/Implementation/ICorrelationIdLookupHelper.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ internal class TelemetryConfigurationOptionsSetup : IConfigureOptions<TelemetryC | |
private readonly ITelemetryChannel telemetryChannel; | ||
private readonly IEnumerable<ITelemetryProcessorFactory> telemetryProcessorFactories; | ||
private readonly IEnumerable<ITelemetryModuleConfigurator> telemetryModuleConfigurators; | ||
private readonly IApplicationIdProvider applicationIdProvider; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="T:TelemetryConfigurationOptionsSetup"/> class. | ||
|
@@ -36,14 +37,16 @@ public TelemetryConfigurationOptionsSetup( | |
IEnumerable<ITelemetryInitializer> initializers, | ||
IEnumerable<ITelemetryModule> modules, | ||
IEnumerable<ITelemetryProcessorFactory> telemetryProcessorFactories, | ||
IEnumerable<ITelemetryModuleConfigurator> telemetryModuleConfigurators) | ||
IEnumerable<ITelemetryModuleConfigurator> telemetryModuleConfigurators, | ||
IApplicationIdProvider applicationIdProvider) | ||
{ | ||
this.applicationInsightsServiceOptions = applicationInsightsServiceOptions.Value; | ||
this.initializers = initializers; | ||
this.modules = modules; | ||
this.telemetryProcessorFactories = telemetryProcessorFactories; | ||
this.telemetryModuleConfigurators = telemetryModuleConfigurators; | ||
this.telemetryChannel = serviceProvider.GetService<ITelemetryChannel>(); | ||
this.applicationIdProvider = applicationIdProvider; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lets do it like done for telemetry channel in the line above, so that if user removes the AppIdProvider from DI, it wont throw. |
||
} | ||
|
||
/// <inheritdoc /> | ||
|
@@ -118,6 +121,9 @@ public void Configure(TelemetryConfiguration configuration) | |
module.Initialize(configuration); | ||
} | ||
} | ||
|
||
// Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule depends on this nullable configuration to support Correlation. | ||
configuration.ApplicationIdProvider = this.applicationIdProvider; | ||
} | ||
|
||
private void AddQuickPulse(TelemetryConfiguration configuration) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 0 additions & 108 deletions
108
test/Microsoft.ApplicationInsights.AspNetCore.Tests/CorrelationIdLookupHelperTest.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Inject TelemetryConfiguration here, and obtain appid provider from the Configuration, so that even if there is no AppId provider(occurs if user removes it from DI), this wouldn't result in exception.
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.
@cijothomas Are you sure we want to do that?
My thought is that only the NetFramework Modules will be expecting a TelemetryConfiguration.
All of your NetCore Modules are using DependencyInjection, and it would make sense to keep that consistent.
As an alternative; I can make this parameter null by default or make a second ctor without the IApplicationIdProvider parameter, to support DependencyInjection.
I assume consistency would be prefered, but I will defer to your judgement here :)
If I make changes here, would you like me to make the same changes in
OperationCorrelationTelemetryInitializer
?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.
For me it’s about somebody forgot to add it, not somebody removed it. In some custom scenarios.
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.
@SergeyKanzhelev, But the TelemetryConfiguration is also being constructed by DependencyInjection.
Maybe I'm not understanding a user custom config scenario. :)
Would something like this be an appropriate alternative...
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.
@cijothomas explained this to me offline. I'm cleaning this up now.
Thanks