The GitHub Actions job "Tests (AMD)" on 
airflow.git/otel-fork-metric-inheritance has succeeded.
Run started by GitHub user dstandish (triggered by dstandish).

Head commit for run:
fe367104b964641501b4c9f0121cbae60d60da8d / Daniel Standish 
<[email protected]>
Stop forked children exporting the OTel pipeline they inherited

A fork hands the child the parent's MeterProvider, and the SDK registers
register_at_fork(after_in_child=...) for every PeriodicExportingMetricReader, 
so the
child restarts the exporter thread behind that inherited pipeline. Nothing in 
the
child records to it, so it republishes the totals the parent held at the 
instant of
the fork -- once per export interval, for as long as the child lives. A 
consumer sees
two writers on one cumulative series: one climbing, one frozen.

Airflow forks constantly, and the long-lived children make it permanent rather 
than
momentary: LocalExecutor pool workers, the OpenLineage dag-state-change pool 
and the
scheduler's log and health-check servers all fork from a scheduler whose 
pipeline is
already live, then outlive many export cycles.

Setting the reader's shutdown event alone is not enough, because the ticker 
publishes
one last collection on its way out; dropping the collect callback keeps that 
final
pass from carrying the parent's totals with it. A child that emits metrics of 
its own
still builds its own pipeline, so this costs it nothing. The pipeline built from
OTEL_CONFIG_FILE is left alone: declarative configuration is the sole source of 
SDK
construction there, so a child has no way to rebuild what it would lose.

Report URL: https://github.com/apache/airflow/actions/runs/32192588555

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to