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
7 changes: 4 additions & 3 deletions prometric-derive/src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(_) => {
Expand Down Expand Up @@ -581,13 +582,13 @@ pub fn expand(metrics_attr: MetricsAttr, input: &mut ItemStruct) -> Result<Token

let mut output = quote! {
#vis struct #builder_name<'a> {
registry: &'a ::prometheus::Registry,
registry: &'a ::prometric::prometheus::Registry,
labels: ::std::collections::HashMap<String, String>,
}

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
}
Expand Down
3 changes: 3 additions & 0 deletions prometric/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
Expand Down