Skip to content

v0.23.1

Choose a tag to compare

@srv-gh-o11y-gdi srv-gh-o11y-gdi released this 26 Aug 09:12
036564a
  • @splunk/otel-web

    • Added a new SplunkRum.reportError(error, context) API for error reporting. This replaces the deprecated SplunkRum.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 use reportError.
    • Errors can now include a splunkContext property (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 recorderType option to the session recorder. You can now choose between the default rrweb recorder and the new, more efficient splunk recorder.
    • Example of how to enable new splunk session replay capabilities
      SplunkSessionRecorder.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 maskAllText and maskAllInputs set to false.
      • 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 of sensitivityRules: [{ 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.packAssets and features.cacheAssets.
      • Example
        SplunkSessionRecorder.init({
        	app: '<appName>',
        	realm: '<realm>',
        	rumAccessToken: '<token>',
        	recorder: 'splunk',
        	features: {
        		packAssets: true,
        		cacheAssets: true,
        	},
        })
    • 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. - Example
      SplunkSessionRecorder.init({
      	app: '<appName>',
      	realm: '<realm>',
      	rumAccessToken: '<token>',
      	recorder: 'splunk',
      	features: {
      		video: true,
      	},
      })
  • Internal

    • Updated dependencies
    • Improved release scripts #1123
    • switch to using pnpm #1182 and use turborepo #1188

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>