🔧 Configuration for the collector.

Fine-tune your collector's behavior for optimal performance in your environment. Balance between real-time responsiveness and efficient resource usage.

const config: CollectorConfig = {
batchInterval: 30000, // 30 second batching
maxBatchSize: 1000, // Max 1000 items per batch
otlpMetricsEndpoint: "http://prometheus:9090/api/v1/otlp/v1/metrics",
otlpLogsEndpoint: "http://loki:3100/otlp/v1/logs",
otlpHeaders: {
"Authorization": "Bearer token123",
"X-Scope-OrgID": "tenant1"
},
protocol: "otel_telemetry",
counterStateTTL: 3600000, // 1 hour TTL
maxCounterStates: 10000 // Max 10k counter states
};
interface CollectorConfig {
    batchInterval: number;
    counterStateTTL?: number;
    maxBatchSize: number;
    maxCounterStates?: number;
    otlpHeaders?: Record<string, string>;
    otlpLogsEndpoint?: string;
    otlpMetricsEndpoint?: string;
    protocol: string;
}

Properties

batchInterval: number

Interval between batch processing in milliseconds

counterStateTTL?: number

Time to keep counter states before cleanup in milliseconds (default: 1 hour)

maxBatchSize: number

Maximum number of telemetry items per batch

maxCounterStates?: number

Maximum number of counter states to keep (default: 10000)

otlpHeaders?: Record<string, string>

HTTP headers to include with OTLP requests

otlpLogsEndpoint?: string

OTLP endpoint URL for logs (optional)

otlpMetricsEndpoint?: string

OTLP endpoint URL for metrics (optional)

protocol: string

Rednet protocol to listen on