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 .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:
RUST_BACKTRACE: 1
RUSTFLAGS: -Dwarnings
RUSTDOCFLAGS: -Dwarnings
MSRV: "1.81"
MSRV: "1.85"
SCCACHE_CACHE_SIZE: "10G"
IROH_FORCE_STAGING_RELAYS: "1"

Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ members = ["iroh-metrics-derive"]
[package]
name = "iroh-metrics"
version = "0.36.2"
edition = "2021"
edition = "2024"
readme = "README.md"
description = "metrics for iroh"
license = "MIT OR Apache-2.0"
authors = ["arqu <[email protected]>", "n0 team"]
repository = "https://github.com/n0-computer/iroh-metrics"

# Sadly this also needs to be updated in .github/workflows/ci.yml
rust-version = "1.81"
rust-version = "1.85"

[lints.rust]
missing_debug_implementations = "warn"
Expand Down
4 changes: 2 additions & 2 deletions iroh-metrics-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "iroh-metrics-derive"
version = "0.3.1"
edition = "2021"
edition = "2024"
description = "derive macros for iroh-metrics"
license = "MIT OR Apache-2.0"
authors = ["Frando <[email protected]>", "n0 team"]
repository = "https://github.com/n0-computer/iroh-metrics"

# Sadly this also needs to be updated in .github/workflows/ci.yml
rust-version = "1.81"
rust-version = "1.85"

[lib]
proc-macro = true
Expand Down
4 changes: 2 additions & 2 deletions iroh-metrics-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use heck::ToSnakeCase;
use proc_macro::TokenStream;
use quote::quote;
use syn::{
meta::ParseNestedMeta, parse_macro_input, spanned::Spanned, Attribute, Data, DeriveInput,
Error, Expr, ExprLit, Fields, Ident, Lit, LitStr,
Attribute, Data, DeriveInput, Error, Expr, ExprLit, Fields, Ident, Lit, LitStr,
meta::ParseNestedMeta, parse_macro_input, spanned::Spanned,
};

#[proc_macro_derive(MetricsGroup, attributes(metrics, default))]
Expand Down
4 changes: 2 additions & 2 deletions src/base.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use std::{any::Any, sync::Arc};

use crate::{
Metric, MetricType, MetricValue,
encoding::EncodableMetric,
iterable::{FieldIter, IntoIterable, Iterable},
Metric, MetricType, MetricValue,
};

/// Trait for structs containing metric items.
Expand Down Expand Up @@ -120,9 +120,9 @@ mod tests {

use super::*;
use crate::{
Counter, Gauge, Histogram, MetricType, MetricsGroupSet, MetricsSource, Registry,
encoding::{Decoder, Encoder},
iterable::Iterable,
Counter, Gauge, Histogram, MetricType, MetricsGroupSet, MetricsSource, Registry,
};

#[derive(Debug, Iterable, Serialize, Deserialize)]
Expand Down
4 changes: 2 additions & 2 deletions src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ use std::{
fmt::{self, Write},
ops::Deref,
sync::{
atomic::{AtomicU64, Ordering},
Arc, RwLock,
atomic::{AtomicU64, Ordering},
},
};

use crate::{encoding::write_eof, Error, MetricsGroup, MetricsGroupSet};
use crate::{Error, MetricsGroup, MetricsGroupSet, encoding::write_eof};

/// A registry for [`MetricsGroup`].
#[derive(Debug, Default)]
Expand Down
4 changes: 2 additions & 2 deletions src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ use std::{
time::{Duration, Instant},
};

use hyper::{service::service_fn, Request, Response};
use hyper::{Request, Response, service::service_fn};
use tokio::{io::AsyncWriteExt as _, net::TcpListener};
use tracing::{debug, error, info, warn};

use crate::{parse_prometheus_metrics, Error, MetricsSource};
use crate::{Error, MetricsSource, parse_prometheus_metrics};

type BytesBody = http_body_util::Full<hyper::body::Bytes>;

Expand Down
2 changes: 1 addition & 1 deletion src/static_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
//! ```rust
//! use std::sync::Arc;
//!
//! use iroh_metrics::{inc, inc_by, static_core::Core, Counter, MetricsGroup};
//! use iroh_metrics::{Counter, MetricsGroup, inc, inc_by, static_core::Core};
//!
//! #[derive(Debug, Default, MetricsGroup)]
//! #[metrics(name = "my_metrics")]
Expand Down
Loading