Skip to content

[Telemetry] Migration from AppInsights to 1DS#13493

Merged
danielayala94 merged 30 commits intomicrosoft:mainfrom
danielayala94:telemetry-migration1
Oct 12, 2024
Merged

[Telemetry] Migration from AppInsights to 1DS#13493
danielayala94 merged 30 commits intomicrosoft:mainfrom
danielayala94:telemetry-migration1

Conversation

@danielayala94
Copy link
Copy Markdown
Contributor

@danielayala94 danielayala94 commented Jul 24, 2024

Description

Type of Change

New feature.

Why

Enable posting telemetry data to have information that will allow us to take informed decisions on what areas of RNW we should focus, identify customer pains, RNW usage, etc.

Resolves #10473
Resolves #10142
Resolves #10141

What

  • Refactored Telemetry class, by changing all App Insights SDK references to 1DS core+post APIs. The most noticeable changes are:
    • Replaced TelemetryClient with AppInsightsCore.
    • Refactored post event logic to craft a telemetry item object.
    • Manually parsed stack trace into decomposed frames, as 1DS doesn't provide such functionality (which AppInsights does).
  • Refactored some of the testing code to account for the changes in the Telemetry class.

Testing

All E2E tests on telemetry.test.ts are passing after the refactoring.
All other telemetry tests are passing after the refactoring as well.

Changelog

Yes

Microsoft Reviewers: Open in CodeFlow

@danielayala94 danielayala94 marked this pull request as ready for review August 23, 2024 22:38
@danielayala94 danielayala94 requested review from a team as code owners August 23, 2024 22:38
@danielayala94 danielayala94 changed the title [Draft, Telemetry] Migration from AppInsights to 1DS Core [Telemetry] Migration from AppInsights to 1DS Aug 23, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Author Feedback The issue/PR needs activity from its author (label drives bot activity) and removed Needs: Author Feedback The issue/PR needs activity from its author (label drives bot activity) labels Aug 26, 2024
@microsoft microsoft deleted a comment from azure-pipelines bot Oct 11, 2024
@danielayala94
Copy link
Copy Markdown
Contributor Author

/azp run PR

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@danielayala94
Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 1 pipeline(s), but failed to run 1 pipeline(s).

@danielayala94
Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 1 pipeline(s), but failed to run 1 pipeline(s).

@danielayala94 danielayala94 merged commit 0b6877e into microsoft:main Oct 12, 2024
danielayala94 added a commit to danielayala94/react-native-windows that referenced this pull request Nov 7, 2024
* Draft of telemetry refactoring

* Better draft, including most (if not all?) properties

* Various fixes, it now compiles

* Refactor, and temporary commenting tests

* All tests passing! But will need to clean up a few things

* Polished some code, re-enabled some errorUtils tests

* Change files

* Update yarn.lock

* Let yarn lint:fix cook

* Simplifying

* Nit: ordering

* Avoid unnecessary JSON work

* nit

* Mostly placing some common props into Part A ext, plus adding/removing props

* Distinguish between deviceClass and nodePlatform

* Nit
TatianaKapos added a commit that referenced this pull request Nov 11, 2024
* [Telemetry] Migration from AppInsights to 1DS (#13493)

* Draft of telemetry refactoring

* Better draft, including most (if not all?) properties

* Various fixes, it now compiles

* Refactor, and temporary commenting tests

* All tests passing! But will need to clean up a few things

* Polished some code, re-enabled some errorUtils tests

* Change files

* Update yarn.lock

* Let yarn lint:fix cook

* Simplifying

* Nit: ordering

* Avoid unnecessary JSON work

* nit

* Mostly placing some common props into Part A ext, plus adding/removing props

* Distinguish between deviceClass and nodePlatform

* Nit

* [Telemetry] Enable data uploading (#14039)

* Set instrumentation key

* Change files

* Nit: Minor lint fix

* Change files

* update yarn

* yarn again

* lint:fix

---------

Co-authored-by: Tatiana Kapos <tatianakapos@microsoft.com>
danielayala94 added a commit to danielayala94/react-native-windows that referenced this pull request Jan 28, 2025
* Draft of telemetry refactoring

* Better draft, including most (if not all?) properties

* Various fixes, it now compiles

* Refactor, and temporary commenting tests

* All tests passing! But will need to clean up a few things

* Polished some code, re-enabled some errorUtils tests

* Change files

* Update yarn.lock

* Let yarn lint:fix cook

* Simplifying

* Nit: ordering

* Avoid unnecessary JSON work

* nit

* Mostly placing some common props into Part A ext, plus adding/removing props

* Distinguish between deviceClass and nodePlatform

* Nit
danielayala94 added a commit that referenced this pull request Jan 29, 2025
* [Telemetry] Migration from AppInsights to 1DS (#13493)

* Draft of telemetry refactoring

* Better draft, including most (if not all?) properties

* Various fixes, it now compiles

* Refactor, and temporary commenting tests

* All tests passing! But will need to clean up a few things

* Polished some code, re-enabled some errorUtils tests

* Change files

* Update yarn.lock

* Let yarn lint:fix cook

* Simplifying

* Nit: ordering

* Avoid unnecessary JSON work

* nit

* Mostly placing some common props into Part A ext, plus adding/removing props

* Distinguish between deviceClass and nodePlatform

* Nit

* [Telemetry] Enable data uploading (#14039)

* Set instrumentation key

* Change files

* Nit: Minor lint fix

* [Telemetry] Expand field sanitization to codedError.data (#14161)

* Scrub PII from codedError, add unit test

* Nit: comment updates

* Lint fixes

* Change files

* Enhanced bug fix using recursion, added test field cases

* Lint fix

* Sanitize any, and test fixes

* Lint fix, again

* [Telemetry] Bug fix in `codedError.data` from `trackException()` (#14191)

* Bug fix

* Simplify fix, add unit test

* Change files

* Nit: change test description

* Manual change to add UseFabric (RnwNewArch not in 0.75)

* [Telemetry] Address package name limitations - Take 2 (#14259)

* Introducing package name processing

* Add trimming if string length > 100

* Change files

* Change files

* Update yarn.lock

* Lint fixes

* Add RnwNewArch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants