feat(dogstatsd)!: add shared_runtime buffered sink#2224
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
📚 Documentation Check Results📦
|
Clippy Allow Annotation ReportComparing clippy allow annotations between branches:
Summary by Rule
Annotation Counts by File
Annotation Stats by Crate
About This ReportThis 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. |
🔒 Cargo Deny Results📦
|
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: b3d9cd0 | Docs | Datadog PR Page | Give us feedback! |
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
8eb7bc6 to
fed7da4
Compare
597364e to
b905f96
Compare
fed7da4 to
7bafd9b
Compare
b905f96 to
30d94f8
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7bafd9bcfa
ℹ️ 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".
| tracing = { version = "0.1", default-features = false } | ||
| anyhow = { version = "1.0" } | ||
| http = "1.1" | ||
| libdd-shared-runtime = { version = "2.0.0", path = "../libdd-shared-runtime", optional = true } |
There was a problem hiding this comment.
Preserve FIPS feature wiring for shared runtime
With this optional dependency using default features, enabling shared-runtime also enables libdd-shared-runtime's default https feature, and libdd-dogstatsd-client's fips feature only reaches its direct libdd-common dependency. In a --no-default-features --features shared-runtime,fips build this pulls the shared runtime's non-FIPS HTTPS stack instead of propagating libdd-shared-runtime/fips, unlike the other crates in this workspace that depend on the shared runtime with default-features = false and wire both https and fips through.
Useful? React with 👍 / 👎.
BenchmarksComparisonBenchmark execution time: 2026-07-13 14:35:41 Comparing candidate commit b3d9cd0 in PR branch Found 0 performance improvements and 7 performance regressions! Performance is the same for 135 metrics, 0 unstable metrics.
|
7bafd9b to
8f5b1cf
Compare
0e35cfd to
59810b1
Compare
30d94f8 to
395fb45
Compare
59810b1 to
b3d9cd0
Compare

What does this PR do?
Provide a SharedRuntime based buffered sink. The current
QueuingMetricSinkspawns a thread which isn't forksafe. This provides an alternative that can be used in forking context.Motivation
Currently the dogstatsd client doesn't survive a fork and all metrics submitted after the fork are never sent.
Additional Notes
Anything else we should know when reviewing?
How to test the change?
Describe here in detail how the change can be validated.