diff --git a/Cargo.lock b/Cargo.lock index a54d23c..a27a102 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -222,7 +222,7 @@ checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" [[package]] name = "btcnode-metrics" -version = "0.1.0" +version = "1.0.0" dependencies = [ "corepc-client", "prometheus", @@ -232,6 +232,22 @@ dependencies = [ "tracing", ] +[[package]] +name = "btcnode-prom-metrics" +version = "1.0.0" +dependencies = [ + "anyhow", + "axum", + "btcnode-metrics", + "clap", + "prometheus", + "serde", + "tokio", + "toml", + "tracing", + "tracing-subscriber", +] + [[package]] name = "bytes" version = "1.11.1" @@ -683,22 +699,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "prom-api" -version = "0.1.0" -dependencies = [ - "anyhow", - "axum", - "btcnode-metrics", - "clap", - "prometheus", - "serde", - "tokio", - "toml", - "tracing", - "tracing-subscriber", -] - [[package]] name = "prometheus" version = "0.14.0" diff --git a/Cargo.toml b/Cargo.toml index d16457e..14f698d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,14 +1,13 @@ [workspace] members = [ "src/btcnode-metrics", - "src/prom-api", + "src/btcnode-prom-metrics", ] resolver = "3" -name = "btcnode-prom-metrics" [workspace.package] edition = "2024" -version = "0.1.0" +version = "1.0.0" description = "The Bitcoin node metrics exporter for Prometheus built on the Rust Bitcoin Community's corepc-client crate." license-file = "LICENSE" homepage = "https://github.com/AltaModaTech/btcnode-prom-metrics" diff --git a/README.md b/README.md index f0cda9e..d209367 100644 --- a/README.md +++ b/README.md @@ -15,5 +15,5 @@ The Rust Bitcoin Community's public repository for this crate is at [corepc-clie This repository's code is separated into: -- _prom-api_ implements the API for Prometheus to call for gathering metrics. +- _btcnode-prom-metrics_ implements the API for Prometheus to call for gathering metrics. - _btcnode-metrics_ gathers metrics from the Bitcoin node and transforms them into Prometheus format. diff --git a/src/btcnode-metrics/Cargo.toml b/src/btcnode-metrics/Cargo.toml index 108f370..97b5690 100644 --- a/src/btcnode-metrics/Cargo.toml +++ b/src/btcnode-metrics/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "btcnode-metrics" -description.workspace = true +description = "Gathers Bitcoin node metrics and transforms to Prometheus format." license-file.workspace = true homepage.workspace = true repository.workspace = true diff --git a/src/prom-api/Cargo.toml b/src/btcnode-prom-metrics/Cargo.toml similarity index 82% rename from src/prom-api/Cargo.toml rename to src/btcnode-prom-metrics/Cargo.toml index f48b731..b4adb53 100644 --- a/src/prom-api/Cargo.toml +++ b/src/btcnode-prom-metrics/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "prom-api" +name = "btcnode-prom-metrics" description.workspace = true license-file.workspace = true homepage.workspace = true @@ -10,7 +10,7 @@ version.workspace = true edition.workspace = true [dependencies] -btcnode-metrics = { path = "../btcnode-metrics", version = "0.1.0" } +btcnode-metrics = { path = "../btcnode-metrics", version = "^1.0.0" } axum.workspace = true tokio.workspace = true prometheus.workspace = true diff --git a/src/prom-api/src/handlers.rs b/src/btcnode-prom-metrics/src/handlers.rs similarity index 100% rename from src/prom-api/src/handlers.rs rename to src/btcnode-prom-metrics/src/handlers.rs diff --git a/src/prom-api/src/main.rs b/src/btcnode-prom-metrics/src/main.rs similarity index 100% rename from src/prom-api/src/main.rs rename to src/btcnode-prom-metrics/src/main.rs diff --git a/src/prom-api/src/state.rs b/src/btcnode-prom-metrics/src/state.rs similarity index 100% rename from src/prom-api/src/state.rs rename to src/btcnode-prom-metrics/src/state.rs