diff --git a/Cargo.lock b/Cargo.lock index 001954b..07372fd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -222,7 +222,7 @@ checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" [[package]] name = "btcnode-metrics" -version = "2.0.2" +version = "2.0.3" dependencies = [ "anyhow", "axum", diff --git a/Cargo.toml b/Cargo.toml index fc8adbf..7a52dea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "btcnode-metrics" edition = "2024" -version = "2.0.2" +version = "2.0.3" description = "The Bitcoin node metrics exporter for Prometheus based on Rust Bitcoin Community's crate for Bitcoin JSON-RPC." license-file = "LICENSE" homepage = "https://github.com/AltaModaTech/btcnode-metrics" diff --git a/src/btcnode_metrics_gatherer/collector.rs b/src/btcnode_metrics_gatherer/collector.rs index c6d0157..0bd2206 100644 --- a/src/btcnode_metrics_gatherer/collector.rs +++ b/src/btcnode_metrics_gatherer/collector.rs @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 AltaModa Technologies, LLC +// SPDX-FileCopyrightText: Contributors to the btcnode-metrics project. + use std::time::Instant; use tracing::{info, warn}; diff --git a/src/btcnode_metrics_gatherer/config.rs b/src/btcnode_metrics_gatherer/config.rs index 5ab6874..e6010a6 100644 --- a/src/btcnode_metrics_gatherer/config.rs +++ b/src/btcnode_metrics_gatherer/config.rs @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 AltaModa Technologies, LLC +// SPDX-FileCopyrightText: Contributors to the btcnode-metrics project. + use serde::Deserialize; use std::path::Path; diff --git a/src/btcnode_metrics_gatherer/error.rs b/src/btcnode_metrics_gatherer/error.rs index fc46341..5986493 100644 --- a/src/btcnode_metrics_gatherer/error.rs +++ b/src/btcnode_metrics_gatherer/error.rs @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 AltaModa Technologies, LLC +// SPDX-FileCopyrightText: Contributors to the btcnode-metrics project. + use thiserror::Error; #[derive(Debug, Error)] diff --git a/src/btcnode_metrics_gatherer/metrics.rs b/src/btcnode_metrics_gatherer/metrics.rs index 637ae57..fc966ab 100644 --- a/src/btcnode_metrics_gatherer/metrics.rs +++ b/src/btcnode_metrics_gatherer/metrics.rs @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 AltaModa Technologies, LLC +// SPDX-FileCopyrightText: Contributors to the btcnode-metrics project. + use prometheus::{Gauge, Registry, Opts}; use super::Error; diff --git a/src/btcnode_metrics_gatherer/mod.rs b/src/btcnode_metrics_gatherer/mod.rs index d5c57ef..34203b6 100644 --- a/src/btcnode_metrics_gatherer/mod.rs +++ b/src/btcnode_metrics_gatherer/mod.rs @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 AltaModa Technologies, LLC +// SPDX-FileCopyrightText: Contributors to the btcnode-metrics project. + pub mod collector; pub mod config; pub mod error; diff --git a/src/btcnode_metrics_gatherer/node.rs b/src/btcnode_metrics_gatherer/node.rs index fd64640..6f3f33e 100644 --- a/src/btcnode_metrics_gatherer/node.rs +++ b/src/btcnode_metrics_gatherer/node.rs @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 AltaModa Technologies, LLC +// SPDX-FileCopyrightText: Contributors to the btcnode-metrics project. + use corepc_client::client_sync::{v28::Client, Auth}; use corepc_client::types::v28::{ EstimateSmartFee, GetBlockStats, GetBlockchainInfo, GetChainTips, GetMempoolInfo, GetNetTotals, diff --git a/src/btcnode_metrics_gatherer/service.rs b/src/btcnode_metrics_gatherer/service.rs index 2b0dd84..79b075f 100644 --- a/src/btcnode_metrics_gatherer/service.rs +++ b/src/btcnode_metrics_gatherer/service.rs @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 AltaModa Technologies, LLC +// SPDX-FileCopyrightText: Contributors to the btcnode-metrics project. + use super::{MetricsCollector, NodeClient}; use prometheus::Encoder; use prometheus::TextEncoder; diff --git a/src/handlers.rs b/src/handlers.rs index 7025b69..9d28883 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 AltaModa Technologies, LLC +// SPDX-FileCopyrightText: Contributors to the btcnode-metrics project. + use axum::extract::State; use axum::http::{StatusCode, header}; use axum::response::IntoResponse; diff --git a/src/main.rs b/src/main.rs index 9eab284..21055cd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 AltaModa Technologies, LLC +// SPDX-FileCopyrightText: Contributors to the btcnode-metrics project. + mod btcnode_metrics_gatherer; mod handlers; mod state; @@ -17,7 +21,7 @@ use crate::btcnode_metrics_gatherer::{AppConfig, BitcoinMetrics, BitcoinNode, Me use crate::state::AppState; #[derive(Parser)] -#[command(name = "btc-metrics", about = "Bitcoin node metrics exporter for Prometheus")] +#[command(name = "btc-metrics", about = "Bitcoin node metrics exporter for Prometheus", version)] struct Cli { #[arg(short, long, default_value = "config.toml")] config: PathBuf, diff --git a/src/state.rs b/src/state.rs index 5152142..4b65821 100644 --- a/src/state.rs +++ b/src/state.rs @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 AltaModa Technologies, LLC +// SPDX-FileCopyrightText: Contributors to the btcnode-metrics project. + use std::sync::Arc; use crate::btcnode_metrics_gatherer::{BitcoinNode, MetricsService};