Skip to content

Commit

Permalink
feat: Expose library versions used to capture session replay data (#809)
Browse files Browse the repository at this point in the history
  • Loading branch information
metal-messiah authored Nov 10, 2023
1 parent 92d864c commit bc275ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/features/session_replay/aggregate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ export class Aggregate extends AggregateBase {
hasError: this.hasError,
isFirstChunk: agentRuntime.session.state.sessionReplaySentFirstChunk === false,
decompressedBytes: this.payloadBytesEstimation,
'nr.rrweb.version': RRWEB_VERSION
'rrweb.version': RRWEB_VERSION
}, MAX_PAYLOAD_SIZE - this.payloadBytesEstimation).substring(1) // remove the leading '&'
},
body: this.events
Expand Down
2 changes: 1 addition & 1 deletion src/loaders/configure/nonce.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

__webpack_require__.nc = (() => {
try {
if (document.currentScript && document.currentScript.nonce) {
if (document && document.currentScript && document.currentScript.nonce) {
return document.currentScript.nonce
}
} catch (ex) {
Expand Down
2 changes: 1 addition & 1 deletion tests/specs/session-replay/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function testExpectedReplay ({ data, session, hasMeta, hasSnapshot, hasEr
agentVersion: expect.any(String),
isFirstChunk: isFirstChunk || expect.any(Boolean),
decompressedBytes: decompressedBytes || expect.any(Number),
'nr.rrweb.version': expect.any(String)
'rrweb.version': expect.any(String)
})

expect(data.body).toEqual(expect.any(Array))
Expand Down

0 comments on commit bc275ee

Please sign in to comment.