@splunk/otel-web-session-recorder
Version:
Session recorder for Splunk Observability
57 lines (56 loc) • 2.06 kB
TypeScript
/**
*
* Copyright 2020-2025 Splunk Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
import { RecorderPublicConfig } from './session-replay';
export type SplunkRumRecorderConfig = {
/** Destination for the captured data */
beaconEndpoint?: string;
/** Debug mode */
debug?: boolean;
/**
* Enables persistence of session replay data when upload requests fail.
*
* When enabled, session replay chunks that fail to upload (due to network issues,
* server errors, or browser issues) are automatically stored in local browser storage
* and retried on subsequent page loads.
*
* This feature helps prevent data loss and ensures comprehensive session coverage
* even in unreliable network conditions. The queue is automatically managed and
* cleaned up after successful uploads.
*
* Storage: Currently the data is stored in localStorage.
* @default true
*/
persistFailedReplayData?: boolean;
/**
* The name of your organization’s realm. Automatically configures beaconUrl with correct URL
*/
realm?: string;
/**
* RUM authorization token for data sending. Please make sure this is a token
* with only RUM scope as it's visible to every user of your app
**/
rumAccessToken?: string;
} & RecorderPublicConfig;
declare const SplunkRumRecorder: {
deinit(): void;
init(config: SplunkRumRecorderConfig): void;
readonly inited: boolean;
resume(): void;
stop(): void;
};
export default SplunkRumRecorder;