$exporter
$exporter : \Drupal\strata\Telemetry\OtlpExporter
Takes one reading of everything worth graphing, and exports it.
Every number here is already computed by something else; this class exists so there is one place that decides which of them are metrics and what they are called. A collector's dashboards are built against those names, so they are as much a public interface as a route is.
RPO lag is the one metric an operator should alert on. It is the age of the newest sealed commit, which is exactly how much work would be lost if the host died now. Every other metric describes the shape of the history; this one describes the risk.
A site with no history reports a lag of zero rather than the age of the epoch. A brand new install has lost nothing, and a graph starting at fifty years of lag would be alerted on immediately.
$exporter : \Drupal\strata\Telemetry\OtlpExporter
$commits : \Drupal\strata\Tree\CommitIndex
$frames : \Drupal\strata\Cas\FrameIndexInterface
$journal : \Drupal\strata\Journal\JournalInterface
$ledger : \Drupal\strata\Health\HealthLedgerInterface
$stats : ?\Drupal\strata\Storage\ProviderStats
__construct(\Drupal\strata\Telemetry\OtlpExporter $exporter, \Drupal\strata\Tree\CommitIndex $commits, \Drupal\strata\Cas\FrameIndexInterface $frames, \Drupal\strata\Journal\JournalInterface $journal, \Drupal\strata\Health\HealthLedgerInterface $ledger, \Drupal\Component\Datetime\TimeInterface $time, \Drupal\strata\Storage\ProviderStats|null $stats = null) : mixed
Constructs a pass.
| \Drupal\strata\Telemetry\OtlpExporter | $exporter | Where the readings go. |
| \Drupal\strata\Tree\CommitIndex | $commits | Supplies the head and the operation counts. |
| \Drupal\strata\Cas\FrameIndexInterface | $frames | Supplies the store totals. |
| \Drupal\strata\Journal\JournalInterface | $journal | Supplies what is captured and not yet flushed. |
| \Drupal\strata\Health\HealthLedgerInterface | $ledger | Supplies open findings by severity. |
| \Drupal\Component\Datetime\TimeInterface | $time | Measures the lag. |
| \Drupal\strata\Storage\ProviderStats|null | $stats | Request counts and latencies from this process, or NULL when the provider is not recording. |
run(\Drupal\strata\Telemetry\Tracer|null $tracer = null) : \Drupal\strata\Telemetry\MetricSet
Takes a reading and exports it.
| \Drupal\strata\Telemetry\Tracer|null | $tracer | A tracer to drain alongside the metrics, or NULL to export metrics only. |
What was read, whether or not the export landed.
findingsBySeverity() : array<string,int>
How many findings are open at each severity.
Every severity is reported, including the ones at zero. A gauge that disappears when it reaches zero leaves a collector holding the last non-zero value, so a resolved error keeps alerting.
Severity name keyed to count.