/** * * Copyright 2020-2026 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 { Attributes } from '@opentelemetry/api'; import { Resource } from '@opentelemetry/resources'; import { AlwaysOffSampler, AlwaysOnSampler, BufferConfig, ParentBasedSampler, SpanExporter, SpanProcessor } from '@opentelemetry/sdk-trace-base'; import { SplunkOtelWebEventTarget } from './event-target'; import { type SplunkExporterConfig } from './exporters/common'; import { UserInteractionEventsConfig } from './instrumentations'; import { SessionBasedSampler } from './session-based-sampler'; import { SpanAttributesProcessor, SpanEmitterProcessor } from './span-processors'; import { SplunkWebTracerProvider } from './splunk-web-tracer-provider'; import { SplunkOtelWebConfig, SplunkOtelWebExporterOptions, SplunkOtelWebOptionsInstrumentations, UserTrackingMode } from './types'; import { SpanContext } from './utils/attributes'; export { type SplunkExporterConfig } from './exporters/common'; export { SplunkZipkinExporter } from './exporters/zipkin'; export * from './session-based-sampler'; export * from './splunk-web-tracer-provider'; import { SessionManager, SessionState, UserManager } from './managers'; import { ExternalSessionMetadata } from './types/external-session-metadata'; interface SplunkOtelWebConfigInternal extends SplunkOtelWebConfig { adjustSessionStartToTimeOrigin: boolean; bufferSize?: number; bufferTimeout?: number; discardDataAfterInactivity: boolean; exporter: SplunkOtelWebExporterOptions & { factory: (config: SplunkExporterConfig & { otlp?: boolean; }) => SpanExporter; }; instrumentations: SplunkOtelWebOptionsInstrumentations; spaMetrics: NonNullable; spanProcessor: { factory: (exporter: SpanExporter, config: T) => SpanProcessor; }; } export declare const INSTRUMENTATIONS_ALL_DISABLED: SplunkOtelWebOptionsInstrumentations; export interface SplunkOtelWebType extends SplunkOtelWebEventTarget { AlwaysOffSampler: typeof AlwaysOffSampler; AlwaysOnSampler: typeof AlwaysOnSampler; DEFAULT_AUTO_INSTRUMENTED_EVENTS: UserInteractionEventsConfig; DEFAULT_AUTO_INSTRUMENTED_EVENT_NAMES: (keyof HTMLElementEventMap)[]; ParentBasedSampler: typeof ParentBasedSampler; SessionBasedSampler: typeof SessionBasedSampler; /** * Allows experimental options to be passed. No versioning guarantees are given for this method. */ _internalInit: (options: Partial) => void; _processedOptions: SplunkOtelWebConfigInternal | null; _processor?: SpanProcessor; _spanEmitter?: SpanEmitterProcessor; attributesProcessor?: SpanAttributesProcessor; deinit: (force?: boolean) => void; /** * True if library detected an automation framework and was disabled based on 'disableAutomationFrameworks' setting. */ disabledByAutomationFrameworkDetection?: boolean; /** * True if library detected a bot and was disabled based on 'disableBots' setting. */ disabledByBotDetection?: boolean; getAnonymousId: () => string | undefined; /** * This method provides access to computed, final value of global attributes, which are applied to all created spans. */ getGlobalAttributes: () => Attributes; /** * This method returns current session ID */ getSessionId: () => string | undefined; getSessionMetadata: () => ExternalSessionMetadata; getSessionState: () => SessionState | undefined; init: (options: SplunkOtelWebConfig) => void; readonly inited: boolean; provider?: SplunkWebTracerProvider; reportError: (error: string | Event | Error | ErrorEvent, context?: SpanContext) => Promise; resource?: Resource; sessionManager?: SessionManager; setGlobalAttributes: (attributes: Attributes) => void; setUserTrackingMode: (mode: UserTrackingMode) => void; userManager?: UserManager; /** * `userTrackingMode` available values: `'noTracking'` (default) | `'anonymousTracking'`. */ userTrackingMode: UserTrackingMode; } export declare const SplunkRum: SplunkOtelWebType; export default SplunkRum; export { type SplunkOtelWebConfig, type SplunkOtelWebExporterOptions } from './types';