Skip to content
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

[trace-mini-agent] change logging crate #799

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion trace-mini-agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ anyhow = "1.0"
hyper = { version = "0.14", default-features = false, features = ["server", "backports", "deprecated"] }
tokio = { version = "1", features = ["macros", "rt-multi-thread"]}
async-trait = "0.1.64"
log = "0.4"
tracing = { version = "0.1", default-features = false }
serde = { version = "1.0.145", features = ["derive"] }
serde_json = "1.0"
ddcommon = { path = "../ddcommon" }
Expand Down
2 changes: 1 addition & 1 deletion trace-mini-agent/src/env_verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
use async_trait::async_trait;
use hyper::body::HttpBody;
use hyper::{Body, Client, Method, Request, Response};
use log::{debug, error};
use serde::{Deserialize, Serialize};
use std::env;
use std::fs;
use std::path::Path;
use std::process;
use std::sync::Arc;
use std::time::{Duration, Instant};
use tracing::{debug, error};

use datadog_trace_utils::trace_utils;

Expand Down
2 changes: 1 addition & 1 deletion trace-mini-agent/src/http_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use hyper::{
http::{self, HeaderMap},
Body, Response, StatusCode,
};
use log::{error, info};
use serde_json::json;
use tracing::{error, info};

/// Does two things:
/// 1. Logs the given message. A success status code (within 200-299) will cause an info log to be
Expand Down
2 changes: 1 addition & 1 deletion trace-mini-agent/src/mini_agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

use hyper::service::{make_service_fn, service_fn};
use hyper::{http, Body, Method, Request, Response, Server, StatusCode};
use log::{debug, error, info};
use serde_json::json;
use std::convert::Infallible;
use std::net::SocketAddr;
use std::sync::Arc;
use std::time::Instant;
use tokio::sync::mpsc::{self, Receiver, Sender};
use tracing::{debug, error, info};

use crate::http_utils::log_and_create_http_response;
use crate::{config, env_verifier, stats_flusher, stats_processor, trace_flusher, trace_processor};
Expand Down
2 changes: 1 addition & 1 deletion trace-mini-agent/src/stats_flusher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// SPDX-License-Identifier: Apache-2.0

use async_trait::async_trait;
use log::{debug, error, info};
use std::{sync::Arc, time};
use tokio::sync::{mpsc::Receiver, Mutex};
use tracing::{debug, error, info};

use datadog_trace_protobuf::pb;
use datadog_trace_utils::stats_utils;
Expand Down
2 changes: 1 addition & 1 deletion trace-mini-agent/src/stats_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use std::time::UNIX_EPOCH;

use async_trait::async_trait;
use hyper::{http, Body, Request, Response, StatusCode};
use log::info;
use tokio::sync::mpsc::Sender;
use tracing::info;

use datadog_trace_protobuf::pb;
use datadog_trace_utils::stats_utils;
Expand Down
2 changes: 1 addition & 1 deletion trace-mini-agent/src/trace_flusher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// SPDX-License-Identifier: Apache-2.0

use async_trait::async_trait;
use log::{error, info};
use std::{sync::Arc, time};
use tokio::sync::{mpsc::Receiver, Mutex};
use tracing::{error, info};

use datadog_trace_utils::trace_utils;
use datadog_trace_utils::trace_utils::SendData;
Expand Down
2 changes: 1 addition & 1 deletion trace-mini-agent/src/trace_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use std::sync::Arc;

use async_trait::async_trait;
use hyper::{http, Body, Request, Response, StatusCode};
use log::info;
use tokio::sync::mpsc::Sender;
use tracing::info;

use datadog_trace_obfuscation::obfuscate::obfuscate_span;
use datadog_trace_protobuf::pb;
Expand Down
Loading