Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix doc links
  • Loading branch information
emschwartz committed May 16, 2023
commit f29aae1c3a5c73f42a7b5ed7df881b560a99434d
5 changes: 3 additions & 2 deletions autometrics/src/labels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,12 @@ impl_trait_for_types!(GetStaticStr);
/// The macro uses the autoref specialization trick through spez to get the labels for the type in a variety of circumstances.
/// Specifically, if the value is a Result, it will add the ok or error label accordingly unless one or both of the types that
/// the Result<T, E> is generic over implements the GetLabels trait. The label allows to override the inferred label, and the
/// [`ResultLabels`](crate::result_labels) macro implements the GetLabels trait for the user using annotations.
/// [`ResultLabels`](crate::ResultLabels) macro implements the GetLabels trait for the user using annotations.
///
/// The macro is meant to be called with a reference as argument: `get_result_labels_for_value(&return_value)`
///
/// Ref: https://github.com/dtolnay/case-studies/blob/master/autoref-specialization/README.md
/// See: <https://github.com/dtolnay/case-studies/blob/master/autoref-specialization/README.md>
#[doc(hidden)]
#[macro_export]
macro_rules! get_result_labels_for_value {
($e:expr) => {{
Expand Down
1 change: 1 addition & 0 deletions autometrics/src/tracker/prometheus_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ static REGISTRY_AND_METRICS: Lazy<(Registry, Metrics)> = Lazy::new(|| {
},
)
});
/// The [`Registry`] used to collect metrics when the `prometheus-client` feature is enabled
pub static PROMETHEUS_CLIENT_REGISTRY: Lazy<&Registry> = Lazy::new(|| &REGISTRY_AND_METRICS.0);

struct Metrics {
Expand Down