diff --git a/.github/workflows/rust-docker-build.yml b/.github/workflows/rust-docker-build.yml index df30c6fea5984..960dbd62d6015 100644 --- a/.github/workflows/rust-docker-build.yml +++ b/.github/workflows/rust-docker-build.yml @@ -31,7 +31,7 @@ jobs: dockerfile: ./rust/Dockerfile - image: property-defs-rs dockerfile: ./rust/Dockerfile - - image: error-tracking + - image: cymbal dockerfile: ./rust/Dockerfile runs-on: depot-ubuntu-22.04-4 permissions: @@ -48,7 +48,7 @@ jobs: hook-janitor_digest: ${{ steps.digest.outputs.hook-janitor_digest }} hook-worker_digest: ${{ steps.digest.outputs.hook-worker_digest }} hook-migrator_digest: ${{ steps.digest.outputs.hook-migrator_digest }} - error-tracking-rs_digest: ${{ steps.digest.outputs.error-tracking-rs_digest }} + cymbal_digest: ${{ steps.digest.outputs.cymbal_digest }} defaults: run: @@ -144,10 +144,10 @@ jobs: values: image: sha: '${{ needs.build.outputs.property-defs-rs_digest }}' - # - release: error-tracking-rs - disabled until a charts in place, for now we just build + # - release: cymbal - disabled until a charts in place, for now we just build # values: # image: - # sha: '${{ needs.build.outputs.error-tracking-rs_digest }}' + # sha: '${{ needs.build.outputs.cymbal_digest }}' - release: hoghooks values: api_image: diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 2eec65238bdb1..c11edfa5f39fa 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -957,6 +957,26 @@ dependencies = [ "uuid", ] +[[package]] +name = "cymbal" +version = "0.1.0" +dependencies = [ + "axum 0.7.5", + "common-alloc", + "common-kafka", + "common-metrics", + "envconfig", + "health", + "metrics", + "rdkafka", + "serde_json", + "sqlx", + "thiserror", + "tokio", + "tracing", + "tracing-subscriber", +] + [[package]] name = "darling" version = "0.20.10" @@ -1159,26 +1179,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "error-tracking" -version = "0.1.0" -dependencies = [ - "axum 0.7.5", - "common-alloc", - "common-kafka", - "common-metrics", - "envconfig", - "health", - "metrics", - "rdkafka", - "serde_json", - "sqlx", - "thiserror", - "tokio", - "tracing", - "tracing-subscriber", -] - [[package]] name = "etcetera" version = "0.8.0" diff --git a/rust/Cargo.toml b/rust/Cargo.toml index a060d845a5e89..93e284a9cd131 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -18,7 +18,7 @@ members = [ "cyclotron-node", "cyclotron-janitor", "cyclotron-fetch", - "error-tracking", + "cymbal", ] [workspace.lints.rust] diff --git a/rust/error-tracking/Cargo.toml b/rust/cymbal/Cargo.toml similarity index 96% rename from rust/error-tracking/Cargo.toml rename to rust/cymbal/Cargo.toml index fdf81846f6d32..5f337398b4b46 100644 --- a/rust/error-tracking/Cargo.toml +++ b/rust/cymbal/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "error-tracking" +name = "cymbal" version = "0.1.0" edition = "2021" diff --git a/rust/error-tracking/README.md b/rust/cymbal/README.md similarity index 50% rename from rust/error-tracking/README.md rename to rust/cymbal/README.md index b78d5e2192c03..970019c931277 100644 --- a/rust/error-tracking/README.md +++ b/rust/cymbal/README.md @@ -1,3 +1,3 @@ -# Error tracking +# Cymbal, for error tracking You throw 'em, we catch 'em. diff --git a/rust/error-tracking/src/app_context.rs b/rust/cymbal/src/app_context.rs similarity index 100% rename from rust/error-tracking/src/app_context.rs rename to rust/cymbal/src/app_context.rs diff --git a/rust/error-tracking/src/config.rs b/rust/cymbal/src/config.rs similarity index 82% rename from rust/error-tracking/src/config.rs rename to rust/cymbal/src/config.rs index b29630710127b..e1493477d2576 100644 --- a/rust/error-tracking/src/config.rs +++ b/rust/cymbal/src/config.rs @@ -21,6 +21,13 @@ pub struct Config { // Rust service connect directly to postgres, not via pgbouncer, so we keep this low #[envconfig(default = "4")] pub max_pg_connections: u32, + + // These are unused for now, but useful while iterating in prod + #[envconfig(default = "true")] + pub skip_writes: bool, + + #[envconfig(default = "true")] + pub skip_reads: bool, } impl Config { diff --git a/rust/error-tracking/src/error.rs b/rust/cymbal/src/error.rs similarity index 100% rename from rust/error-tracking/src/error.rs rename to rust/cymbal/src/error.rs diff --git a/rust/error-tracking/src/lib.rs b/rust/cymbal/src/lib.rs similarity index 100% rename from rust/error-tracking/src/lib.rs rename to rust/cymbal/src/lib.rs diff --git a/rust/error-tracking/src/main.rs b/rust/cymbal/src/main.rs similarity index 97% rename from rust/error-tracking/src/main.rs rename to rust/cymbal/src/main.rs index a291694161ea0..66d9d0af13593 100644 --- a/rust/error-tracking/src/main.rs +++ b/rust/cymbal/src/main.rs @@ -3,8 +3,8 @@ use std::{future::ready, sync::Arc}; use axum::{routing::get, Router}; use common_kafka::kafka_consumer::RecvErr; use common_metrics::{serve, setup_metrics_routes}; +use cymbal::{app_context::AppContext, config::Config, error::Error}; use envconfig::Envconfig; -use error_tracking::{app_context::AppContext, config::Config, error::Error}; use serde_json::Value; use tokio::task::JoinHandle; use tracing::{error, info};