-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
64 additions
and
79 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "alpaca-data-relay" | ||
version = "1.0.0" | ||
version = "1.0.1" | ||
authors = ["Sebastian Rollen <[email protected]>"] | ||
edition = "2018" | ||
|
||
|
@@ -14,7 +14,8 @@ dotenv = "0.15" | |
futures = "0.3" | ||
kafka-settings = { git = "ssh://[email protected]/Overmuse/kafka-settings", tag = "v0.2.1" } | ||
rdkafka = { version = "0.26", features = ["ssl-vendored"] } | ||
sentry = "0.19.0" | ||
sentry = "0.21.0" | ||
sentry-anyhow = "0.21.0" | ||
serde = "1.0" | ||
serde_json = "1.0" | ||
tokio = {version = "1.0", features = ["macros", "rt-multi-thread"]} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,32 @@ | ||
use alpaca_data_relay::{run, Settings}; | ||
use anyhow::Result; | ||
use dotenv::dotenv; | ||
use sentry_anyhow::capture_anyhow; | ||
use tracing::{info, subscriber::set_global_default}; | ||
use tracing_log::LogTracer; | ||
use tracing_subscriber::{filter::EnvFilter, FmtSubscriber}; | ||
|
||
#[tokio::main] | ||
async fn main() -> Result<()> { | ||
let _guard = sentry::init(sentry::ClientOptions::new()); | ||
let _ = dotenv(); | ||
let subscriber = FmtSubscriber::builder() | ||
.with_env_filter(EnvFilter::from_default_env()) | ||
.finish(); | ||
set_global_default(subscriber).expect("Failed to set subscriber"); | ||
LogTracer::init().expect("Failed to set logger"); | ||
let settings = Settings::new()?; | ||
let _guard = sentry::init(( | ||
settings.sentry.address.clone(), | ||
sentry::ClientOptions { | ||
release: sentry::release_name!(), | ||
..Default::default() | ||
}, | ||
)); | ||
info!("Starting alpaca-data-relay"); | ||
|
||
run(settings).await | ||
let res = run(settings).await; | ||
if let Err(e) = res { | ||
capture_anyhow(&e); | ||
} | ||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters