---
title: Redis
slug: telemetry-pipeline/redis
docTags: 
createdAt: 2025-04-21T00:53:17.522Z
---

## Redis Source

The **Redis source** collects observability data from **Redis** by consuming events stored in Redis data structures. It supports **logs, metrics, and traces** as output signals, enabling Redis to act as a lightweight ingestion or streaming layer within an observability pipeline.

This source operates as an **aggregator**, runs in **stateless mode**, and delivers data using **best-effort semantics**. Acknowledgements are not supported, making this source suitable for high-throughput, low-latency ingestion scenarios where occasional data loss is acceptable.

## Connection Settings

### url (required, string)

Defines the Redis endpoint to connect to.

- Must follow the format protocol://server\:port/db&#x20;
- Supported protocols:&#x20;
  - redis (unencrypted)&#x20;
  - rediss (TLS-enabled)&#x20;

**Operational note:**
&#x20;Use rediss for all non-local or production deployments to protect data in transit.

### key (required, string)

Specifies the Redis key from which events are consumed.

- Acts as the logical source of observability events.&#x20;
- The interpretation of the key depends on the configured Redis data type.&#x20;

### redis\_key (optional, string)

Adds the Redis key name as a field to each emitted event.

- Useful for identifying the origin key when consuming from multiple sources.&#x20;
- If not set, the key name is not included in the event payload.&#x20;

## Redis Data Type Configuration

### data\_type (optional, string enum)

Specifies the Redis data structure used for ingestion.

Supported values:

- **list** – Consume events from a Redis list.&#x20;
- **channel** – Consume events via Redis Pub/Sub.&#x20;

**Default:** list

**Operational note:**
&#x20;Use list for durability-oriented ingestion patterns. Use channel for real-time, ephemeral streaming where message persistence is not required.

### list (optional, object)

Configuration specific to the Redis list data type.

list.method (required, string enum)

Defines how events are removed from the list.

Supported values:

- **lpop** – Pop events from the head of the list.&#x20;
- **rpop** – Pop events from the tail of the list.&#x20;

**Operational note:**
&#x20;Ensure producers and consumers agree on list semantics to avoid unexpected ordering behavior.

## Decoding Settings

### decoding (optional, object)

Controls how raw bytes read from Redis are decoded into structured events.

Some decoders can automatically determine the resulting signal type (**logs, metrics, traces**).

### decoding.codec (optional, string enum)

Specifies the codec used to decode incoming data.

Supported values include:

- bytes&#x20;
- json&#x20;
- avro&#x20;
- gelf&#x20;
- influxdb&#x20;
- protobuf&#x20;
- syslog&#x20;
- otlp&#x20;
- native&#x20;
- native\_json&#x20;
- vrl&#x20;

**Default:** bytes

**Operational note:**
&#x20;Selecting a structured codec reduces downstream processing complexity and improves schema consistency.

Avro Decoding

Used when codec = avro.

- Requires an explicit Avro schema.&#x20;
- Optionally strips Confluent-style schema ID prefixes.&#x20;

**Operational note:**
&#x20;Only supported Avro types should be used to avoid decoding failures.

JSON / Native JSON / InfluxDB / Syslog / GELF

These codecs support a **lossy** mode.

- When enabled, invalid UTF-8 sequences are replaced with a replacement character.&#x20;
- Prevents decoding failures caused by malformed input.&#x20;

**Operational note:**
&#x20;Lossy decoding is recommended for untrusted or user-generated data sources.

Protobuf Decoding

Used when codec = protobuf.

- Supports descriptor-based decoding.&#x20;
- Can emit JSON-style field names if required.&#x20;

**Operational note:**
&#x20;Descriptor files must be kept in sync with producer schemas.

OTLP Decoding

Used when codec = otlp.

- Automatically detects logs, metrics, or traces.&#x20;
- Signal parsing order can be restricted for performance optimization.&#x20;

VRL Decoding

Used when codec = vrl.

- Executes a VRL program to transform raw bytes.&#x20;
- The final value of the . target becomes the decoded event.&#x20;

**Operational note:**
&#x20;Compilation errors or explicit abort calls result in decoding failures.

## Framing Settings

### framing (optional, object)

Defines how raw byte streams are split into individual events.

Framing is critical when events are concatenated, chunked, or length-prefixed.

### framing.method (optional, string enum)

Specifies the framing strategy.

Supported values:

- bytes&#x20;
- character\_delimited&#x20;
- newline\_delimited&#x20;
- chunked\_gelf&#x20;
- length\_delimited&#x20;
- varint\_length\_delimited&#x20;
- octet\_counting&#x20;

**Default:** bytes

### Character / Newline Delimited Framing

Splits events using a delimiter character.

- Optional maximum buffer length can be enforced to prevent unbounded memory usage.&#x20;

### Chunked GELF Framing

Reassembles multi-part GELF messages.

- Supports decompression.&#x20;
- Enforces limits on message size and pending messages.&#x20;

**Operational note:**
&#x20;Recommended limits should be set in high-throughput environments to prevent memory exhaustion.

### Length-Delimited & Varint Framing

Splits events using explicit length prefixes.

- Commonly used with binary or protobuf-based payloads.&#x20;
- Maximum frame length can be enforced.&#x20;

### Octet Counting

Implements RFC-compliant octet counting framing.

## Operational Considerations

- This source provides **best-effort delivery**; message loss is possible during failures.&#x20;
- Redis persistence and eviction policies directly impact data reliability.&#x20;
- High-throughput environments should carefully tune framing limits and decoding behavior.&#x20;
- Redis Pub/Sub (channel) does not provide replay or durability guarantees.
