Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃攬Add web vital attribution telemetry debug #2344

Merged
merged 5 commits into from Jul 24, 2023

Conversation

amortemousque
Copy link
Contributor

@amortemousque amortemousque commented Jul 18, 2023

Motivation

Assess the best strategy to display / collect the Core Web Vital attributed node.
Here are the questions that need to be answered:

How often do we have the attributed DOM element?
Can we get the serialized node id by the time we process the web vitals?

Answered with the "XXX attribution" telemetry debug:

  • hasNode: Check if the web vital has an attributed element to collect
  • replayRecording: is Replay recording
  • serializedDomNode: Get the serialized DOM node if available
  • computationDelay: Delay between the web vital and the collection of the web vital by the SDK

How precise would be a Replay visualization?

Answered with the "XXX attribution recording delay" debug:

  • recordingDelay: Delay between the web vital and Replay start
  • computationDelay: Delay between the web vital and the collection of the web vital by the SDK
  • hasNode: Do we still have the node when replay starts
  • serializedDomNode: Can we still get the Node id when replay starts

Changes

  • Add recorderStartObservable to RecorderApi
  • Add getSerializedNodeId to RecorderApi
  • Send telemetry debug for each Core Web Vital

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

- Add recorderStartObservable
- Expose getSerializedNodeId
@amortemousque amortemousque requested review from a team as code owners July 18, 2023 16:07
Copy link
Contributor

@bcaudan bcaudan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov-commenter
Copy link

codecov-commenter commented Jul 19, 2023

Codecov Report

Merging #2344 (8f13844) into main (85dd06b) will decrease coverage by 0.19%.
The diff coverage is 75.43%.

@@            Coverage Diff             @@
##             main    #2344      +/-   ##
==========================================
- Coverage   94.17%   93.99%   -0.19%     
==========================================
  Files         206      208       +2     
  Lines        6134     6175      +41     
  Branches     1358     1368      +10     
==========================================
+ Hits         5777     5804      +27     
- Misses        357      371      +14     
Impacted Files Coverage 螖
packages/rum-core/src/boot/rumPublicApi.ts 96.47% <酶> (酶)
...ages/rum-core/src/browser/performanceCollection.ts 52.04% <酶> (酶)
.../domain/rumEventsCollection/view/viewCollection.ts 100.00% <酶> (酶)
packages/rum-core/test/noopRecorderApi.ts 60.00% <0.00%> (-15.00%) 猬囷笍
...entsCollection/view/startWebVitalTelemetryDebug.ts 28.57% <28.57%> (酶)
packages/rum/src/boot/recorderApi.ts 89.09% <66.66%> (-1.30%) 猬囷笍
...omain/rumEventsCollection/view/trackViewMetrics.ts 96.36% <91.30%> (-1.49%) 猬囷笍
packages/rum-core/src/boot/startRum.ts 90.00% <100.00%> (+0.20%) 猬嗭笍
...umEventsCollection/view/trackInitialViewTimings.ts 100.00% <100.00%> (酶)
.../src/domain/rumEventsCollection/view/trackViews.ts 100.00% <100.00%> (酶)
... and 1 more

... and 2 files with indirect coverage changes

馃摚 We鈥檙e building smart automated test selection to slash your CI/CD build times. Learn more

@amortemousque amortemousque force-pushed the aymeric/debug-selector-match-nodeid branch from ad296c9 to c027125 Compare July 19, 2023 15:31
@amortemousque amortemousque force-pushed the aymeric/debug-selector-match-nodeid branch from 2d9d55c to 8f13844 Compare July 19, 2023 19:34
@amortemousque amortemousque merged commit 7bdc547 into main Jul 24, 2023
17 checks passed
@amortemousque amortemousque deleted the aymeric/debug-selector-match-nodeid branch July 24, 2023 09:21
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.

None yet

4 participants