Skip to content
Draft
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
665 changes: 240 additions & 425 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ homepage = "https://github.com/DataDog/serverless-components"
repository = "https://github.com/DataDog/serverless-components"

[workspace.dependencies]
libdd-common = { version = "5.2.0", default-features = false }
libdd-trace-obfuscation = { version = "6.0.0", default-features = false }
libdd-trace-utils = { version = "10.1.0", default-features = false }
libdd-common = { version = "9.0.0", default-features = false }
libdd-trace-obfuscation = { version = "11.0.0", default-features = false }
libdd-trace-utils = { version = "15.0.0", default-features = false }

[profile.release]
opt-level = "z"
Expand Down
44 changes: 13 additions & 31 deletions LICENSE-3rdparty.csv

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion crates/datadog-agent-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ serde = { version = "1.0", default-features = false, features = ["derive"] }
serde-aux = { version = "4.7", default-features = false }
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
tracing = { version = "0.1", default-features = false }
datadog-opentelemetry = { version = "0.5.2", default-features = false }
datadog-opentelemetry = { version = "0.5.4", default-features = false }
dogstatsd = { path = "../dogstatsd", default-features = false }
tokio = { version = "1.47", default-features = false, features = ["time"] }

Expand Down
2 changes: 1 addition & 1 deletion crates/datadog-logs-agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ hyper-util = { version = "0.1", features = ["tokio"] }
futures = { version = "0.3", default-features = false, features = ["alloc"] }
tokio = { version = "1.37.0", default-features = false, features = ["sync", "net"] }
tracing = { version = "0.1.40", default-features = false }
zstd = { version = "0.13.3", default-features = false }
zstd = { version = "0.14.3", default-features = false }

[dev-dependencies]
http = "1"
Expand Down
4 changes: 2 additions & 2 deletions crates/datadog-mock-intake/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ flate2 = { version = "1", default-features = false, features = ["rust_backend"]
http-body-util = "0.1"
hyper = { version = "1.6", features = ["http1", "server"] }
hyper-util = { version = "0.1", features = ["tokio"] }
libdd-trace-protobuf = "4.0.1"
libdd-trace-protobuf = "5.1.1"
prost = "0.14.1"
rmp-serde = { version = "1.3.1", default-features = false }
serde = { version = "1.0.145", features = ["derive"] }
serde_json = "1.0"
thiserror = { version = "1.0.58", default-features = false }
tokio = { version = "1", features = ["io-util", "macros", "net", "rt-multi-thread", "sync", "time"] }
zstd = { version = "0.13.3", default-features = false }
zstd = { version = "0.14.3", default-features = false }

[dev-dependencies]
reqwest = { version = "0.12.23", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion crates/datadog-serverless-compat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ tracing-subscriber = { version = "0.3", default-features = false, features = [
"env-filter",
"tracing-log",
] }
zstd = { version = "0.13.3", default-features = false }
zstd = { version = "0.14.3", default-features = false }

[dev-dependencies]
reqwest = { version = "0.12.4", features = ["json"], default-features = false }
Expand Down
10 changes: 5 additions & 5 deletions crates/datadog-trace-agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ tracing = { version = "0.1", default-features = false }
serde = { version = "1.0.145", features = ["derive"] }
serde_json = "1.0"
thiserror = { version = "1.0.58", default-features = false }
libdd-capabilities = "3.0.0"
libdd-capabilities-impl = "4.0.0"
libdd-library-config = "3.0.0"
libdd-trace-protobuf = "4.0.1"
libdd-trace-stats = { version = "7.0.0", features = ["stats-obfuscation"] }
libdd-capabilities = "4.0.1"
libdd-capabilities-impl = "8.0.0"
libdd-library-config = { version = "5.0.0", features = ["otel-thread-ctx"] }
libdd-trace-protobuf = "5.1.1"
libdd-trace-stats = { version = "12.0.0", features = ["stats-obfuscation"] }
libdd-common = { workspace = true, features = ["https"] }
libdd-trace-obfuscation = { workspace = true, features = ["https"] }
libdd-trace-utils = { workspace = true, features = ["https", "mini_agent"] }
Expand Down
13 changes: 7 additions & 6 deletions crates/datadog-trace-agent/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,12 @@ impl Config {
profiling_intake_url = format!("{endpoint_prefix}/api/v2/profile");
};

let obfuscation_config = obfuscation_config::ObfuscationConfig::new().map_err(|err| {
anyhow::anyhow!(
"Error creating obfuscation config, Mini Agent will not start. Error: {err}",
)
})?;
let obfuscation_config =
obfuscation_config::ObfuscationConfig::new_from_env().map_err(|err| {
anyhow::anyhow!(
"Error creating obfuscation config, Mini Agent will not start. Error: {err}",
)
})?;

let tags = if let Ok(env_tags) = env::var("DD_TAGS") {
Tags::from_env_string(&env_tags)
Expand Down Expand Up @@ -935,7 +936,7 @@ pub mod test_helpers {
env_type: trace_utils::EnvironmentType::AzureFunction,
app_name: Some("test-app".to_string()),
max_request_content_length: 10_000_000,
obfuscation_config: obfuscation_config::ObfuscationConfig::new().unwrap(),
obfuscation_config: obfuscation_config::ObfuscationConfig::new_from_env().unwrap(),
os: std::env::consts::OS.to_string(),
tags: Tags::new(),
stats_flush_interval_secs: 10,
Expand Down
2 changes: 1 addition & 1 deletion crates/datadog-trace-agent/src/stats_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ mod tests {
dd_dogstatsd_windows_pipe_name: None,
env_type: trace_utils::EnvironmentType::CloudFunction,
os: "linux".to_string(),
obfuscation_config: ObfuscationConfig::new().unwrap(),
obfuscation_config: ObfuscationConfig::new_from_env().unwrap(),
proxy_url: None,
profiling_intake: Endpoint {
url: hyper::Uri::from_static("https://proxy.agent.notdog.com/proxy"),
Expand Down
4 changes: 2 additions & 2 deletions crates/datadog-trace-agent/src/trace_flusher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl std::fmt::Debug for ProxyHttpClient {
impl ProxyHttpClient {
// The `HttpClientCapability` constructors take no arguments, so we use `with_proxy` to
// take in the proxy URL and build the client. Neither `new_client` nor
// `new_without_connection_pooling` is called on our code path — we only ever hand an
// `new_periodic` is called on our code path — we only ever hand an
// already-built instance to `SendData::send` — so their proxy-less clients are unused.
fn with_proxy(proxy_https: Option<&String>) -> Result<Self, Box<dyn Error>> {
Self::with_proxy_pooling(proxy_https, true)
Expand Down Expand Up @@ -149,7 +149,7 @@ impl HttpClientCapability for ProxyHttpClient {
}

#[allow(clippy::expect_used)]
fn new_without_connection_pooling() -> Self {
fn new_periodic() -> Self {
Self::with_proxy_pooling(None, false)
.expect("building proxy connector with default TLS should not fail")
}
Expand Down
7 changes: 4 additions & 3 deletions crates/datadog-trace-agent/src/trace_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use libdd_library_config::tracer_metadata::TracerMetadata;
use tokio::sync::mpsc::Sender;
use tracing::{debug, error, warn};

use libdd_trace_obfuscation::obfuscate::obfuscate_span;
use libdd_trace_obfuscation::obfuscate::obfuscate_pb_span;
use libdd_trace_protobuf::pb;
use libdd_trace_utils::trace_utils::{self};
use libdd_trace_utils::trace_utils::{EnvironmentType, SendData};
Expand Down Expand Up @@ -112,7 +112,7 @@ impl TraceChunkProcessor for ChunkProcessor {
app_name.clone(),
);
}
obfuscate_span(span, &self.config.obfuscation_config);
obfuscate_pb_span(span, &self.config.obfuscation_config);
}
}
}
Expand Down Expand Up @@ -160,6 +160,7 @@ impl ServerlessTraceProcessor {
service_version: Some(tracer_payload.app_version.clone()),
process_tags: None,
container_id: Some(tracer_payload.container_id.clone()),
threadlocal_metadata: None,
});
for chunk in &tracer_payload.chunks {
if let Err(e) = concentrator.add_chunk(chunk.clone(), Arc::clone(&metadata)) {
Expand Down Expand Up @@ -410,7 +411,7 @@ mod tests {
dd_dogstatsd_windows_pipe_name: None,
env_type: trace_utils::EnvironmentType::CloudFunction,
os: "linux".to_string(),
obfuscation_config: ObfuscationConfig::new().unwrap(),
obfuscation_config: ObfuscationConfig::new_from_env().unwrap(),
proxy_url: None,
profiling_intake: Endpoint {
url: hyper::Uri::from_static("https://proxy.agent.notdog.com/proxy"),
Expand Down
2 changes: 1 addition & 1 deletion crates/dogstatsd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ socket2 = { version = "0.6", default-features = false }
tokio-util = { version = "0.7.11", default-features = false }
tracing = { version = "0.1.40", default-features = false }
regex = { version = "1.10.6", default-features = false }
zstd = { version = "0.13.3", default-features = false }
zstd = { version = "0.14.3", default-features = false }

[dev-dependencies]
http = "1"
Expand Down
Loading