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 more