chore: use libdatadog's trace filter implementation#3986
Conversation
5be0f9c to
64c0891
Compare
There was a problem hiding this comment.
Pull request overview
This PR replaces the project’s custom trace-filtering logic with libdatadog’s TraceFilterer implementation to better match agent behavior, and updates the C/Rust FFI surface accordingly.
Changes:
- Swap
components-rs/trace_filter.rsfrom an in-tree regex/tag filter implementation tolibdd_trace_utils::trace_filter::TraceFilterer. - Remove the slow-path meta-iterator callback from the FFI API and update call sites and headers.
- Update agent-info config plumbing to pass the filter lists into the concentrator config application.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tracer/trace_filter.c | Updates the C-side call into ddog_check_stats_trace_filter to the new signature (no iterator). |
| components-rs/trace_filter.rs | Replaces custom filter compilation/evaluation with TraceFilterer and adapts the span lookup interface. |
| components-rs/datadog.h | Updates the exported C header signature/documentation for ddog_check_stats_trace_filter. |
| components-rs/common.h | Removes the no-longer-used meta-iteration callback typedefs from the public header. |
| components-rs/agent_info.rs | Adjusts how filter config fields are extracted and passed into apply_concentrator_config. |
| Cargo.lock | Adds a new Rust dependency entry related to trace normalization. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Benchmarks [ tracer ]Benchmark execution time: 2026-06-17 12:26:08 Comparing candidate commit 2854817 in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 192 metrics, 1 unstable metrics.
|
f2f8524 to
5e87040
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This reverts commit 765bf5c.
4b5f179 to
2854817
Compare
Description
Removes the current trace filter implementation and use libdatadog's implementation instead which more closely matches the agent's behavior.
I still have to figure out the resource normalization stuff (implies writing some C...)DoneReviewer checklist