Skip to content

Commit

Permalink
Fix telemetry issues (#27)
Browse files Browse the repository at this point in the history
* Fix telemetry issues

* Update dep
  • Loading branch information
Dzejkop authored Mar 19, 2024
1 parent 683c35c commit bc538aa
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
11 changes: 8 additions & 3 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ aws-types = "1.0.1"
postgres-docker-utils = { path = "crates/postgres-docker-utils" }

# Company
telemetry-batteries = { git = "https://github.com/worldcoin/telemetry-batteries", rev = "ec8ba6d4da45fdb98f900d8d4c8e1a09186894b4" }
telemetry-batteries = { git = "https://github.com/worldcoin/telemetry-batteries", rev = "e0891328b29d9f85df037633feccca2f74a291a6" }

## External
async-trait = "0.1.74"
Expand All @@ -46,7 +46,7 @@ itertools = "0.12.0"
metrics = "0.22.1"
num-bigint = "0.4.4"
rand = "0.8.5"
reqwest = { version = "0.11.13", default-features = false, features = [
reqwest = { version = "0.11.24", default-features = false, features = [
"rustls-tls",
] }
serde = "1.0.136"
Expand Down
11 changes: 8 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,19 @@ async fn main() -> eyre::Result<()> {

let config = load_config(args.config.iter().map(PathBuf::as_ref))?;

if config.service.datadog_enabled {
DatadogBattery::init(None, "tx-sitter-monolith", None, true);
let _shutdown_handle = if config.service.datadog_enabled {
let shutdown_handle =
DatadogBattery::init(None, "tx-sitter-monolith", None, true);

Some(shutdown_handle)
} else {
tracing_subscriber::registry()
.with(tracing_subscriber::fmt::layer().pretty().compact())
.with(EnvFilter::from_default_env())
.init();
}

None
};

if config.service.statsd_enabled {
StatsdBattery::init(
Expand Down

0 comments on commit bc538aa

Please sign in to comment.