Skip to content

Route providers to consume Stats from common compat provider#61812

Open
amoghrajesh wants to merge 3 commits intoapache:mainfrom
astronomer:sdk-compat-stats
Open

Route providers to consume Stats from common compat provider#61812
amoghrajesh wants to merge 3 commits intoapache:mainfrom
astronomer:sdk-compat-stats

Conversation

@amoghrajesh
Copy link
Contributor


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Ref comment: #53722 (comment)

Add Stats/DualStatsManager compat and route providers through common.compat


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

Comment on lines -1193 to -1197
input:
title: Input
ctx:
type: object
title: Context
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My pre commit hook did it, not sure why tbh

@amoghrajesh
Copy link
Contributor Author

cc @xBis7

try:
from airflow.sdk._shared.observability.metrics.dual_stats_manager import DualStatsManager

DualStatsManager.incr("edge_worker.ti.start", tags=tags)
Copy link
Contributor

@xBis7 xBis7 Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have we verified that the airflow.providers.common.compat.sdk will raise an import error is the DualStatsManager can't be imported?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the import itself from airflow.providers.common.compat.sdk import DualStatsManager, will raise the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants