v0.23.1
-
@splunk/otel-web-
Added a new
SplunkRum.reportError(error, context)API for error reporting. This replaces the deprecatedSplunkRum.error()method and allows optional context to be attached to errors #1197- API signature:
reportError: ( error: string | Event | Error | ErrorEvent, context?: Record<string, string | number | boolean>, ) => void
- The
SplunkRum.error()method will be removed in the next major release. Please update your code to usereportError.
- API signature:
-
Errors can now include a
splunkContextproperty (Record<string, string | number | boolean>) #1200- This context will be automatically extracted and added as attributes to the corresponding error span.
- Example:
try { throw new Error('Just an error') } catch (e) { e.splunkContext = { errorValueString: 'errorValue', errorValueNumber: 123, } console.error(e) }
-
Throttle error spans #1208
- Error reporting is throttled to reduce noise and avoid duplicate spans. Each unique error span is identified by its attributes. We only report the same error (based on its attributes) once per second.
-
Allow transforming errors before they're sent to the backend #1275
-
Example:
SplunkOtelWeb.init({ ..., intrumentations: { errors: { onError: (error, context) => { if (error instanceof Error) { error.message = 'Modified message' } return { error, context } }, }, }, ... })
-
-
Improved error messages for resources that fail to load, making troubleshooting easier #1317
-
-
@splunk/otel-web-session-recorder- Added a new
recorderTypeoption to the session recorder. You can now choose between the defaultrrwebrecorder and the new, more efficientsplunkrecorder. - Example of how to enable new
splunksession replay capabilitiesSplunkSessionRecorder.init({ app: '<appName>', realm: '<realm>', rumAccessToken: '<token>', recorder: 'splunk', })
- Session replay do not have text and inputs recorded by default. It can be enabled using
maskAllTextandmaskAllInputsset tofalse.- Example
SplunkSessionRecorder.init({ app: '<appName>', realm: '<realm>', rumAccessToken: '<token>', recorder: 'splunk', maskAllInputs: false, maskAllText: false, })
- Session replay do not have some texts or inputs captured. It can be solved by using mask/unmask/exclude on specific elements using
sensitivityRules.
They are in the format ofsensitivityRules: [{ type: 'mask' | 'unmask' | 'exclude', selector: '<css selector>' }]- Example
SplunkSessionRecorder.init({ app: '<appName>', realm: '<realm>', rumAccessToken: '<token>', recorder: 'splunk', sensitivityRules: [ { type: 'unmask', selector: 'p' }, { type: 'exclude', selector: 'img' }, { type: 'mask', selector: '.user-class' }, { type: 'exclude', selector: '#user-detail' }, ], })
- Session replay is missing assets like fonts or images. It can be solved by packing assets into the recordings. It might increase data throughput. Utilize
features.packAssetsandfeatures.cacheAssets.- Example
SplunkSessionRecorder.init({ app: '<appName>', realm: '<realm>', rumAccessToken: '<token>', recorder: 'splunk', features: { packAssets: true, cacheAssets: true, }, })
- Example
- Canvas element capturing must be enabled using
features.canvas.- Example
SplunkSessionRecorder.init({ app: '<appName>', realm: '<realm>', rumAccessToken: '<token>', recorder: 'splunk', features: { canvas: true, }, })
- Video element capturing must be enabled using
features.video. - ExampleSplunkSessionRecorder.init({ app: '<appName>', realm: '<realm>', rumAccessToken: '<token>', recorder: 'splunk', features: { video: true, }, })
- Added a new
-
Internal
CDN
Version v0.23.1
splunk-otel-web-session-recorder.js:
<script src="https://cdn.signalfx.com/o11y-gdi-rum/v0.23.1/splunk-otel-web-session-recorder.js" integrity="sha384-1MZ0ft/NvAwwqqsJMZ6rm4rHV8KkYxyxJrN0ITlWEbgURvAk90238VCm5ngx5Lr+" crossorigin="anonymous"></script>
splunk-otel-web.js:
<script src="https://cdn.signalfx.com/o11y-gdi-rum/v0.23.1/splunk-otel-web.js" integrity="sha384-ronH4GN/xooPKXC1FswlCIxwF8xuxrprcGIsFOUPcGFE+5VuU90PklySwocQDnjl" crossorigin="anonymous"></script>Version v0.23
WARNING: Content behind this URL might be updated when we release a new version.
For this reason we do not provide integrity attribute.
splunk-otel-web-session-recorder.js:
<script src="https://cdn.signalfx.com/o11y-gdi-rum/v0.23/splunk-otel-web-session-recorder.js" crossorigin="anonymous"></script>
splunk-otel-web.js:
<script src="https://cdn.signalfx.com/o11y-gdi-rum/v0.23/splunk-otel-web.js" crossorigin="anonymous"></script>Version v0
WARNING: Content behind this URL might be updated when we release a new version.
For this reason we do not provide integrity attribute.
splunk-otel-web-session-recorder.js:
<script src="https://cdn.signalfx.com/o11y-gdi-rum/v0/splunk-otel-web-session-recorder.js" crossorigin="anonymous"></script>
splunk-otel-web.js:
<script src="https://cdn.signalfx.com/o11y-gdi-rum/v0/splunk-otel-web.js" crossorigin="anonymous"></script>Version latest
WARNING: Content behind this URL might be updated when we release a new version.
For this reason we do not provide integrity attribute.
splunk-otel-web-session-recorder.js:
<script src="https://cdn.signalfx.com/o11y-gdi-rum/latest/splunk-otel-web-session-recorder.js" crossorigin="anonymous"></script>
splunk-otel-web.js:
<script src="https://cdn.signalfx.com/o11y-gdi-rum/latest/splunk-otel-web.js" crossorigin="anonymous"></script>