filament. and every unit is
a UCUM code. The instrumentation scope is
github.com/galaxy-io/filament, versioned with the build.
Each process sets service.version to its build version and
service.instance.id to its hostname, so replicas export their own series.
OTEL_RESOURCE_ATTRIBUTES overrides either. No metric carries a tenant or a
run. Set a tenant for the whole deployment as a resource attribute, for example
OTEL_RESOURCE_ATTRIBUTES=io.getgalaxy.tenant.id=acme.
Attributes
An attribute that does not apply to a measurement is left off.
error.type is
set on filament.runs and filament.run.duration only when the status is
failed.
Prometheus names
Prometheus’s default OTLP translation replaces dots with underscores, appends the unit (_seconds, _bytes), and appends _total to counters. Units in
curly braces add no suffix. filament.run.duration becomes
filament_run_duration_seconds, filament.runs becomes
filament_runs_total, and filament.pipeline.id becomes
filament_pipeline_id.
Runs
The control plane records these as runs move through their lifecycle.filament.run.queue.duration has buckets from 0.1 seconds to an hour. It
measures runs that are not continuous. A run resumed from a pause keeps its
first start, so it is measured once.
Data read and written
The control plane counts the records of a run that is not continuous from the facts its worker publishes. That covers the records the source hands to the run, the records written, and the records dropped before the sink. A worker for such a run lives only as long as the run, so it counts nothing itself. A continuous run’s worker is long-lived and counts its own records.
Once a run has ended,
filament.source.records equals
filament.sink.records plus filament.records.rejected. A rejected record was
not written in that run and is read again by the next one. A record is read once
the pipeline queues it. Records a source produces for a resource after that
resource is quarantined are dropped before they are queued, so they count as
neither read nor rejected. Records a sink wrote and then aborted, such as a
failed run’s uncommitted writes, stay in filament.sink.records.
Schedules
The scheduler in the control plane records these.Webhooks
The server counts deliveries as it receives them. The control plane reports the inbox on each retention sweep, and workers count the deliveries they cannot read.Workers
Each worker samples its own pod on the heartbeat interval.Error types
error.type is one of a fixed set of values. _OTHER is a failure none of the
others describes.
Runs and rejected records
A rejected record takes the value of the failure that stopped it: its own
write or transform, its resource’s quarantine, or the run’s failure. Records
are rejected only once the pipeline holds them, so rejections use
source_read, schema_mismatch, transform, sink_write, internal,
timeout, canceled, and _OTHER.
Dispatch failures
Alerting
filament.pipeline.last_success.time is the freshness signal. Alert when the
current time minus its value passes the longest gap a pipeline may go without a
completed run. Each control plane replica reports the last run it saw, so take
the newest value for a pipeline.
filament.pipeline.last_failure.time is when a pipeline’s last run failed. A
pipeline whose newest failure is later than its newest success is failing now.
Counting with increase
A counter is first exported when it is first added to, and Prometheus’s
increase and rate cannot see the first value of a new series. The counters
with no attributes, and filament.dispatch.failures, are recorded at zero from
the start, so their increases are counted once that zero is exported. An event in
the first export interval after a process starts can still be missed.
A counter with filament.pipeline.id starts a series the first time something
happens to that pipeline, so increase misses the first event of each series.
For something rare, such as a failed run, that is most of them. To count over a
window, add the increase of the series that existed before it to the last value
of the series created inside it.