Skip to content

Commit

Permalink
Merge branch 'main' into vianney/add-generic-span
Browse files Browse the repository at this point in the history
  • Loading branch information
VianneyRuhlmann authored Feb 21, 2025
2 parents 3158662 + 1f16a44 commit e2a56ee
Show file tree
Hide file tree
Showing 13 changed files with 262 additions and 193 deletions.
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

0 comments on commit e2a56ee

Please sign in to comment.