pub trait Compat {
fn time_duration_with_tags<'a>(
&'a self,
key: &'a str,
val: Duration
) -> MetricBuilder<'_, '_, Timer>;
fn gauge_f64_with_tags<'a>(
&'a self,
key: &'a str,
val: f64
) -> MetricBuilder<'_, '_, Gauge>;
fn mark_with_tags<'a>(
&'a self,
key: &'a str
) -> MetricBuilder<'_, '_, Meter>;
fn histogram_duration_with_tags<'a>(
&'a self,
key: &'a str,
val: Duration
) -> MetricBuilder<'_, '_, Histogram>;
fn time_duration(&self, key: &str, val: Duration) -> MetricResult<Timer> { ... }
fn gauge_f64(&self, key: &str, val: f64) -> MetricResult<Gauge> { ... }
fn mark(&self, key: &str) -> MetricResult<Meter> { ... }
fn histogram_duration(
&self,
key: &str,
val: Duration
) -> MetricResult<Histogram> { ... }
}
Expand description
Backwards compatibility shim for removed and deprecated methods.
To allow people time to migrate, the removed methods are implemented here. These methods should be considered deprecated and not viable to use long-term (this trait will be removed in a future release).
For more information about how to migrate away from the methods in this
trait, see the MIGRATION.md
file in the root of the repository.
Required Methods
👎 Deprecated:
Use client.time_with_tags(key, val)
👎 Deprecated:
Use client.gauge_with_tags(key, val)
👎 Deprecated:
Use client.meter_with_tags(key, 1)
👎 Deprecated:
Use client.histogram_with_tags(key, val)
Provided Methods
fn time_duration(&self, key: &str, val: Duration) -> MetricResult<Timer>
fn time_duration(&self, key: &str, val: Duration) -> MetricResult<Timer>
👎 Deprecated:
Use client.time(key, val)
👎 Deprecated:
Use client.gauge(key, val)
fn mark(&self, key: &str) -> MetricResult<Meter>
fn mark(&self, key: &str) -> MetricResult<Meter>
👎 Deprecated:
Use client.meter(key, 1)
fn histogram_duration(
&self,
key: &str,
val: Duration
) -> MetricResult<Histogram>
fn histogram_duration(
&self,
key: &str,
val: Duration
) -> MetricResult<Histogram>
👎 Deprecated:
Use client.histogram(key, val)