Skip to content
Merged
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
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 4 additions & 0 deletions src/btcnode_metrics_gatherer/collector.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
4 changes: 4 additions & 0 deletions src/btcnode_metrics_gatherer/config.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
4 changes: 4 additions & 0 deletions src/btcnode_metrics_gatherer/error.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down
4 changes: 4 additions & 0 deletions src/btcnode_metrics_gatherer/metrics.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 4 additions & 0 deletions src/btcnode_metrics_gatherer/mod.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 4 additions & 0 deletions src/btcnode_metrics_gatherer/node.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
4 changes: 4 additions & 0 deletions src/btcnode_metrics_gatherer/service.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 4 additions & 0 deletions src/handlers.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
6 changes: 5 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions src/state.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
Loading