Repository navigation
Upgrade AzureMonitor to Microsoft.ApplicationInsights 3.x - #566
Open
okalangkenneth wants to merge 1 commit into
Open
okalangkenneth wants to merge 1 commit into
okalangkenneth wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #556
Application Insights 3.x removed the
metricsparameter fromTrackEventandTrackException, soBankIdApplicationInsightsEventListenerthrewMissingMethodExceptionwhen an app used 3.x. This upgrades the package to 3.x as agreed in the issue.Changes
AzureMonitor package
Microsoft.ApplicationInsights2.23.0 → 3.1.2TrackEvent(name, properties)andTrackException(exception, properties)AL_User_AgeHintis sent as a string property (invariant culture) incustomDimensions, still gated byLogUserPersonalIdentityNumberHintsnew TelemetryConfiguration()(not the sharedCreateDefault()), and the configuration andTelemetryClientare created once viaLazy<TelemetryClient>since the listener is transientDocs
BREAKINGCHANGES.md: new 13.0.0 section (heading marked TBD, please adjust) covering the 3.x requirement, the connection string requirement and the age hint move, with before/after KQLmonitor.md: "Average age" query readscustomDimensionsbankid.md: InstrumentationKey wording changed to connection stringSamples
Microsoft.ApplicationInsights.AspNetCore2.23.0 → 3.1.2, andMicrosoft.Extensions.Logging.ApplicationInsightsremoved from the ServerSample (no 3.x release; Microsoft's migration guide says to remove it)ConnectionStringinstead ofInstrumentationKey, with fallback toAPPLICATIONINSIGHTS_CONNECTION_STRING_LayoutMaster.cshtmlonly renders the JavaScript snippet when it's registeredAzureProvisioningSampleARM template setsAPPLICATIONINSIGHTS_CONNECTION_STRINGinstead ofAPPINSIGHTS_INSTRUMENTATIONKEYTesting
TelemetryClientfrom DI) and once with the connection string overload. Both exported all events, andCollectCompleted/AspNetAuthenticateSuccesscarriedAL_User_AgeHint= 27 incustomDimensionsfor test PIN 990807-2391: