Conversation
Signed-off-by: Yuri Shkuro <github@ysh.us>
There was a problem hiding this comment.
Pull request overview
Adds a new ADR documenting the existing Badger storage record layouts and standardizes the metadata header format across existing ADRs in docs/adr/.
Changes:
- Add ADR-005 describing Badger spanstore/samplingstore key/value layouts and query behavior.
- Update ADRs 001–004 to use a consistent header metadata format (
Status+Date). - Update the ADR index (
docs/adr/README.md) to reference ADR-005.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/adr/README.md | Adds ADR-005 to the ADR index list. |
| docs/adr/005-badger-storage-record-layouts.md | New ADR documenting Badger record formats, indexes, TTLs, and query execution. |
| docs/adr/004-migrating-coverage-gating-to-github-actions.md | Converts “Status” section to standardized metadata header and adds date. |
| docs/adr/003-lazy-storage-factory-initialization.md | Converts “Status” section to standardized metadata header and adds date. |
| docs/adr/002-mcp-server.md | Converts “Status” section to standardized metadata header and adds date. |
| docs/adr/001-cassandra-find-traces-duration.md | Updates status wording, converts to standardized metadata header, and adds date. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
|
|
||
| **Purpose**: enables finding trace IDs for a specific service + operation pair within a time range. | ||
|
|
||
| **Note**: because the service name and operation name are concatenated without a separator, a service named `"foo"` with operation `"bar"` produces the same prefix as a service named `"foobar"` with operation `""`. The reader guards against this ambiguity by checking that the full key prefix (up to the timestamp) matches exactly. |
|
|
||
| **Value**: JSON-encoded `[]*model.Throughput` | ||
|
|
||
| **No TTL**: sampling entries do not have an explicit expiry set via Badger's `ExpiresAt`. Cleanup relies on explicit deletion or Badger's value-log GC. |
|
|
||
| - **Not distributed**: Badger is a single-node store. It is not suitable for high-throughput or multi-instance deployments. | ||
| - **No spanKind in operations**: the operation name index does not encode span kind, so `GetOperations` returns operations without span kind information (tracked in [issue #1922](https://github.com/jaegertracing/jaeger/issues/1922)). | ||
| - **String concatenation without separators**: the absence of separators between service name, tag key, and tag value in composite index keys means that a suffix of one component can collide with a prefix of the next. The implementation handles this with exact-prefix length checks but it is a latent source of subtle bugs if the key format is extended. |
| **Purpose**: enables range scans over span duration. A duration query scans forward from `[0x84][minDuration]` to `[0x84][maxDuration]`, collecting trace IDs. The result is used as a hash-set filter (`hashOuter`) that is intersected with results from other indexes before final trace retrieval. | ||
|
|
||
| **Key design rationale**: by placing `duration` before `startTime`, all keys for a given duration value are contiguous in the sorted keyspace, making range scans efficient. The time range filter is applied as a secondary check during the scan. |
CI Summary ReportMetrics Comparison❌ 1 metric change(s) detected View changed metricsmetrics_snapshot_badger_v2
metrics_snapshot_cassandras_4.x_v004_v2_auto metrics_snapshot_cassandras_4.x_v004_v2_manual metrics_snapshot_cassandras_5.x_v004_v2_auto metrics_snapshot_cassandras_5.x_v004_v2_manual Code Coverage✅ Coverage 96.8% (baseline 96.8%) ➡️ View CI run | View publish logs |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8166 +/- ##
=======================================
Coverage 95.67% 95.67%
=======================================
Files 317 317
Lines 16746 16746
=======================================
Hits 16022 16022
Misses 571 571
Partials 153 153
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Uh oh!
There was an error while loading. Please reload this page.