Add telemetry client only if it is enabled#1868
Merged
Aniruddh25 merged 4 commits intomainfrom Nov 9, 2023
Merged
Conversation
Collaborator
Author
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
abhishekkumams
approved these changes
Nov 8, 2023
Contributor
abhishekkumams
left a comment
There was a problem hiding this comment.
Thanks for addressing this.
Collaborator
Author
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
aaronburtle
approved these changes
Nov 9, 2023
Contributor
aaronburtle
left a comment
There was a problem hiding this comment.
LGTM! Thanks for adding quickly
Aniruddh25
added a commit
that referenced
this pull request
Nov 13, 2023
## Why make this change? - Saw this exception while running locally via VS:  - it is triggered asynchronously when the grapqhql schema is being generated in the background - Also, noticed telemetry client is being added irrespective of it is enabled or not. ## What is this change? - Add AppInsights Telemetry only when it is enabled. - Use `TryAdd` instead of simply doing an `Add` to the dictionary of global properties in the Initialize function that is used to initialize any telemetry object. - Depending on if the telemetry object had already been initialized with the 2 global properties we intend to add, they may or may not be already present. Examples of such telemetry objects include `MetricsTelemetry`, `DependencyTelemetry` etc. ## How was this tested? - Reran the engine to verify the exception was gone upon starting. - Added asserts in TelemetryTests to verify the client is created only when telemetry is enabled.
Aniruddh25
added a commit
that referenced
this pull request
Nov 13, 2023
## Why make this change? This is simply cherry-picking the following PRs before creating the next stable 0.9 version: - #1876 - #1821 - #1854 - #1851 - #1872 - #1868 --------- Co-authored-by: Sean Leonard <[email protected]> Co-authored-by: Abhishek Kumar <[email protected]> Co-authored-by: neeraj-sharma2592 <[email protected]> Co-authored-by: Neeraj Sharma (from Dev Box) <[email protected]> Co-authored-by: aaronburtle <[email protected]>
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.
Why make this change?
What is this change?
TryAddinstead of simply doing anAddto the dictionary of global properties in the Initialize function that is used to initialize any telemetry object.MetricsTelemetry,DependencyTelemetryetc.How was this tested?