feat: add elasticsearch tracing subscriber

create lib/pk_core
This commit is contained in:
spiral
2022-07-10 01:15:03 -04:00
parent 5097eb9ce2
commit 1825a00248
4 changed files with 128 additions and 0 deletions

7
lib/pk_core/src/util.rs Normal file
View File

@@ -0,0 +1,7 @@
/// get_env gets an env variable as Option<String instead of Result<String>.
pub fn get_env(key: &str) -> Option<String> {
match std::env::var(key) {
Ok(val) => { Some(val) }
Err(_) => None
}
}