Skip to content

Conversation

@o-nikolas
Copy link
Contributor

This metric was intentionally disabled during AIP-66 development. These changes bring the metric back using relative_fileloc instead of dag_path.file


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

  • 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.

This metric was intentionally disabled during AIP-66 development. These
changes bring the metric back using relative_fileloc instead of
dag_path.file
@o-nikolas
Copy link
Contributor Author

@jedcunningham As the original author, can you have a look at this one? Specifically curious to hear your thoughts on using relative_fileloc here. Thanks!

if relative_fileloc is not None and stat.last_duration is not None:
file_name = Path(relative_fileloc).stem
Stats.timing(f"dag_processing.last_duration.{file_name}", stat.last_duration)
Stats.timing("dag_processing.last_duration", stat.last_duration, tags={"file_name": file_name})
Copy link
Member

Choose a reason for hiding this comment

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

I know this doesn’t really matter in practice, but would it be better to log {"file_name": None} instead of not logging at all?

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