Skip to content

Commit

Permalink
Integrate 1b4b2bf (#2587) from roman/responseStatus into staging-05
Browse files Browse the repository at this point in the history
Co-authored-by: roman.gaignault <roman.gaignault@datadoghq.com>
  • Loading branch information
dd-mergequeue[bot] and RomanGaignault authored Feb 2, 2024
2 parents edc58c0 + 1b4b2bf commit 1e41f28
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/rum-core/src/browser/performanceCollection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export enum RumPerformanceEntryType {
export interface RumPerformanceResourceTiming {
entryType: RumPerformanceEntryType.RESOURCE
initiatorType: string
responseStatus?: number
name: string
startTime: RelativeTime
duration: Duration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ describe('resourceCollection', () => {
url: 'https://resource.com/valid',
download: jasmine.any(Object),
first_byte: jasmine.any(Object),
status_code: 200,
},
type: RumEventType.RESOURCE,
_dd: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ function processRequest(
correspondingTimingOverrides,
pageStateInfo
)

return {
startTime: startClocks.relative,
rawRumEvent: resourceEvent,
Expand Down Expand Up @@ -142,6 +141,7 @@ function processResourceEntry(
id: generateUUID(),
type,
url: entry.name,
status_code: entry.responseStatus,
},
type: RumEventType.RESOURCE as const,
_dd: {
Expand Down
1 change: 1 addition & 0 deletions packages/rum-core/test/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ export function createPerformanceEntry<T extends RumPerformanceEntryType>(
responseStart: 200 as RelativeTime,
secureConnectionStart: 200 as RelativeTime,
startTime: 200 as RelativeTime,
responseStatus: 200,
},
overrides
) as EntryTypeToReturnType[T]
Expand Down

0 comments on commit 1e41f28

Please sign in to comment.