Skip to content

Commit

Permalink
refactor(attest): switch to orb-telemetry (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheButlah authored Dec 11, 2024
1 parent 335bfe7 commit f3f143a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 65 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions attest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ orb-attest-dbus.workspace = true
orb-build-info.workspace = true
orb-const-concat.workspace = true
orb-security-utils = { workspace = true, features = ["reqwest"] }
orb-telemetry.workspace = true
reqwest = { workspace = true, features = ["json", "multipart"] }
ring.workspace = true
secrecy = { workspace = true, features = ["serde"] }
Expand Down
5 changes: 2 additions & 3 deletions attest/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
pub mod client;
pub mod config;
pub mod dbus;
pub mod logging;
pub mod remote_api;

use std::sync::Arc;
Expand All @@ -20,10 +19,10 @@ const BUILD_INFO: BuildInfo = make_build_info!();

const HTTP_RETRY_DELAY: std::time::Duration = std::time::Duration::from_secs(3);

pub const SYSLOG_IDENTIFIER: &str = "worldcoin-attest";

#[allow(clippy::missing_errors_doc)]
pub async fn main() -> eyre::Result<()> {
logging::init();

info!("Version: {}", BUILD_INFO.version);

let orb_id =
Expand Down
61 changes: 0 additions & 61 deletions attest/src/logging.rs

This file was deleted.

3 changes: 3 additions & 0 deletions attest/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#[tokio::main]
async fn main() -> color_eyre::Result<()> {
color_eyre::install()?;
orb_telemetry::TelemetryConfig::new()
.with_journald(orb_attest::SYSLOG_IDENTIFIER)
.init();
orb_attest::main().await
}
2 changes: 1 addition & 1 deletion attest/src/remote_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ printf dmFsaWRzaWduYXR1cmU=
// A happy path
#[tokio::test]
async fn get_token() {
crate::logging::init();
orb_telemetry::TelemetryConfig::new().init();

let mock_server = MockServer::start().await;

Expand Down

0 comments on commit f3f143a

Please sign in to comment.