Skip to content

Commit dda1f93

Browse files
fix: use tracing for all logs in datadog-serverless-compat (#33)
* use tracing for all logs in datadog-serverless-compat * update 3rd party licenses
1 parent 4d616c9 commit dda1f93

File tree

4 files changed

+3
-59
lines changed

4 files changed

+3
-59
lines changed

Cargo.lock

Lines changed: 1 addition & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE-3rdparty.csv

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ either,https://github.com/rayon-rs/either,MIT OR Apache-2.0,bluss
8383
ena,https://github.com/rust-lang/ena,MIT OR Apache-2.0,Niko Matsakis <niko@alum.mit.edu>
8484
encoding_rs,https://github.com/hsivonen/encoding_rs,(Apache-2.0 OR MIT) AND BSD-3-Clause,Henri Sivonen <hsivonen@hsivonen.fi>
8585
enum-as-inner,https://github.com/bluejekyll/enum-as-inner,MIT OR Apache-2.0,Benjamin Fry <benjaminfry@me.com>
86-
env_logger,https://github.com/rust-cli/env_logger,MIT OR Apache-2.0,The env_logger Authors
8786
equivalent,https://github.com/indexmap-rs/equivalent,Apache-2.0 OR MIT,The equivalent Authors
8887
errno,https://github.com/lambda-fairy/rust-errno,MIT OR Apache-2.0,Chris Wong <lambda.fairy@gmail.com>
8988
event-listener,https://github.com/smol-rs/event-listener,Apache-2.0 OR MIT,Stjepan Glavina <stjepang@gmail.com>
@@ -128,7 +127,6 @@ http-body-util,https://github.com/hyperium/http-body,MIT,"Carl Lerche <me@carlle
128127
httparse,https://github.com/seanmonstar/httparse,MIT OR Apache-2.0,Sean McArthur <sean@seanmonstar.com>
129128
httpdate,https://github.com/pyfisch/httpdate,MIT OR Apache-2.0,Pyfisch <pyfisch@posteo.org>
130129
httpmock,https://github.com/alexliesenfeld/httpmock,MIT,Alexander Liesenfeld <alexander.liesenfeld@outlook.com>
131-
humantime,https://github.com/chronotope/humantime,MIT OR Apache-2.0,The humantime Authors
132130
hyper,https://github.com/hyperium/hyper,MIT,Sean McArthur <sean@seanmonstar.com>
133131
hyper-http-proxy,https://github.com/metalbear-co/hyper-http-proxy,MIT,MetalBear Tech LTD <hi@metalbear.co>
134132
hyper-named-pipe,https://github.com/fussybeaver/hyper-named-pipe,Apache-2.0,The hyper-named-pipe Authors
@@ -154,7 +152,6 @@ indexmap,https://github.com/bluss/indexmap,Apache-2.0 OR MIT,The indexmap Author
154152
indexmap,https://github.com/indexmap-rs/indexmap,Apache-2.0 OR MIT,The indexmap Authors
155153
ipconfig,https://github.com/liranringel/ipconfig,MIT OR Apache-2.0,Liran Ringel <liranringel@gmail.com>
156154
ipnet,https://github.com/krisprice/ipnet,MIT OR Apache-2.0,Kris Price <kris@krisprice.nz>
157-
is-terminal,https://github.com/sunfishcode/is-terminal,MIT,"softprops <d.tangren@gmail.com>, Dan Gohman <dev@sunfishcode.online>"
158155
itertools,https://github.com/rust-itertools/itertools,MIT OR Apache-2.0,bluss
159156
itoa,https://github.com/dtolnay/itoa,MIT OR Apache-2.0,David Tolnay <dtolnay@gmail.com>
160157
jobserver,https://github.com/rust-lang/jobserver-rs,MIT OR Apache-2.0,Alex Crichton <alex@alexcrichton.com>
@@ -294,7 +291,6 @@ sync_wrapper,https://github.com/Actyx/sync_wrapper,Apache-2.0,Actyx AG <develope
294291
synstructure,https://github.com/mystor/synstructure,MIT,Nika Layzell <nika@thelayzells.com>
295292
tempfile,https://github.com/Stebalien/tempfile,MIT OR Apache-2.0,"Steven Allen <steven@stebalien.com>, The Rust Project Developers, Ashley Mannix <ashleymannix@live.com.au>, Jason White <me@jasonwhite.io>"
296293
term,https://github.com/Stebalien/term,MIT OR Apache-2.0,"The Rust Project Developers, Steven Allen"
297-
termcolor,https://github.com/BurntSushi/termcolor,Unlicense OR MIT,Andrew Gallant <jamslam@gmail.com>
298294
testcontainers,https://github.com/testcontainers/testcontainers-rs,MIT OR Apache-2.0,"Thomas Eizinger, Artem Medvedev <i@ddtkey.com>, Mervyn McCreight"
299295
thiserror,https://github.com/dtolnay/thiserror,MIT OR Apache-2.0,David Tolnay <dtolnay@gmail.com>
300296
thiserror-impl,https://github.com/dtolnay/thiserror,MIT OR Apache-2.0,David Tolnay <dtolnay@gmail.com>

crates/datadog-serverless-compat/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ license.workspace = true
66
description = "Binary to run trace-agent and dogstatsd servers in Serverless environments"
77

88
[dependencies]
9-
log = "0.4"
10-
env_logger = "0.10.0"
119
datadog-trace-agent = { path = "../datadog-trace-agent" }
1210
datadog-trace-protobuf = { git = "https://github.com/DataDog/libdatadog/", rev = "4eb2b8673354f974591c61bab3f7d485b4c119e0" }
1311
datadog-trace-utils = { git = "https://github.com/DataDog/libdatadog/", rev = "4eb2b8673354f974591c61bab3f7d485b4c119e0" }

crates/datadog-serverless-compat/src/main.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77
#![cfg_attr(not(test), deny(clippy::todo))]
88
#![cfg_attr(not(test), deny(clippy::unimplemented))]
99

10-
use env_logger::Builder;
11-
use log::{debug, error, info};
12-
use std::{env, str::FromStr, sync::Arc};
10+
use std::{env, sync::Arc};
1311
use tokio::{
1412
sync::Mutex as TokioMutex,
1513
time::{interval, Duration},
1614
};
15+
use tracing::{debug, error, info};
1716
use tracing_subscriber::EnvFilter;
1817

1918
use datadog_trace_agent::{
@@ -47,8 +46,6 @@ pub async fn main() {
4746
let log_level = env::var("DD_LOG_LEVEL")
4847
.map(|val| val.to_lowercase())
4948
.unwrap_or("info".to_string());
50-
let level_filter = log::LevelFilter::from_str(&log_level).unwrap_or(log::LevelFilter::Info);
51-
Builder::new().filter_level(level_filter).init();
5249

5350
let (_, env_type) = match read_cloud_env() {
5451
Some(value) => value,

0 commit comments

Comments
 (0)