Enum MetricNamespace
pub enum MetricNamespace {
Sessions,
Transactions,
Spans,
Custom,
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.
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§
§impl MetricNamespace
impl MetricNamespace
pub fn all() -> [MetricNamespace; 5]
pub fn all() -> [MetricNamespace; 5]
Returns all namespaces/variants of this enum.
Trait Implementations§
§impl Clone for MetricNamespace
impl Clone for MetricNamespace
§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 more§impl Debug for MetricNamespace
impl Debug for MetricNamespace
§impl<'de> Deserialize<'de> for MetricNamespace
impl<'de> Deserialize<'de> for MetricNamespace
§fn deserialize<D>(
deserializer: D,
) -> Result<MetricNamespace, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<MetricNamespace, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
§impl Display for MetricNamespace
impl Display for MetricNamespace
§impl FromStr for MetricNamespace
impl FromStr for MetricNamespace
§type Err = ParseMetricError
type Err = ParseMetricError
§fn from_str(
ns: &str,
) -> Result<MetricNamespace, <MetricNamespace as FromStr>::Err>
fn from_str( ns: &str, ) -> Result<MetricNamespace, <MetricNamespace as FromStr>::Err>
s to return a value of this type. Read more§impl Hash for MetricNamespace
impl Hash for MetricNamespace
§impl Ord for MetricNamespace
impl Ord for MetricNamespace
§impl PartialEq for MetricNamespace
impl PartialEq for MetricNamespace
§impl PartialOrd for MetricNamespace
impl PartialOrd for MetricNamespace
§impl Serialize for MetricNamespace
impl Serialize for MetricNamespace
§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.