Expand description
Shared metrics recorder traits and subsystem registration primitives.
Applications often share the same infrastructure metrics while exposing different product-domain metrics. This crate keeps the common recorder surface small and provides a instance-owned provider so each subsystem can register the metrics it owns without forcing every product-specific method into a single shared trait. Concrete backends are selected once at the product entrypoint through Forge feature flags, so business modules record metric semantics without depending on exporter crates.
Macros§
- product_
metrics - Declare one typed schema and register it atomically against an explicit provider.
Structs§
- DbQuery
Metric - Product-neutral database query metric emitted by database adapters.
- Infrastructure
Metrics Recorder - Metric
Descriptor - Static metric descriptor registered by a subsystem.
- Metric
Handle - Metrics
Limits - Limits apply to each instance and cannot be overridden by SDK environment variables.
- Metrics
Provider - Clones share one instance; instruments always remain bound to their original instance.
- Metrics
Provider Builder - Builder with independent pull and push capabilities. No global SDK provider is installed.
- Metrics
Resource - Bounded deployment identity, separate from instrument labels and product IDs.
- Noop
DbMetrics - Metrics recorder that ignores every database query.
- Noop
Metrics - Metrics recorder that ignores every event.
- Otlp
Export Diagnostics - This snapshot is local and remains readable when the push destination fails.
- Otlp
Export Snapshot - Otlp
Metrics Config - Credentials and endpoint are deliberately omitted from Debug and errors.
- Product
Counter - Product
Gauge - Product
Histogram
Enums§
- DbMetric
Backend - Normalized database backend label used by infrastructure metrics.
- DbQuery
Kind - Normalized database query kind used by infrastructure metrics.
- Metric
Error - Stable, deliberately redacted errors: never contain labels or exporter credentials.
- Metric
Kind - Kind of metric described by a subsystem.
Traits§
- DbMetrics
Recorder - Minimal metrics hook used by database connection helpers.
- Metrics
Recorder - Application-wide metrics recorder interface.
Type Aliases§
- Metric
Result - Shared
DbMetrics Recorder - Shared trait object for database metrics recorders.
- Shared
Metrics Recorder - Shared trait object for application metrics recorders.