Skip to content

[0.76] Enable telemetry collection#14095

Merged
TatianaKapos merged 9 commits intomicrosoft:0.76-stablefrom
danielayala94:backport0b6877e9f9cdc888c4a43425952e8e627a4b2d94
Nov 11, 2024
Merged

[0.76] Enable telemetry collection#14095
TatianaKapos merged 9 commits intomicrosoft:0.76-stablefrom
danielayala94:backport0b6877e9f9cdc888c4a43425952e8e627a4b2d94

Conversation

@danielayala94
Copy link
Copy Markdown
Contributor

@danielayala94 danielayala94 commented Nov 7, 2024

Description

Combo of PRs to backport into 0.76:
#13493
#14039 (one line change)

The PR description that follows is mostly from #13493, as the other PR just sets the instrumentation key.

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

Enables telemetry collection to monitor RNW reliability, performance, and usage.

Microsoft Reviewers: Open in CodeFlow

* 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
* Set instrumentation key

* Change files

* Nit: Minor lint fix
@danielayala94 danielayala94 requested review from a team as code owners November 7, 2024 20:00
@TatianaKapos
Copy link
Copy Markdown
Contributor

TatianaKapos commented Nov 8, 2024

Will merge this in for a dot release of 0.76! discussed offline, will merge this for 0.76.0!

@TatianaKapos TatianaKapos enabled auto-merge (squash) November 8, 2024 22:36
@TatianaKapos TatianaKapos merged commit cafab62 into microsoft:0.76-stable Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants