@ogcio/o11y-sdk-node
Version:
Opentelemetry standard instrumentation SDK for NodeJS based project
23 lines (20 loc) • 625 B
text/typescript
import {
BatchLogRecordProcessor,
SimpleLogRecordProcessor,
} from "@opentelemetry/sdk-logs";
import { SDKCollectorMode } from "./index.js";
import { tracing } from "@opentelemetry/sdk-node";
export const LogRecordProcessorMap: Record<
SDKCollectorMode,
typeof SimpleLogRecordProcessor | typeof BatchLogRecordProcessor
> = {
single: SimpleLogRecordProcessor,
batch: BatchLogRecordProcessor,
};
export const SpanProcessorMap: Record<
SDKCollectorMode,
typeof tracing.SimpleSpanProcessor | typeof tracing.BatchSpanProcessor
> = {
single: tracing.SimpleSpanProcessor,
batch: tracing.BatchSpanProcessor,
};