You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/design/elasticsearch-data-streams.md
+81-27Lines changed: 81 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,28 +21,94 @@ This prefixing strategy prevents legacy wildcard queries like `jaeger-span-*` fr
21
21
22
22
### Index Templates
23
23
Data stream-specific index templates are provided in `internal/storage/v1/elasticsearch/mappings/`:
24
-
-`jaeger-ds-span-8.json`
25
-
-`jaeger-ds-service-8.json`
26
-
-`jaeger-ds-sampling-8.json`
27
-
-`jaeger-ds-dependencies-8.json`
24
+
-`jaeger-span-8.json` (merged with standard template)
25
+
-`jaeger-service-8.json`
26
+
-`jaeger-sampling-8.json`
27
+
-`jaeger-dependencies-8.json`
28
28
29
29
These templates include the `data_stream: {}` field and specify a default ingest pipeline for timestamp normalization (e.g., `jaeger-ds-span-timestamp`).
30
30
31
31
### Storage Logic
32
32
The storage stores (Span, Sampling, Dependency) are updated to:
33
-
1.**Write** to the data stream name when `UseDataStream` is enabled.
34
-
2.**Read** from both the data stream and the legacy wildcard patterns to ensure data visibility during the migration period.
33
+
1.**Write** to the data stream name when `ES Version >= 8`.
34
+
2.**Read** behavior is controlled by the `jaeger.es.readLegacyWithDataStream` feature gate:
35
+
- When **enabled** (default during migration): Queries both data streams and legacy indices (e.g., `["jaeger-ds-span", "jaeger-span-*"]`)
36
+
- When **disabled**: Queries only data streams (e.g., `["jaeger-ds-span"]`)
37
+
38
+
This feature gate allows operators to safely migrate from legacy indices to data streams and disable dual reads once migration is complete.
35
39
36
40
## Migration Strategy
37
41
Jaeger supports a seamless migration from traditional indices to data streams:
38
-
-**Phase 1**: Enable `UseDataStream`. Jaeger will start writing to the new `jaeger-ds-*` data streams.
39
-
-**Phase 2**: During read operations, Jaeger queries both the new data streams and the legacy indices.
40
-
-**Phase 3**: Once legacy indices are aged out and deleted, only data streams will be used.
42
+
-**Phase 1**: Enable Data Streams (Default for ES 8+). Jaeger will start writing to the new `jaeger-ds-*` data streams.
43
+
-**Phase 2**: During read operations, the `jaeger.es.readLegacyWithDataStream` feature gate (enabled by default) ensures Jaeger queries both the new data streams and the legacy indices.
44
+
-**Phase 3**: Once legacy indices are aged out and deleted, disable the feature gate to query only data streams:
0 commit comments