Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a friendly panic hook #45

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 120 additions & 0 deletions Cargo.lock

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

13 changes: 12 additions & 1 deletion crates/amaru/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ homepage = "https://github.com/pragma-org/amaru"
documentation = "https://docs.rs/amaru"
readme = "README.md"
rust-version = "1.81.0"
build = "build.rs"

[dependencies]
async-trait = "0.1.83"
clap = { version = "4.5.20", features = ["derive"] }
gasket = { version = "0.8.0", features = ["derive"] }
hex = "0.4.3"
miette = "7.2.0"
indoc = "2.0"
strip-ansi-escapes = "0.1.1"
owo-colors = { version = "3.5.0", features = ["supports-colors"] }
ouroboros = { git = "https://github.com/pragma-org/ouroboros", rev = "ca1d447a6c106e421e6c2b1c7d9d59abf5ca9589" }
ouroboros-praos = { git = "https://github.com/pragma-org/ouroboros", rev = "ca1d447a6c106e421e6c2b1c7d9d59abf5ca9589" }
pallas-addresses = "0.31.0"
Expand All @@ -39,10 +43,17 @@ serde = "1.0.215"
bech32 = "0.11.0"
opentelemetry = { version = "0.27.1" }
opentelemetry_sdk = { version = "0.27.1", features = ["async-std", "rt-tokio"] }
opentelemetry-otlp = { version = "0.27.0", features = ["grpc-tonic", "http-proto", "reqwest-client"] }
opentelemetry-otlp = { version = "0.27.0", features = [
"grpc-tonic",
"http-proto",
"reqwest-client",
] }
tracing-opentelemetry = { version = "0.28.0" }

[dev-dependencies]
envpath = { version = "0.0.1-beta.3", features = ["rand"] }
insta = { version = "1.41.1", features = ["json"] }
proptest = "1.5.0"

[build-dependencies]
built = { version = "0.7.1", features = ["git2"] }
3 changes: 3 additions & 0 deletions crates/amaru/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
built::write_built_file().expect("Failed to acquire build-time information");
}
4 changes: 4 additions & 0 deletions crates/amaru/src/bin/amaru/main.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
use clap::{Parser, Subcommand};
use opentelemetry::metrics::Counter;
use panic::panic_handler;
use std::env;

mod cmd;
mod config;
mod exit;
mod panic;

pub const SERVICE_NAME: &str = "amaru";

Expand All @@ -28,6 +30,8 @@ struct Cli {

#[tokio::main]
async fn main() -> miette::Result<()> {
panic_handler();

let counter = setup_tracing();

let args = Cli::parse();
Expand Down
Loading
Loading