Skip to content

ekump/APMSP-1805 lazily init cadence client #890

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions LICENSE-3rdparty.yml

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions crashtracker-ffi/src/collector/spans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub unsafe extern "C" fn ddog_crasht_clear_trace_ids() -> VoidResult {
/// No safety concerns.
pub unsafe extern "C" fn ddog_crasht_insert_trace_id(id_high: u64, id_low: u64) -> Result<usize> {
wrap_with_ffi_result!({
let id: u128 = (id_high as u128) << 64 | (id_low as u128);
let id: u128 = ((id_high as u128) << 64) | (id_low as u128);
datadog_crashtracker::insert_trace(id)
})
}
Expand Down Expand Up @@ -86,7 +86,7 @@ pub unsafe extern "C" fn ddog_crasht_insert_trace_id(id_high: u64, id_low: u64)
/// No safety concerns.
pub unsafe extern "C" fn ddog_crasht_insert_span_id(id_high: u64, id_low: u64) -> Result<usize> {
wrap_with_ffi_result!({
let id: u128 = (id_high as u128) << 64 | (id_low as u128);
let id: u128 = ((id_high as u128) << 64) | (id_low as u128);
datadog_crashtracker::insert_span(id)
})
}
Expand Down Expand Up @@ -120,7 +120,7 @@ pub unsafe extern "C" fn ddog_crasht_remove_span_id(
idx: usize,
) -> VoidResult {
wrap_with_void_ffi_result!({
let id: u128 = (id_high as u128) << 64 | (id_low as u128);
let id: u128 = ((id_high as u128) << 64) | (id_low as u128);
datadog_crashtracker::remove_span(id, idx)?
})
}
Expand Down Expand Up @@ -154,7 +154,7 @@ pub unsafe extern "C" fn ddog_crasht_remove_trace_id(
idx: usize,
) -> VoidResult {
wrap_with_void_ffi_result!({
let id: u128 = (id_high as u128) << 64 | (id_low as u128);
let id: u128 = ((id_high as u128) << 64) | (id_low as u128);
datadog_crashtracker::remove_trace(id, idx)?
})
}
3 changes: 0 additions & 3 deletions data-pipeline/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ autobenches = false
[dependencies]
anyhow = { version = "1.0" }
arc-swap = "1.7.1"
futures = { version = "0.3", default-features = false }
hyper = {version = "0.14", features = ["client", "server", "runtime", "backports", "deprecated"], default-features = false}
log = "0.4"
rmp-serde = "1.1.1"
Expand All @@ -26,10 +25,8 @@ ddcommon = { path = "../ddcommon" }
ddtelemetry = { path = "../ddtelemetry" }
datadog-trace-protobuf = { path = "../trace-protobuf" }
datadog-trace-utils = { path = "../trace-utils" }
datadog-trace-normalization = { path = "../trace-normalization" }
datadog-ddsketch = { path = "../ddsketch"}
dogstatsd-client = { path = "../dogstatsd-client"}
datadog-trace-obfuscation = { path = "../trace-obfuscation" }
uuid = { version = "1.10.0", features = ["v4"] }
tokio-util = "0.7.11"
tinybytes = { path = "../tinybytes", features = ["bytes_string", "serialization"] }
Expand Down
6 changes: 3 additions & 3 deletions data-pipeline/src/trace_exporter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use ddcommon::header::{
};
use ddcommon::tag::Tag;
use ddcommon::{connector, tag, Endpoint};
use dogstatsd_client::{new_flusher, Client, DogStatsDAction};
use dogstatsd_client::{new, Client, DogStatsDAction};
use either::Either;
use hyper::body::HttpBody;
use hyper::http::uri::PathAndQuery;
Expand Down Expand Up @@ -921,8 +921,8 @@ impl TraceExporterBuilder {
.build()?;

let dogstatsd = self.dogstatsd_url.and_then(|u| {
new_flusher(Endpoint::from_slice(&u)).ok() // If we couldn't set the endpoint return
// None
new(Endpoint::from_slice(&u)).ok() // If we couldn't set the endpoint return
// None
});

let base_url = self.url.as_deref().unwrap_or(DEFAULT_AGENT_URL);
Expand Down
7 changes: 4 additions & 3 deletions dogstatsd-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ bench = false

[dependencies]
ddcommon = { path = "../ddcommon" }
datadog-trace-protobuf = { path = "../trace-protobuf" }
datadog-trace-normalization = { path = "../trace-normalization" }
datadog-ddsketch = { path = "../ddsketch"}
cadence = "1.3.0"
serde = { version = "1.0", features = ["derive", "rc"] }
tracing = { version = "0.1", default-features = false }
anyhow = { version = "1.0" }
http = "0.2"


[dev-dependencies]
tokio = {version = "1.23", features = ["rt", "time", "test-util", "rt-multi-thread"], default-features = false}
Loading
Loading