/** * * 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 { ExportResult } from '@opentelemetry/core'; import { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base'; import { type SplunkExporterConfig } from './common'; export interface ZipkinAnnotation { timestamp: number; value: string; } export interface ZipkinEndpoint { ipv4?: string; port?: number; serviceName?: string; } export interface ZipkinTags { [tagKey: string]: unknown; } export interface ZipkinSpan { annotations?: ZipkinAnnotation[]; debug?: boolean; duration: number; id: string; kind?: 'CLIENT' | 'SERVER' | 'CONSUMER' | 'PRODUCER'; localEndpoint?: ZipkinEndpoint; name: string; parentId?: string; shared?: boolean; tags: ZipkinTags; timestamp: number; traceId: string; } /** * SplunkExporter is based on Zipkin V2. It includes Splunk-specific modifications. */ export declare class SplunkZipkinExporter implements SpanExporter { readonly beaconUrl: string; private readonly _beaconSender; private readonly _onAttributesSerializing; private readonly _xhrSender; constructor({ beaconSender, onAttributesSerializing, url, xhrSender, }: SplunkExporterConfig); export(spans: ReadableSpan[], resultCallback: (result: ExportResult) => void): void; shutdown(): Promise; private _mapToZipkinSpan; private _postTranslateSpan; private _preTranslateSpan; }