Rename dag serialization metrics. - #70838
Open
Ei-Sandi wants to merge 1 commit into
Open
Conversation
Ei-Sandi
requested review from
XD-DENG,
amoghrajesh,
ashb and
potiuk
as code owners
July 31, 2026 15:36
1 task
SameerMesiah97
left a comment
Contributor
There was a problem hiding this comment.
Looks good.
I think this does need a newsfragment as you are adding a new metric. At least, that was what a maintainer asked for when reviewing 2 recent PRs of mine that were adding new metrics to the Triggerer.
Ei-Sandi
force-pushed
the
rename-dag-serialisation-metrics
branch
from
August 1, 2026 21:37
8d97d93 to
b6f6473
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow-up to #68906, which added a single
dag.serialization_writescounter emitted from two different branches ofSerializedDagModel.write_dag. Sharing one name means the metric can't distinguish the two ways a Dag gets serialized, and they have very different consequences:DagVersionrow is inserted — unbounded growth acrossdag_version,dag_codeandserialized_dagDagVersionis overwritten in place — bounded churn on a single rowA Dag that re-serializes on every parse (for example one whose template holds a callable, with no actual change to the Dag) shows up in either path depending on whether its current version has task instances, but only the first grows the metadata DB. Splitting the counter lets the two be alerted on with different thresholds.
dag.serialization_writesis replaced by:dag.serialization.version_createddag.serialization.version_updatedThe metric has not been released yet, so there is no deprecation path and no newsfragment.
The paths that write no serialized data — a bundle-metadata refresh, or a parse where nothing changed — are still uncounted.
related: #68906
Was generative AI tooling used to co-author this PR?
Co-authored-by: [Claude Opus 5] following the guidelines
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.