pub enum MetricNamespace {
Sessions,
Transactions,
Spans,
Custom,
Stats,
Unsupported,
}
Expand description
The namespace of a metric.
Namespaces allow to identify the product entity that the metric got extracted from, and identify the use case that the metric belongs to. These namespaces cannot be defined freely, instead they are defined by Sentry. Over time, there will be more namespaces as we introduce new metrics-based functionality.
§Parsing
Parsing a metric namespace from strings is infallible. Unknown strings are mapped to
MetricNamespace::Unsupported
. Metrics with such a namespace will be dropped.
§Ingestion
During ingestion, the metric namespace is validated against a list of known and enabled namespaces. Metrics in disabled namespaces are dropped during ingestion.
At a later stage, namespaces are used to route metrics to their associated infra structure and enforce usecase-specific configuration.
Variants§
Sessions
Metrics extracted from sessions.
Transactions
Metrics extracted from transaction events.
Spans
Metrics extracted from spans.
Custom
User-defined metrics directly sent by SDKs and applications.
Stats
Metric stats.
Metrics about metrics.
Unsupported
An unknown and unsupported metric.
Metrics that Relay either doesn’t know or recognize the namespace of will be dropped before
aggregating. For instance, an MRI of c:something_new/foo@none
has the namespace
something_new
, but as Relay doesn’t support that namespace, it gets deserialized into
this variant.
Relay currently drops all metrics whose namespace ends up being deserialized as
unsupported
. We may revise that in the future.
Implementations§
Trait Implementations§
source§impl Clone for MetricNamespace
impl Clone for MetricNamespace
source§fn clone(&self) -> MetricNamespace
fn clone(&self) -> MetricNamespace
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MetricNamespace
impl Debug for MetricNamespace
source§impl<'de> Deserialize<'de> for MetricNamespace
impl<'de> Deserialize<'de> for MetricNamespace
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
source§impl Display for MetricNamespace
impl Display for MetricNamespace
source§impl FromStr for MetricNamespace
impl FromStr for MetricNamespace
source§impl Hash for MetricNamespace
impl Hash for MetricNamespace
source§impl Ord for MetricNamespace
impl Ord for MetricNamespace
source§fn cmp(&self, other: &MetricNamespace) -> Ordering
fn cmp(&self, other: &MetricNamespace) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for MetricNamespace
impl PartialEq for MetricNamespace
source§impl PartialOrd for MetricNamespace
impl PartialOrd for MetricNamespace
source§impl Serialize for MetricNamespace
impl Serialize for MetricNamespace
impl Copy for MetricNamespace
impl Eq for MetricNamespace
impl StructuralPartialEq for MetricNamespace
Auto Trait Implementations§
impl Freeze for MetricNamespace
impl RefUnwindSafe for MetricNamespace
impl Send for MetricNamespace
impl Sync for MetricNamespace
impl Unpin for MetricNamespace
impl UnwindSafe for MetricNamespace
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)