Vector
Vector is the log ingestion and transformation component in LogWise. It receives logs from OpenTelemetry collectors, transforms them, and forwards them to Kafka for downstream processing.
Overview
Vector handles log ingestion via OTLP (OpenTelemetry Protocol), validates and normalizes log data, and routes logs to Kafka topics organized by service.
Architecture in LogWise
OpenTelemetry Collector → Vector → Kafka → Spark JobsVector handles:
- Ingestion: Receives OTLP logs via gRPC (4317) and HTTP (4318)
- Transformation: Validates, normalizes, and enriches log data
- Routing: Publishes logs to Kafka topics organized by service
Key Features
- OTLP ingestion - Receives logs via HTTP (4318) and gRPC (4317)
- Transformation - Validates, normalizes, and enriches log data
- Dynamic routing - Publishes logs to Kafka topics based on metadata tags
- Protobuf encoding - Optimized network usage with compression (requires Vector v0.45.0+)
Topic Routing
Vector automatically creates Kafka topics using the naming convention: logs.{service_name} based on log metadata tags.
Example: logs.order-service
Configuration
Key configuration points in vector.yaml:
bootstrap_servers- Kafka broker addresstopic- Dynamic topic routing based on log metadataencoding.codec- Set toprotobuf(requires Vector v0.45.0+) to optimize network usagecompression- Set tozstd- optimal compression algorithm for protobuf datalinger.ms- Set to100- batches logs for up to 100ms before sending to improve throughputbatch.size- Set to2500000bytes (~2.5 MB) - sends batch when size limit is reached
Note: gRPC endpoint (4317) is a required configuration in Vector but not actively used in the LogWise setup. All logs are sent via HTTP (4318).
Common Issues
Protobuf Codec Not Recognized:
- Error:
Unknown encoding codec: protobuf - Solution: Vector v0.45.0+ required for Protobuf support. Upgrade Vector or use JSON codec as workaround.
Kafka Connection Failures:
- Common cause: Kafka's
advertised.listenersmisconfigured - Kafka must advertise its reachable hostname/IP, not localhost
- Verify
bootstrap_serversinvector.yamlmatches Kafka's network address
Integration with Other Components
- OpenTelemetry Collector - Receives logs via OTLP HTTP
- Kafka - Publishes transformed logs to topics
Requirements and Setup
See the Vector Setup Guide for installation and configuration.
