-
Notifications
You must be signed in to change notification settings - Fork 142
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Implement addTiming #668
Conversation
packages/rum/src/domain/rumEventsCollection/view/viewCollection.ts
Outdated
Show resolved
Hide resolved
packages/rum/src/domain/rumEventsCollection/view/viewCollection.ts
Outdated
Show resolved
Hide resolved
packages/rum/src/domain/rumEventsCollection/view/viewCollection.ts
Outdated
Show resolved
Hide resolved
packages/rum/src/domain/rumEventsCollection/view/trackViews.spec.ts
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #668 +/- ##
==========================================
- Coverage 77.86% 77.81% -0.05%
==========================================
Files 60 60
Lines 3266 3282 +16
Branches 710 714 +4
==========================================
+ Hits 2543 2554 +11
- Misses 723 728 +5
Continue to review full report at Codecov.
|
e818288
to
7d2c641
Compare
acfcf89
to
5016c63
Compare
packages/rum/src/domain/rumEventsCollection/view/viewCollection.spec.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Bastien Caudan <bastien.caudan@datadoghq.com>
packages/rum-core/src/domain/rumEventsCollection/view/viewCollection.spec.ts
Outdated
Show resolved
Hide resolved
packages/rum-core/src/domain/rumEventsCollection/view/viewCollection.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Bastien Caudan <bastien.caudan@datadoghq.com>
Co-authored-by: Bastien Caudan <bastien.caudan@datadoghq.com>
7a2ca0b
to
2ee6e03
Compare
addTiming: () => undefined, | ||
configuration: ({ | ||
isEnabled: () => false, | ||
} as any) as Configuration, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cf previous comment, any could be removed here too
const view = { | ||
location, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
location, | |
location: location as Location, |
it would remove the need to cast view as View in the next statement
packages/rum/src/rumEvent.types.ts
Outdated
@@ -0,0 +1,658 @@ | |||
/* tslint:disable */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cf c822e93, it is not the right file
packages/rum-core/test/fixtures.ts
Outdated
@@ -66,6 +66,7 @@ export function createRawRumEvent(type: RumEventType, overrides?: Context): RawR | |||
date: 0, | |||
view: { | |||
action: { count: 0 }, | |||
customTimings: {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it needed?
Motivation
Add
DD_RUM.addTiming()
API.Changes
Added the method
addTiming
to the global RUM objectname
is the name of the custom timing. If the view already has that timing, it will be updated with the giventime
.inInitialView
indicates if we want to add the timing in the initial view. Otherwise the timing is added to the current view.This new method is hidden behind the feature flag
custom-timings
.Testing
I have gone over the contributing documentation.