Pipeline Overview
Plugin Traits
All plugins implement a base trait:Capture Plugin
- EbpfCapture: Linux eBPF-based capture
- TestGenerator: Synthetic events for testing
Decode Plugin
- HttpDecoder: SSL bytes → HTTP → AI events
- SystemDecoder: Process/file/network events
Enrich Plugin
- HostEnricher: Adds hostname, OS, architecture
- ProcessTreeEnricher: Builds parent-child relationships
Action Plugin
- RedactionPlugin: Masks sensitive data
Export Plugin
- JsonlExporter: File output
- WebSocketExporter: Real-time streaming
- OtlpExporter: OpenTelemetry Protocol
- KafkaExporter: Apache Kafka
- WebhookExporter: HTTP endpoints
Event Types
Raw Capture Events
OISP Events
Processing Flow
HTTP Decoder Details
The HTTP decoder is the most complex, handling:Request/Response Correlation
- HTTP request received → store in
pending_requests - HTTP response received → look up matching request by (pid, tid)
- Timeout cleanup: 10 seconds for non-streaming, 30 seconds for SSE
AI Provider Detection
Streaming Response Handling
OpenAI and Anthropic use different streaming formats:Trace Building
The trace builder groups related events:- Process hierarchy (ppid → pid)
- Request/response pairs (request_id)
- Time proximity (configurable window)
Extending the Pipeline
To add a custom plugin:Performance Considerations
- Bounded channels: Prevent memory exhaustion under load
- Priority decoders: HTTP checked before System (higher priority)
- Batched exports: OTLP and Kafka batch by count/time
- Async everything: Non-blocking I/O throughout