diff --git a/prometric-derive/src/expand.rs b/prometric-derive/src/expand.rs index 8855461..03e688a 100644 --- a/prometric-derive/src/expand.rs +++ b/prometric-derive/src/expand.rs @@ -364,7 +364,8 @@ impl MetricBuilder { if let Some(buckets_expr) = self.partitions.buckets() { doc_builder.push_str(&format!("\n* Buckets: {}", quote! { #buckets_expr })); } else { - doc_builder.push_str("\n* Buckets: [`::prometheus::DEFAULT_BUCKETS`]"); + doc_builder + .push_str("\n* Buckets: [`::prometric::prometheus::DEFAULT_BUCKETS`]"); } } MetricType::Summary(_) => { @@ -581,13 +582,13 @@ pub fn expand(metrics_attr: MetricsAttr, input: &mut ItemStruct) -> Result { - registry: &'a ::prometheus::Registry, + registry: &'a ::prometric::prometheus::Registry, labels: ::std::collections::HashMap, } impl<'a> #builder_name<'a> { /// Set the registry to use for the metrics. - #vis fn with_registry(mut self, registry: &'a prometheus::Registry) -> Self { + #vis fn with_registry(mut self, registry: &'a ::prometric::prometheus::Registry) -> Self { self.registry = registry; self } diff --git a/prometric/src/lib.rs b/prometric/src/lib.rs index 4a9d757..e5c832c 100644 --- a/prometric/src/lib.rs +++ b/prometric/src/lib.rs @@ -27,6 +27,9 @@ pub mod summary; #[cfg(feature = "summary")] pub use summary::*; +#[doc(hidden)] +pub use prometheus; + /// Sealed trait to prevent outside code from implementing the metric types. mod private { pub trait Sealed {}