Skip to content

Commit

Permalink
chore: Remove autometrics
Browse files Browse the repository at this point in the history
These were not used AFAIK.
  • Loading branch information
luckysori committed Dec 14, 2023
1 parent dbaefa6 commit 82255a7
Show file tree
Hide file tree
Showing 13 changed files with 7 additions and 233 deletions.
177 changes: 0 additions & 177 deletions Cargo.lock

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

4 changes: 0 additions & 4 deletions coordinator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ version = "0.9.4"
version = "1"
features = ["backtrace"]

[dependencies.autometrics]
version = "0.5"
features = ["prometheus-exporter"]

[dependencies.axum]
version = "0.6.20"
features = ["ws", "query", "multipart"]
Expand Down
3 changes: 0 additions & 3 deletions coordinator/src/admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use crate::parse_channel_id;
use crate::routes::AppState;
use crate::AppError;
use anyhow::Context;
use autometrics::autometrics;
use axum::extract::Path;
use axum::extract::Query;
use axum::extract::State;
Expand Down Expand Up @@ -36,7 +35,6 @@ pub struct Balance {
pub onchain: u64,
}

#[autometrics]
pub async fn get_balance(State(state): State<Arc<AppState>>) -> Result<Json<Balance>, AppError> {
spawn_blocking(move || {
let offchain = state.node.inner.get_ldk_balance();
Expand Down Expand Up @@ -127,7 +125,6 @@ impl From<(SubChannel, Option<Contract>, String, Option<OffsetDateTime>)> for Dl
}
}

#[autometrics]
#[instrument(skip_all, err(Debug))]
pub async fn list_dlc_channels(
State(state): State<Arc<AppState>>,
Expand Down
3 changes: 0 additions & 3 deletions coordinator/src/bin/coordinator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,6 @@ async fn main() -> Result<()> {
}
});

// Start the metrics exporter
autometrics::prometheus_exporter::init();

tracing::debug!("Listening on http://{}", http_address);

match axum::Server::bind(&http_address)
Expand Down
4 changes: 0 additions & 4 deletions coordinator/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use anyhow::bail;
use anyhow::ensure;
use anyhow::Context;
use anyhow::Result;
use autometrics::autometrics;
use bitcoin::hashes::hex::ToHex;
use bitcoin::secp256k1::PublicKey;
use commons::order_matching_fee_taker;
Expand Down Expand Up @@ -260,7 +259,6 @@ impl Node {
Ok(())
}

#[autometrics]
async fn open_position(
&self,
conn: &mut PgConnection,
Expand Down Expand Up @@ -406,7 +404,6 @@ impl Node {
Ok(())
}

#[autometrics]
pub async fn start_closing_position(
&self,
conn: &mut PgConnection,
Expand Down Expand Up @@ -567,7 +564,6 @@ impl Node {
Ok(channel_details)
}

#[autometrics]
pub fn process_incoming_dlc_messages(&self) {
if !self
.inner
Expand Down
3 changes: 1 addition & 2 deletions coordinator/src/orderbook/trading.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use anyhow::anyhow;
use anyhow::bail;
use anyhow::Context;
use anyhow::Result;
use autometrics::autometrics;
use bitcoin::secp256k1::PublicKey;
use bitcoin::Network;
use bitcoin::XOnlyPublicKey;
Expand Down Expand Up @@ -276,7 +275,7 @@ pub async fn process_new_order(
/// The caller is expected to provide a list of `opposite_direction_orders` of [`OrderType::Limit`]
/// and opposite [`Direction`] to the `market_order`. We nevertheless ensure that this is the case
/// to be on the safe side.
#[autometrics]
fn match_order(
market_order: &Order,
opposite_direction_orders: Vec<Order>,
Expand Down
Loading

0 comments on commit 82255a7

Please sign in to comment.