npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@splunk/otel-web

v3.2.0

Published

Splunk distribution of Open Telemetry for browser environment.

Readme

@splunk/otel-web


For complete instructions for how to get started with the Splunk distribution of OpenTelemetry JavaScript for Web, see Install the Browser RUM agent for Splunk RUM and Instrument browser-based web applications for Splunk RUM.

Splunk RUM for Browser collects performance metrics, web vitals, errors, and other forms of data for every user session to enable you to detect and troubleshoot problems in your application. For a complete view of your application from browser to back-end, integrate with Splunk APM.

🚀 Installation & Setup

Package Manager Installation

1. Install the Package

npm install @splunk/otel-web
# or
pnpm add @splunk/otel-web
# or
yarn add @splunk/otel-web

2. Initialize RUM

import { SplunkRum } from '@splunk/otel-web'

SplunkRum.init({
	realm: 'us1', // Your Splunk realm
	rumAccessToken: 'YOUR_RUM_ACCESS_TOKEN', // RUM access token
	applicationName: 'my-web-app', // Application identifier
	deploymentEnvironment: 'production', // Environment (dev, staging, prod)
})

CDN Installation

1. Load the Script

Choose a versioning strategy based on your needs:

Major Version Lock (Recommended)

<!-- Locks to v3.x.x - gets latest minor and patch updates -->
<script
	src="https://cdn.observability.splunkcloud.com/o11y-gdi-rum/v3/splunk-otel-web.js"
	crossorigin="anonymous"
></script>

Minor Version Lock

<!-- Locks to v3.1.x - gets latest patch updates only -->
<script
	src="https://cdn.observability.splunkcloud.com/o11y-gdi-rum/v3.1/splunk-otel-web.js"
	crossorigin="anonymous"
></script>

Exact Version Lock

<!-- Locks to exact version v3.1.0 - no automatic updates -->
<script
	src="https://cdn.observability.splunkcloud.com/o11y-gdi-rum/v3.1.0/splunk-otel-web.js"
	crossorigin="anonymous"
	integrity="sha384-<integrity>"
></script>

Latest Version (Not Recommended)

⚠️ Warning: The latest tag has been deprecated and now defaults to version 2.5.1. To receive future updates while avoiding breaking changes, we recommend pinning your configuration to a specific major version (e.g., v3 or v2).

📖 For version numbers and integrity hashes, see GitHub Releases.

📚 For detailed CDN setup instructions, see the official documentation.

2. Initialize RUM

<script>
	SplunkRum.init({
		realm: 'us1', // Your Splunk realm
		rumAccessToken: 'YOUR_RUM_ACCESS_TOKEN', // RUM access token
		applicationName: 'my-web-app', // Application identifier
		deploymentEnvironment: 'production', // Environment (dev, staging, prod)
	})
</script>

Complete CDN Example

<!DOCTYPE html>
<html>
	<head>
		<title>My Web App</title>
		<!-- Load Splunk RUM (using major version lock) -->
		<script
			src="https://cdn.observability.splunkcloud.com/o11y-gdi-rum/v1/splunk-otel-web.js"
			crossorigin="anonymous"
		></script>
		<script>
			SplunkRum.init({
				realm: 'us1',
				rumAccessToken: 'YOUR_RUM_ACCESS_TOKEN',
				applicationName: 'my-web-app',
				deploymentEnvironment: 'production',
				debug: false, // Set to true for development
			})
		</script>
	</head>
	<body>
		<!-- Your app content -->
	</body>
</html>

⚙️ Configuration Options

| Option | Type | Required | Default | Description | | ------------------------------------- | ----------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | realm | string | ✅ | - | Splunk realm (us0, us1, eu0, etc.) | | rumAccessToken | string | ✅ | - | Publicly-visible RUM access token | | applicationName | string | ❌ | 'unknown-browser-app' | Application name identifier | | deploymentEnvironment | string | ❌ | - | Sets the environment attribute | | version | string | ❌ | - | Sets the app.version attribute | | beaconEndpoint | string | ❌ | - | Custom destination URL (overrides realm) | | debug | boolean | ❌ | false | Enable internal debug logging | | cookieDomain | string | ❌ | window.location.hostname | Domain for session cookies | | ignoreUrls | Array<string\|RegExp> | ❌ | [] | URLs to exclude from tracing | | navigationMetrics | boolean\|Config | ❌ | true | Page completion metrics for document loads and route changes. Supports global settings and ordered urlOverrides for page-specific clearLoadingResourcesOnNewPage, quietTime, ignoreUrls, blockingSelectors, maxPageLoadTimeoutForManualApi, maxPageLoadWaitTime, maxResourcesToWatch, and monitors. spaMetrics is a deprecated alias for this option. | | globalAttributes | Attributes | ❌ | {} | Attributes added to every span | | dataAttributesToCapture | string[] | ❌ | [] | Explicit allowlist of data-* attributes to capture from click and rage-click targets, and expose to the element picker. Accepts hyphenated names like data-test-id or camelCase names like testId. Captured values may be sensitive or high-cardinality, so only allowlist attributes intended for telemetry. | | persistence | 'cookie'\|'localStorage' | ❌ | 'cookie' | Where to store session data | | disableAutomationFrameworks | boolean | ❌ | false | Block automation frameworks | | disableBots | boolean | ❌ | false | Block bots (Google bot, Bing bot, etc.) | | disableResourceLoadErrorReporting | boolean | ❌ | false | Suppress client-error spans for resource-element load failures. Resource timing spans and available HTTP status information continue to be reported. | | user | { trackingMode: 'noTracking'\|'anonymousTracking' } | ❌ | - | user.trackingMode controls whether the agent creates and attaches an anonymous user ID to spans. In noTracking mode, no anonymous user ID is generated or stored. In anonymousTracking mode, the agent generates a persistent anonymous user ID (stored using the configured persistence method) and attaches it to spans to enable session and user correlation. | | user.trackingMode | 'noTracking'\|'anonymousTracking' | ❌ | v1.x: 'noTracking'; v2+: 'anonymousTracking' | User tracking behavior | | exporter.otlp | boolean | ❌ | true (false if beaconEndpoint is set) | Use OTLP format instead of Zipkin | | exporter.onAttributesSerializing | function | ❌ | - | Transform attributes before export | | privacy.maskAllText | boolean | ❌ | true | Mask all text from text nodes | | privacy.sensitivityRules | Array<SensitivityRule> | ❌ | [] | Rules for text sensitivity by selector | | Instrumentations | | | | | | instrumentations.blockingElement | boolean\|Config | ❌ | false (true if navigationMetrics.monitors includes elements and blockingSelectors is non-empty) | Per-element blocking spans for elements matching navigationMetrics.blockingSelectors. enabled overrides the navigationMetrics-derived default, and there is no separate selector config. See Navigation Metrics below. | | instrumentations.connectivity | boolean\|Config | ❌ | false | Network connectivity monitoring | | instrumentations.document | boolean\|Config | ❌ | true | Document load instrumentation | | instrumentations.errors | boolean\|Config | ❌ | true | Error capture | | instrumentations.fetch | boolean\|Config | ❌ | true | Fetch API monitoring | | instrumentations.frustrationSignals | boolean\|Config | ❌ | true | User frustration detection. Rage click, dead click, error click, and thrashed cursor detection are enabled by default and can be disabled individually. See Frustration Signals below | | instrumentations.interactions | boolean\|Config | ❌ | true | User interaction tracking | | instrumentations.loaf | boolean\|Config | ❌ | false | Long Animation Frames tracking in supported Chromium browsers. When enabled and supported, this suppresses longtask spans for the page session. | | instrumentations.longtask | boolean\|Config | ❌ | true | Deprecated. Long task detection (>50ms). Prefer instrumentations.loaf for Long Animation Frames; keep enabled for fallback coverage where LoAF is unsupported. | | instrumentations.postload | boolean\|Config | ❌ | true | Post-load resource timing. Image and script resources are captured by default; experimental: true also captures audio, CSS, fonts, iframes, links, other resources, and video. | | instrumentations.socketio | boolean\|Config | ❌ | false | Socket.IO client monitoring | | instrumentations.visibility | boolean\|Config | ❌ | false | Page visibility changes | | instrumentations.webvitals | boolean\|Config | ❌ | true | Web Vitals collection | | instrumentations.websocket | boolean\|Config | ❌ | false | WebSocket monitoring | | instrumentations.xhr | boolean\|Config | ❌ | true | XMLHttpRequest monitoring |

Navigation Metrics

The navigationMetrics option (deprecated alias: spaMetrics) controls page completion time (PCT) calculation for document loads and SPA route changes. When navigationMetrics is true, the default monitor types are enabled with the default timing settings. Use navigationMetrics.monitors globally, or inside navigationMetrics.urlOverrides, to control which resource sources can keep PCT waiting for a specific page.

PCT continues to determine route-change span duration with the default configuration, and route-change spans include browser.navigation.page_completion_time and browser.navigation.status. Set experimental: true to also emit PCT diagnostic and page-correlation attributes on related spans, PCT attributes on the initial document-load span, and the PCT-based pageLoad span.

By default, navigationMetrics.clearLoadingResourcesOnNewPage is true, so pending resources discovered on a previous page are ignored when PCT calculation starts for a new page. Set it to false to keep carrying pending resources into the next page calculation unless they are filtered by the active monitors or ignoreUrls config.

| Monitor | Tracks | Typical use | | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | | network | fetch and XMLHttpRequest lifecycle events. Requests discovered before they settle keep PCT waiting until they finish or error. | Keep enabled for pages whose useful content depends on API calls. Disable for polling, analytics, or background requests that should not delay PCT. | | media | Image, audio, and video elements observed in the DOM. Pending media loads keep PCT waiting until they load or error. | Keep enabled when above-the-fold media is part of page readiness. Disable for lazy media, autoplay, or decorative assets that can load later. | | performance | Resource Timing entries reported through PerformanceObserver, including browser-loaded resources that do not flow through fetch/XHR events. | Keep enabled to include CSS, script, and other resource timing entries. Disable when resource timing noise makes PCT too broad. | | elements | Visible elements matching blockingSelectors. Matching elements keep PCT waiting until they are hidden, removed, or stop matching. | Enable for app-controlled loading indicators that mark page readiness after async rendering work. |

The elements monitor is opt-in. Add 'elements' to navigationMetrics.monitors and configure blockingSelectors to wait for visible loading indicators. Hidden elements, elements with display: none, and elements with visibility: hidden or collapse do not block PCT.

Array fields in URL overrides replace the inherited arrays for matched URLs. For example, monitors: ['network'] waits only for fetch/XHR activity on that page, while monitors: ['media', 'performance'] ignores fetch/XHR activity but still watches media and resource timing entries. If an override specifies ignoreUrls or blockingSelectors, include any global entries that should still apply on that page.

Blocking Element Spans

The instrumentations.blockingElement option emits one blockingElement span per DOM element matching a configured CSS selector, from when it becomes visible until it's removed, hidden, or stops matching. It does not require experimental: true. It uses the same visibility rules as the elements PCT monitor above (hidden elements, display: none, and visibility: hidden/collapse don't count), but tracks each matching element independently rather than collapsing them into a single PCT resource — this is a separate instrumentation with no effect on PCT.

Selectors always come from navigationMetrics.blockingSelectors — there is no separate selector config for this instrumentation. If instrumentations.blockingElement is unset, it's enabled only when elements is included in navigationMetrics.monitors and blockingSelectors is non-empty. Set instrumentations.blockingElement: { enabled: true } to enable it regardless of navigationMetrics.monitors, or instrumentations.blockingElement: false to disable it independent of navigationMetrics. Selectors and enablement re-resolve on every SPA route change, so a matching navigationMetrics.urlOverrides entry takes effect immediately after navigating — this requires instrumentations.interactions to be enabled, since that's what detects SPA route changes (via history.pushState/replaceState and hashchange) and triggers re-evaluation. If interactions is disabled, blockingElement still applies whichever config matched the initial page, but never re-resolves after that.

The tab being hidden (document.visibilityState turning 'hidden') also interrupts every open blockingElement span, ending it with completion: 'visibility_hidden' before the buffered spans are flushed — this ensures elements still visible when a tab is hidden or the browser discards it aren't silently lost. If the tab becomes visible again and the element is still present, tracking resumes with a fresh span.

If an element matches more than one configured selector, it still gets exactly one span — browser.element.selector lists every matched selector as a comma-separated value (in the order the element first matched each one), reflecting every selector the element matched at any point while the span was open — including one dropped by a later navigationMetrics.urlOverrides change — not just the one active when it completed. Concurrently open spans are capped at 1000 elements; once reached, additional elements are silently dropped from tracking until an existing one completes, with a single warning logged. Each span also includes browser.element.xpath, an XPath locator for the element.

Every span ends with a browser.element.completion attribute: completed (the element disappeared normally), interrupted (the instrumentation was disabled, or the page was unloaded, while the span was still open), visibility_hidden (the tab was hidden while the span was still open, see above), or timeout (the element stayed visible longer than maxElementSpanDuration, default 180000ms/3 minutes — configurable via instrumentations.blockingElement: { maxElementSpanDuration: <ms> }). The timeout guards against an element that never disappears producing no telemetry at all.

Long Animation Frames

When enabled, the loaf instrumentation reports browser Long Animation Frames as long-animation-frame spans. It is the preferred path for long task visibility, replacing the deprecated longtask instrumentation where browser support is available. It is opt-in because browser support is currently Chromium-only.

SplunkRum.init({
	beaconEndpoint: 'https://rum-ingest.example.com/v1/rum',
	rumAccessToken: '<token>',
	instrumentations: {
		loaf: true,
	},
})

When instrumentations.loaf is enabled and the browser supports long-animation-frame, the default longtask instrumentation is suppressed for that page session to avoid double-reporting overlapping main-thread work. In browsers without LoAF support, longtask remains the fallback unless it is explicitly disabled.

LoAF spans include frame timing attributes such as loaf.duration, loaf.blocking_duration, loaf.entry_start_time, loaf.paint_time, loaf.presentation_time, loaf.render_start, loaf.style_and_layout_start, and loaf.first_ui_event_timestamp. They also include bounded script attribution: loaf.script_count reports the original number of scripts, while only the top three scripts by duration are exported as loaf.script[0..2].* attributes, including script timing fields such as duration, start_time, execution_start, pause_duration, forced_style_and_layout_duration, and source_char_position. loaf.entry_start_time and loaf.script[n].start_time are both measured in milliseconds from the browser performance time origin. Consumers can calculate the script start relative to the LoAF span start as loaf.script[n].start_time - loaf.entry_start_time. To reconstruct an absolute script start from an exported span start, first normalize loafSpan.start to milliseconds, then use loafSpan.start + loaf.script[n].start_time - loaf.entry_start_time. Script source attribution is reported as provided by the browser; use exporter.onAttributesSerializing if your application needs to redact or transform those attributes before export.

To bound payload volume, the SDK emits up to 50 LoAF spans per source in any rolling minute. Additional LoAF entries from the same source are dropped silently to reduce repeated noise from particular scripts while preserving LoAFs from other sources.

Privacy Configuration

The privacy configuration allows you to control how text content is collected from user interactions:

  • maskAllText: When true (default), all text from text nodes is masked unless an unmask rule applies
  • sensitivityRules: Array of rules that determine text sensitivity based on CSS selectors. Rules are applied in order, with later rules overriding earlier ones

Rule Types:

  • mask: Mask text content in matching elements
  • unmask: Unmask text content in matching elements
  • exclude: Exclude matching elements from text collection entirely

Example:

privacy: {
  maskAllText: true,
  sensitivityRules: [
    { rule: 'unmask', selector: '.public-content' },
    { rule: 'exclude', selector: '.sensitive-data' },
    { rule: 'mask', selector: '.public-content .private-info' }
  ]
}

Frustration Signals

The frustrationSignals instrumentation detects user frustration patterns and emits frustration spans. Rage click, dead click, error click, and thrashed cursor detection are all enabled by default. Set an individual detector to false to disable it, or set instrumentations.frustrationSignals to false to disable all frustration detection.

Rage Clicks detect rapid repeated clicks on the same element, indicating the user is frustrated because the UI is unresponsive.

| Option | Type | Default | Description | | ---------------------------- | ------------------------- | ------- | ---------------------------------------------- | | rageClick | false \| object \| true | true | Set to false to disable rage click detection | | rageClick.count | number | 4 | Number of clicks to trigger detection | | rageClick.timeframeSeconds | number | 1 | Time window in seconds | | rageClick.ignoreSelectors | string[] | [] | CSS selectors to exclude from detection |

Dead Clicks detect when a user clicks on an interactive element (link, button, or submit input) but nothing happens — no DOM mutation and no network request occur within the configured time window.

| Option | Type | Default | Description | | ------------------------ | ------------------------- | ------- | ----------------------------------------------------------------- | | deadClick | false \| object \| true | true | Set to false to disable dead click detection | | deadClick.timeWindowMs | number | 1000 | Time window in milliseconds to wait for a DOM or network response | | deadClick.ignoreUrls | Array<string\|RegExp> | [] | URLs where detection is skipped |

Error Clicks detect when a user clicks on an element and a JavaScript error occurs shortly after, indicating the click triggered a broken interaction.

| Option | Type | Default | Description | | ------------------------- | ------------------------- | ------- | ------------------------------------------------------------- | | errorClick | false \| object \| true | true | Set to false to disable error click detection | | errorClick.timeWindowMs | number | 1000 | Time window in milliseconds after a click to watch for errors | | errorClick.ignoreUrls | Array<string\|RegExp> | [] | URLs where detection is skipped |

Thrashed Cursor detects erratic back-and-forth mouse movements, indicating the user is confused or annoyed.

| Option | Type | Default | Description | | -------------------------------------------- | ------------------------- | ------- | ------------------------------------------------------------------------------ | | thrashedCursor | false \| object \| true | true | Set to false to disable thrashed cursor detection | | thrashedCursor.timeWindowMs | number | 2000 | Analysis time window in milliseconds. Also used as cooldown between detections | | thrashedCursor.throttleMs | number | 16 | Minimum interval between samples (min: 16ms) | | thrashedCursor.minDirectionChanges | number | 4 | Minimum direction changes to consider | | thrashedCursor.minDirectionChangeDegrees | number | 45 | Minimum angle change (degrees) to count as a direction change | | thrashedCursor.minTotalDistance | number | 300 | Minimum total distance in pixels | | thrashedCursor.minMovementDistance | number | 5 | Dead zone radius in pixels; movements smaller than this are ignored | | thrashedCursor.minAverageVelocity | number | 300 | Minimum average velocity in px/s | | thrashedCursor.maxVelocity | number | 5000 | Maximum velocity in px/s; samples above this are discarded as noise | | thrashedCursor.maxConfinedAreaSize | number | 200 | Maximum bounding box size (px) for the confined-area score component | | thrashedCursor.thrashingScoreThreshold | number | 0.6 | Score threshold (0–1) to trigger detection | | thrashedCursor.scoreWeightDirectionChanges | number | 0.4 | Weight of direction-changes component in the thrashing score | | thrashedCursor.scoreWeightVelocity | number | 0.3 | Weight of velocity component in the thrashing score | | thrashedCursor.scoreWeightConfinedArea | number | 0.3 | Weight of confined-area component in the thrashing score | | thrashedCursor.ignoreUrls | Array<string\|RegExp> | [] | URLs where detection is skipped |

Example:

instrumentations: {
	frustrationSignals: {
		rageClick: {
			count: 4,
			timeframeSeconds: 1,
			ignoreSelectors: ['#interactive-canvas'],
		},
		deadClick: {
			timeWindowMs: 1000,
			ignoreUrls: [/\/expected-no-response/],
		},
		errorClick: {
			timeWindowMs: 1000,
			ignoreUrls: [/\/expected-errors/],
		},
		thrashedCursor: {
			thrashingScoreThreshold: 0.7,
			ignoreUrls: [/\/game/, /\/drawing-tool/],
		},
	},
}

To retain the 3.0 defaults, keep rage click detection enabled and disable the other three detectors:

instrumentations: {
	frustrationSignals: {
		deadClick: false,
		errorClick: false,
		thrashedCursor: false,
	},
}

Set instrumentations.frustrationSignals to false instead to disable all four detectors.

Complete Configuration Example

import { SplunkRum } from '@splunk/otel-web'

SplunkRum.init({
	// Required settings
	realm: 'us1',
	rumAccessToken: 'YOUR_RUM_ACCESS_TOKEN',

	// Application identification
	applicationName: 'my-web-app',
	deploymentEnvironment: 'production',
	version: '1.2.3',

	cookieDomain: window.location.hostname,
	persistence: 'cookie',
	ignoreUrls: [/\/health-check/, '/analytics/track', 'https://third-party-ads.com'],
	navigationMetrics: {
		blockingSelectors: ['.loading-spinner'],
		clearLoadingResourcesOnNewPage: true,
		ignoreUrls: ['/analytics/track'],
		maxResourcesToWatch: 100,
		monitors: ['media', 'network', 'performance', 'elements'],
		quietTime: 1000,
		urlOverrides: [
			{
				// Plain strings match by substring.
				match: '/cart/',
				quietTime: 1000,
				// Override arrays replace inherited arrays, so repeat global navigation metric ignores if needed.
				ignoreUrls: ['/analytics/track', '/cart/poll'],
				maxResourcesToWatch: 50,
			},
			{
				blockingSelectors: ['[data-checkout-loading]'],
				// Use RegExp, or the regex string convention, for pattern matching.
				match: /\/checkout\/.*/,
				maxPageLoadWaitTime: 5000,
				monitors: ['network', 'elements'],
				quietTime: 2000,
			},
		],
	},

	// Global attributes for all spans
	globalAttributes: {
		'team': 'frontend',
		'feature.flag.checkout': 'enabled',
	},

	// Bot detection
	disableAutomationFrameworks: true,
	disableBots: true,

	// User tracking
	user: {
		trackingMode: 'anonymousTracking',
	},

	// Privacy configuration
	privacy: {
		maskAllText: true, // Mask all text from text nodes by default
		sensitivityRules: [
			// Unmask text in specific elements
			{ rule: 'unmask', selector: '.public-content' },
			{ rule: 'unmask', selector: 'h1, h2, h3' },
			// Exclude sensitive elements entirely
			{ rule: 'exclude', selector: '.sensitive-data' },
			// Override previous rules for specific cases
			{ rule: 'mask', selector: '.public-content .private-info' },
		],
	},

	// Export options
	exporter: {
		otlp: true, // Use OTLP instead of Zipkin
		onAttributesSerializing: (attributes, span) => {
			// Remove or hash sensitive data
			if (attributes['http.url']) {
				attributes['http.url'] = sanitizeUrl(attributes['http.url'])
			}
			return attributes
		},
	},

	// Instrumentation control
	instrumentations: {
		// Core instrumentations (enabled by default)
		document: true,
		errors: true,
		fetch: true,
		frustrationSignals: {
			rageClick: { count: 4 },
			deadClick: true, // Enabled by default
			errorClick: true, // Enabled by default
			thrashedCursor: true, // Enabled by default
		},
		interactions: true,
		loaf: false, // Opt-in: disabled by default
		longtask: true,
		postload: true,
		webvitals: true,
		xhr: true,

		// Optional instrumentations (disabled by default)
		blockingElement: false,
		connectivity: false,
		socketio: false,
		visibility: false,
		websocket: false,
	},

	// Development
	debug: process.env.NODE_ENV !== 'production',
})

📚 API Reference

SplunkRum Class

Static Methods

| Method | Parameters | Returns | Description | | ---------------------------- | ----------------- | -------- | -------------------------- | | init(config) | SplunkRumConfig | void | Initialize the RUM SDK | | setGlobalAttributes(attrs) | Attributes | void | Add global span attributes | | getSessionId() | - | string | Get current session ID |

Properties

| Property | Type | Description | | ---------- | ---------------- | ----------------------------- | | provider | TracerProvider | OpenTelemetry tracer provider |

🛠️ Troubleshooting

For troubleshooting issues with the Splunk Distribution of OpenTelemetry JS for Web, see Troubleshoot browser instrumentation for Splunk Observability Cloud in the official documentation.

📜 License

Licensed under the Apache License, Version 2.0. See LICENSE for the full license text.


ℹ️  SignalFx was acquired by Splunk in October 2019. See Splunk SignalFx for more information.