initial commit

This commit is contained in:
Sampras Lopes
2022-11-16 20:37:50 +05:30
commit 430dcd1967
320 changed files with 64760 additions and 0 deletions

18
crates/router/src/env.rs Normal file
View File

@ -0,0 +1,18 @@
#[doc(inline)]
pub use router_env::*;
pub mod logger {
#[doc(inline)]
pub use router_env::{log, logger::*};
///
/// Setup logging sub-system.
///
// TODO (prom-monitoring): Ideally tracing/opentelementry structs shouldn't be pushed out
// Find an abstraction so that source crate is unaware about underlying implementation
// https://juspay.atlassian.net/browse/ORCA-345
pub fn setup(
conf: &config::Log,
) -> Result<TelemetryGuard, router_env::opentelemetry::metrics::MetricsError> {
router_env::setup(conf, "router", vec!["router", "actix_server"])
}
}