Repository navigation
chore(metrics): extract pure metric processing kernels into saluki-transform-kernels - #3427
Conversation
Binary Size Analysis (Agent Data Plane)Baseline: 76fda64 · Comparison: 19f12a3 · diff ✅ Binary size difference within thresholdChanges by Module
Detailed Symbol Changes |
Regression Detector (Agent Data Plane)Run ID: Optimization Goals: ✅ No significant changes detectedFine details of change detection per experiment (5)Experiments configured
Bounds Checks: ✅ Passed (5)
ExplanationA change is flagged as a regression when |Δ mean %| > 5.00% in the regressing direction for its optimization goal AND SMP marks the experiment as a regression ( |
There was a problem hiding this comment.
More details
Validation is limited to static analysis of the metric-kernel extraction; runtime tests were not run, and production telemetry was excluded as requested.
🤖 Bits Code Review · Commit 95f135f
68bca9f to
e8e6d6d
Compare
There was a problem hiding this comment.
More details
The completed static review identified no concrete failure mode in the extracted metric kernels or their component wrappers. Runtime behavior was not exercised.
🤖 Bits Code Review · Commit e8e6d6d
e8e6d6d to
05ec4b1
Compare
There was a problem hiding this comment.
More details
Validation is limited to static analysis of the metric-kernel extraction and its callers; runtime tests were not run, and production telemetry was excluded.
🤖 Bits Code Review · Commit 05ec4b1
05ec4b1 to
86a3bac
Compare
4518b03 to
ce306ec
Compare
saluki-transform-kernels
There was a problem hiding this comment.
More details
Runtime equivalence remains unverified by execution: tests were not rerun, and production telemetry was intentionally excluded.
🤖 Bits Code Review · Commit ce306ec
ce306ec to
21bb793
Compare
There was a problem hiding this comment.
More details
Behavior preservation was assessed from source only; builds and tests were not independently rerun, and production telemetry was excluded.
🤖 Bits Code Review · Commit 21bb793
…istogram config, and filterlist kernels
…over allowlist kernels
21bb793 to
19f12a3
Compare
There was a problem hiding this comment.
More details
The completed static reviewer reported no actionable defects. Validation is limited to code inspection; builds and tests were not run.
🤖 Bits Code Review · Commit 19f12a3
…ransform-kernels` (#3427) Peels off Phase 1 from #3424 as a purely mechanical, zero-behavior-change extraction. Extracts deterministic, zero-async transformation domain logic into a new `lib/saluki-transform-kernels` crate (named to avoid overlap with `saluki-metrics` and accommodate future non-metrics transformation kernels) and delegates the existing components in `lib/saluki-components` and `bin/agent-data-plane/src/components/` as thin wrappers: 1. `metric_name`, `histogram`, and `filterlist` (`Blocklist`, `PrefixFilterKernel`, `PostAggregateFilterKernel`) 2. `routing_filter` (`MetricAllowlistKernel`, `MetricMirroring`, `compact_metric_prefixes`) 3. `timestamp_split` and `host_tags` (`HostTagsKernel`) 4. `tag_filter` (`TagFilterKernel`) 5. `mapper` (`MapperKernel`) 6. `aggregate` (`AggregateCore<M>`, `extract_closed_values`, `expand_flushed_metric`) Verified with `cargo check --workspace --tests`, `cargo clippy --workspace --all-targets -- -D warnings`, `make check-unused-deps`, `saluki-transform-kernels` unit tests, `architecture-tests`, and end-to-end Panoramic suites (via #3424). Co-authored-by: luke.steensen <luke.steensen@datadoghq.com> 6c8f2e2
…hind `FlushCursor` (#3641) ## Summary `AggregateCore` in `saluki-transform-kernels` currently exposes `contexts_and_remove_buf_mut`, `pending_removals`, `AggregatedMetric`, `FlushWindow`, `extract_closed_values`, and `expand_flushed_metric` so `AggregateState::flush` can iterate the internal `HashMap` directly across `dispatcher.push(...).await`. This follow-up PR encapsulates the internal storage and flush mechanics behind an opaque `FlushCursor` API: - Add `AggregateCore::begin_flush`, `AggregateCore::flush_chunk`, and `AggregateCore::finish_flush`. - Add `AggregateCore::entry_size_bytes()` so callers account for memory bounds without depending on `AggregatedMetric`. - Keep `AggregatedMetric`, `FlushWindow`, `extract_closed_values`, and `expand_flushed_metric` private inside `saluki-transform-kernels::aggregate`. - Re-check emptiness in `finish_flush` before removing pending contexts so samples inserted between flush chunks are never dropped. - Update `lib/saluki-components/src/transforms/aggregate/mod.rs` to drive flushes in bounded 1,024-context chunks and drop the mutable borrow on `AggregateCore` before awaiting downstream dispatch. This keeps #3427 strictly mechanical while giving future dense aggregate storage (#3496) and interleaved resumable flushes (#3499) a clean crate boundary. ## Change Type - [ ] Bug fix - [ ] New feature - [x] Non-functional - [ ] Performance ## How did you test this PR? - `cargo check --workspace --tests` - `cargo clippy -p saluki-transform-kernels -p saluki-components --all-targets -- -D warnings` - `cargo nextest run -p saluki-transform-kernels` (34/34 passed, including `chunked_flush_cursor_matches_full_flush_and_preserves_interleaved_inserts`) - `cargo nextest run -p saluki-components -E 'test(transforms::aggregate)'` (41/41 passed) - `make fmt` ## References - Stacked on: #3427 (`programmable-phase1-metric-kernels`) - Required by: #3424 (`programmable-exploration`) Co-authored-by: luke.steensen <luke.steensen@datadoghq.com>
Peels off Phase 1 from #3424 as a purely mechanical, zero-behavior-change extraction.
Extracts deterministic, zero-async transformation domain logic into a new
lib/saluki-transform-kernelscrate (named to avoid overlap withsaluki-metricsand accommodate future non-metrics transformation kernels) and delegates the existing components inlib/saluki-componentsandbin/agent-data-plane/src/components/as thin wrappers:metric_name,histogram, andfilterlist(Blocklist,PrefixFilterKernel,PostAggregateFilterKernel)routing_filter(MetricAllowlistKernel,MetricMirroring,compact_metric_prefixes)timestamp_splitandhost_tags(HostTagsKernel)tag_filter(TagFilterKernel)mapper(MapperKernel)aggregate(AggregateCore<M>,extract_closed_values,expand_flushed_metric)Verified with
cargo check --workspace --tests,cargo clippy --workspace --all-targets -- -D warnings,make check-unused-deps,saluki-transform-kernelsunit tests,architecture-tests, and end-to-end Panoramic suites (via #3424).