Skip to content

Commit 781968a

Browse files
authored
fix: indentation
indentation needs to alight with the beginning of the code block or it formats incorrectly. Also removed code identifiers for non-code codeblocks
1 parent 4c81e05 commit 781968a

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

src/content/docs/distributed-tracing/infinite-tracing-on-premise/bring-your-own-cache.mdx

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@ The processor supports any Redis-compatible cache implementation. It has been te
1919
For production deployments, we recommend using cluster mode (sharded) to ensure high availability and scalability. To enable distributed caching, add the `distributed_cache` configuration to your `tail_sampling` processor section:
2020

2121
```yaml
22-
tail_sampling:
23-
distributed_cache:
24-
connection:
25-
address: redis://localhost:6379/0
26-
password: 'local'
27-
trace_window_expiration: 30s # Default: how long to wait after last span before evaluating
28-
in_flight_timeout: 120s # Optional: defaults to trace_window_expiration if not set
29-
traces_ttl: 3600s # Optional: default 1 hour
30-
cache_ttl: 7200s # Optional: default 2 hours
31-
suffix: "itc" # Redis key prefix
32-
max_traces_per_batch: 500 # Default: traces processed per evaluation cycle
33-
evaluation_interval: 1s # Default: evaluation frequency
34-
evaluation_workers: 4 # Default: number of parallel workers (defaults to CPU count)
35-
data_compression:
36-
format: lz4 # Optional: compression format (none, snappy, zstd, lz4); lz4 recommended
22+
tail_sampling:
23+
distributed_cache:
24+
connection:
25+
address: redis://localhost:6379/0
26+
password: 'local'
27+
trace_window_expiration: 30s # Default: how long to wait after last span before evaluating
28+
in_flight_timeout: 120s # Optional: defaults to trace_window_expiration if not set
29+
traces_ttl: 3600s # Optional: default 1 hour
30+
cache_ttl: 7200s # Optional: default 2 hours
31+
suffix: "itc" # Redis key prefix
32+
max_traces_per_batch: 500 # Default: traces processed per evaluation cycle
33+
evaluation_interval: 1s # Default: evaluation frequency
34+
evaluation_workers: 4 # Default: number of parallel workers (defaults to CPU count)
35+
data_compression:
36+
format: lz4 # Optional: compression format (none, snappy, zstd, lz4); lz4 recommended
3737
```
3838
3939
<Callout variant="important">
@@ -43,16 +43,16 @@ For production deployments, we recommend using cluster mode (sharded) to ensure
4343
The `address` parameter must specify a valid Redis-compatible server address using the standard format:
4444

4545
```shell
46-
redis[s]://[[username][:password]@][host][:port][/db-number]
46+
[output] redis[s]://[[username][:password]@][host][:port][/db-number]
4747
```
4848

4949
Alternatively, you can embed credentials directly in the `address` parameter:
5050

5151
```yaml
52-
tail_sampling:
53-
distributed_cache:
54-
connection:
55-
address: redis://:yourpassword@localhost:6379/0
52+
tail_sampling:
53+
distributed_cache:
54+
connection:
55+
address: redis://:yourpassword@localhost:6379/0
5656
```
5757

5858
The processor is implemented in Go and uses the [go-redis](https://github.com/redis/go-redis/tree/v9) client library.
@@ -114,8 +114,8 @@ Proper Redis instance sizing is critical for optimal performance. Use the config
114114

115115
### Memory estimation formula
116116

117-
```shell
118-
Total Memory = (Trace Data) + (Decision Caches) + (Overhead)
117+
```
118+
Total Memory = (Trace Data) + (Decision Caches) + (Overhead)
119119
```
120120
121121
#### 1. Trace data storage
@@ -133,13 +133,13 @@ Trace data is stored in Redis for the full `traces_ttl` period to support late-a
133133
134134
**Example calculation**: At 10,000 spans/second with 1-hour `traces_ttl`:
135135
136-
```shell
136+
```
137137
10,000 spans/sec × 3600 sec × 900 bytes = 32.4 GB
138138
```
139139
140140
**With lz4 compression** (we have observed 25% reduction):
141141
142-
```shell
142+
```
143143
32.4 GB × 0.75 = 24.3 GB
144144
```
145145
@@ -164,7 +164,7 @@ When using `distributed_cache`, the decision caches are stored in Redis without
164164
165165
**Example calculation**: 500 traces per batch (default) with 20 spans per trace on average:
166166
167-
```shell
167+
```
168168
500 × 20 × 900 bytes = 9 MB per batch
169169
```
170170
@@ -247,4 +247,4 @@ The processor uses a cascading TTL structure, with each level providing protecti
247247
4. **`cache_ttl`** (default: 2 hours)
248248
- Redis key expiration for decision cache entries (sampled/non-sampled)
249249
- Prevents duplicate evaluation for late-arriving spans
250-
- Defined via `distributed_cache.cache_ttl`
250+
- Defined via `distributed_cache.cache_ttl`

0 commit comments

Comments
 (0)