-
Notifications
You must be signed in to change notification settings - Fork 163
✨ Video Quality Monitoring adaptation #3822
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
base: main
Are you sure you want to change the base?
Changes from all commits
541c5b4
7391a21
fbb7d46
4780890
777e0b3
94082e2
f3c22e7
4f7da97
f1a5c96
3953082
9dcaf19
c90908b
d6cf31c
e4c3277
fdd98c7
f655cee
eba566c
4af6b65
48f23b9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ import { | |
import type { RumEventDomainContext } from '../domainContext.types' | ||
import type { AssembledRumEvent } from '../rawRumEvent.types' | ||
import { RumEventType } from '../rawRumEvent.types' | ||
import type { RumViewEvent } from '../rumEvent.types' | ||
import type { LifeCycle } from './lifeCycle' | ||
import { LifeCycleEventType } from './lifeCycle' | ||
import type { RumConfiguration } from './configuration' | ||
|
@@ -86,6 +87,16 @@ export function startRumAssembly( | |
...VIEW_MODIFIABLE_FIELD_PATHS, | ||
...ROOT_MODIFIABLE_FIELD_PATHS, | ||
}, | ||
[RumEventType.STREAM]: { | ||
...USER_CUSTOMIZABLE_FIELD_PATHS, | ||
...VIEW_MODIFIABLE_FIELD_PATHS, | ||
...ROOT_MODIFIABLE_FIELD_PATHS, | ||
}, | ||
[RumEventType.TRANSITION]: { | ||
...USER_CUSTOMIZABLE_FIELD_PATHS, | ||
...VIEW_MODIFIABLE_FIELD_PATHS, | ||
...ROOT_MODIFIABLE_FIELD_PATHS, | ||
}, | ||
} | ||
const eventRateLimiters = { | ||
[RumEventType.ERROR]: createEventRateLimiter( | ||
|
@@ -109,7 +120,7 @@ export function startRumAssembly( | |
LifeCycleEventType.RAW_RUM_EVENT_COLLECTED, | ||
({ startTime, duration, rawRumEvent, domainContext }) => { | ||
const defaultRumEventAttributes = hooks.triggerHook(HookNames.Assemble, { | ||
eventType: rawRumEvent.type, | ||
eventType: rawRumEvent.type === 'stream' ? 'view' : rawRumEvent.type, | ||
startTime, | ||
duration, | ||
})! | ||
|
@@ -126,7 +137,40 @@ export function startRumAssembly( | |
if (isEmptyObject(serverRumEvent.context!)) { | ||
delete serverRumEvent.context | ||
} | ||
lifeCycle.notify(LifeCycleEventType.RUM_EVENT_COLLECTED, serverRumEvent) | ||
|
||
if (rawRumEvent.type === 'stream') { | ||
const streamEvent = { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thought: this doesn't look like production ready code.. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My knowledge is that the idea is to make it work, and have it tested next week with customers and if no one want's it, to be dropped. That's why I think maybe the integration is not production ready. But I will move this to a helper function, use the types and unit test it to make it prod ready. |
||
...(serverRumEvent as RumViewEvent), | ||
_dd: { | ||
...serverRumEvent._dd, | ||
document_version: serverRumEvent.stream?.document_version, | ||
}, | ||
stream: { | ||
...serverRumEvent.stream, | ||
time_spent: undefined, | ||
}, | ||
view: { | ||
...serverRumEvent.view, | ||
id: serverRumEvent.stream?.id, | ||
is_active: true, | ||
action: { | ||
count: 0, | ||
}, | ||
error: { | ||
count: 0, | ||
}, | ||
resource: { | ||
count: 0, | ||
}, | ||
time_spent: serverRumEvent.stream?.time_spent, | ||
}, | ||
type: 'view', | ||
} | ||
|
||
lifeCycle.notify(LifeCycleEventType.RUM_EVENT_COLLECTED, streamEvent as AssembledRumEvent) | ||
} else { | ||
lifeCycle.notify(LifeCycleEventType.RUM_EVENT_COLLECTED, serverRumEvent) | ||
} | ||
} | ||
} | ||
) | ||
|
Uh oh!
There was an error while loading. Please reload this page.