Skip to content

feat!: added regex-lite feature#1939

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 4 commits into
mainfrom
jwiriath/conditional-regex-lite
May 6, 2026
Merged

feat!: added regex-lite feature#1939
gh-worker-dd-mergequeue-cf854d[bot] merged 4 commits into
mainfrom
jwiriath/conditional-regex-lite

Conversation

@Aaalibaba42
Copy link
Copy Markdown
Contributor

What does this PR do?

added regex-lite feature and changed code path to use libdd-common provided regex engine, which changes based on the feature.

Motivation

Improve binary size at the cost of performance.

Additional Notes

There is 1 place in tests in which we use regex crate directly, it's a dev dependancy, shouldn't be a problem.

How to test the change?

cargo metadata to make sure we don't have regex with the feature, look at binary size etc.

@Aaalibaba42 Aaalibaba42 requested review from a team as code owners April 30, 2026 15:51
@Aaalibaba42 Aaalibaba42 requested review from leoromanovsky and typotter and removed request for a team April 30, 2026 15:51
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 30, 2026

Clippy Allow Annotation Report

Comparing clippy allow annotations between branches:

  • Base Branch: origin/main
  • PR Branch: origin/jwiriath/conditional-regex-lite

Summary by Rule

Rule Base Branch PR Branch Change
unwrap_used 14 14 No change (0%)
Total 14 14 No change (0%)

Annotation Counts by File

File Base Branch PR Branch Change
datadog-live-debugger/src/redacted_names.rs 2 2 No change (0%)
libdd-common/src/azure_app_services.rs 1 1 No change (0%)
libdd-common/src/entity_id/unix/container_id.rs 3 3 No change (0%)
libdd-common/src/lib.rs 3 3 No change (0%)
libdd-data-pipeline/src/telemetry/mod.rs 1 1 No change (0%)
libdd-trace-obfuscation/src/ip_address.rs 3 3 No change (0%)
libdd-trace-obfuscation/src/replacer.rs 1 1 No change (0%)

Annotation Stats by Crate

Crate Base Branch PR Branch Change
clippy-annotation-reporter 5 5 No change (0%)
datadog-ffe-ffi 1 1 No change (0%)
datadog-ipc 21 21 No change (0%)
datadog-live-debugger 6 6 No change (0%)
datadog-live-debugger-ffi 10 10 No change (0%)
datadog-profiling-replayer 4 4 No change (0%)
datadog-remote-config 3 3 No change (0%)
datadog-sidecar 57 57 No change (0%)
libdd-common 10 10 No change (0%)
libdd-common-ffi 12 12 No change (0%)
libdd-data-pipeline 5 5 No change (0%)
libdd-ddsketch 2 2 No change (0%)
libdd-dogstatsd-client 1 1 No change (0%)
libdd-profiling 13 13 No change (0%)
libdd-telemetry 20 19 ✅ -1 (-5.0%)
libdd-tinybytes 4 4 No change (0%)
libdd-trace-normalization 2 2 No change (0%)
libdd-trace-obfuscation 8 8 No change (0%)
libdd-trace-stats 1 1 No change (0%)
libdd-trace-utils 15 15 No change (0%)
Total 200 199 ✅ -1 (-0.5%)

About This Report

This report tracks Clippy allow annotations for specific rules, showing how they've changed in this PR. Decreasing the number of these annotations generally improves code quality.

Comment thread libdd-data-pipeline/src/telemetry/mod.rs
Comment thread libdd-trace-obfuscation/src/replacer.rs Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a8a6255c3b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread libdd-common/Cargo.toml
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 30, 2026

Codecov Report

❌ Patch coverage is 95.23810% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 71.73%. Comparing base (43c0973) to head (0b6f61c).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1939      +/-   ##
==========================================
- Coverage   71.73%   71.73%   -0.01%     
==========================================
  Files         434      434              
  Lines       70395    70454      +59     
==========================================
+ Hits        50497    50538      +41     
- Misses      19898    19916      +18     
Components Coverage Δ
libdd-crashtracker 65.97% <ø> (-0.05%) ⬇️
libdd-crashtracker-ffi 34.09% <ø> (-0.39%) ⬇️
libdd-alloc 98.77% <ø> (ø)
libdd-data-pipeline 85.96% <ø> (+0.09%) ⬆️
libdd-data-pipeline-ffi 72.32% <ø> (+0.53%) ⬆️
libdd-common 79.58% <ø> (+0.20%) ⬆️
libdd-common-ffi 73.87% <ø> (ø)
libdd-telemetry 69.29% <ø> (+1.20%) ⬆️
libdd-telemetry-ffi 19.37% <ø> (ø)
libdd-dogstatsd-client 82.64% <ø> (ø)
datadog-ipc 74.75% <ø> (-1.56%) ⬇️
libdd-profiling 81.61% <ø> (ø)
libdd-profiling-ffi 64.36% <ø> (ø)
datadog-sidecar 28.96% <ø> (+0.03%) ⬆️
datdog-sidecar-ffi 9.01% <ø> (+0.22%) ⬆️
spawn-worker 54.69% <ø> (ø)
libdd-tinybytes 93.16% <ø> (ø)
libdd-trace-normalization 81.71% <ø> (ø)
libdd-trace-obfuscation 87.26% <100.00%> (ø)
libdd-trace-protobuf 68.25% <ø> (ø)
libdd-trace-utils 89.27% <ø> (-0.12%) ⬇️
libdd-tracer-flare 86.88% <ø> (ø)
libdd-log 74.83% <100.00%> (+0.13%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@datadog-prod-us1-5
Copy link
Copy Markdown

datadog-prod-us1-5 Bot commented Apr 30, 2026

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 95.24%
Overall Coverage: 71.73% (+0.02%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 0b6f61c | Docs | Datadog PR Page | Give us feedback!

@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented Apr 30, 2026

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 83.42 MB 81.00 MB --2.91% (-2.42 MB) 💪
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 7.63 MB 7.45 MB --2.45% (-192.00 KB) 💪
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.17 MB 9.93 MB --2.36% (-246.05 KB) 💪
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 99.54 MB 96.93 MB --2.62% (-2.61 MB) 💪
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 25.25 MB 24.37 MB --3.45% (-894.00 KB) 💪
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 79.90 KB 79.90 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 184.76 MB 178.55 MB --3.36% (-6.21 MB) 💪
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 919.45 MB 903.45 MB --1.74% (-16.00 MB) 💪
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 7.90 MB 7.70 MB --2.53% (-205.00 KB) 💪
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 79.90 KB 79.90 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 23.70 MB 23.07 MB --2.66% (-648.00 KB) 💪
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 46.23 MB 45.17 MB --2.30% (-1.06 MB) 💪
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 21.72 MB 20.94 MB --3.57% (-795.50 KB) 💪
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 81.14 KB 81.14 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 188.94 MB 182.52 MB --3.39% (-6.41 MB) 💪
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 905.15 MB 889.31 MB --1.74% (-15.83 MB) 💪
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 6.14 MB 5.97 MB --2.82% (-177.50 KB) 💪
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 81.14 KB 81.14 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 25.39 MB 24.69 MB --2.73% (-712.00 KB) 💪
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 43.72 MB 42.67 MB --2.41% (-1.05 MB) 💪
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 74.36 MB 72.31 MB --2.75% (-2.04 MB) 💪
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 8.56 MB 8.36 MB --2.28% (-200.01 KB) 💪
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 91.90 MB 89.79 MB --2.29% (-2.11 MB) 💪
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.21 MB 9.98 MB --2.23% (-234.00 KB) 💪

@typotter typotter requested review from dd-oleksii and removed request for typotter April 30, 2026 16:45
Comment thread datadog-ffe/src/rules_based/ufc/models.rs
@Aaalibaba42 Aaalibaba42 force-pushed the jwiriath/conditional-regex-lite branch 2 times, most recently from 2691365 to 3524857 Compare May 4, 2026 12:00
@Aaalibaba42 Aaalibaba42 requested a review from dd-oleksii May 4, 2026 12:05
@Aaalibaba42 Aaalibaba42 force-pushed the jwiriath/conditional-regex-lite branch 2 times, most recently from d68ac17 to 008d103 Compare May 4, 2026 12:57
@Aaalibaba42 Aaalibaba42 requested a review from a team as a code owner May 4, 2026 12:57
@Aaalibaba42 Aaalibaba42 removed the request for review from a team May 4, 2026 12:57
…mon provided regex engine, which changes based on the feature

chore: use shorthand and format

fix: exclude datadog-ffe from this change.

feat: remove env_filter and regex-automata

docs: remove misleading doc
@Aaalibaba42 Aaalibaba42 force-pushed the jwiriath/conditional-regex-lite branch from cb43b8c to 9e850dc Compare May 4, 2026 16:34
Copy link
Copy Markdown
Member

@dd-oleksii dd-oleksii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see my previous review

Comment thread datadog-ffe/Cargo.toml Outdated
Comment thread datadog-ffe/Cargo.toml Outdated
Comment thread libdd-common/Cargo.toml
@dd-oleksii dd-oleksii dismissed their stale review May 5, 2026 13:17

feedback has been addressed

Copy link
Copy Markdown
Contributor

@VianneyRuhlmann VianneyRuhlmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few nits but LGTM

Comment thread libdd-log/src/logger.rs
@@ -4,10 +4,10 @@
use crate::writers::{FileWriter, StdWriter};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these changes linked to the regex changes ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we needed to move out of EnvFilter to remove regex from transitive dependancies.

Comment thread libdd-log/Cargo.toml
[dependencies]
tracing = { version = "0.1", default-features = false, features = ["std"] }
tracing-subscriber = { version = "0.3.22", default-features = false, features = ["json", "env-filter"] }
tracing-subscriber = { version = "0.3.22", default-features = false, features = ["json"] }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this linked to the regex changes ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, tracing subscriber used regex automata which depended on regex

@Aaalibaba42
Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351
Copy link
Copy Markdown

gh-worker-devflow-routing-ef8351 Bot commented May 6, 2026

View all feedbacks in Devflow UI.

2026-05-06 11:44:21 UTC ℹ️ Start processing command /merge


2026-05-06 11:44:25 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in main is approximately 49m (p90).


2026-05-06 12:24:16 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit 58b86d5 into main May 6, 2026
95 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot deleted the jwiriath/conditional-regex-lite branch May 6, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants