Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choosing the right metric_type mapping and aggregator function for the Airflow dashboard's scheduler.heartbeat field in the context of TSDB. #7504

Open
ritalwar opened this issue Aug 23, 2023 · 2 comments
Assignees
Labels

Comments

@ritalwar
Copy link
Contributor

Previously, the sum aggregator function was used to display scheduler.heartbeat in the Airflow dashboard before TSDB integration. Although the sum aggregator isn't ideal for representing this field, it was switched to max to address visualization issues. This was done as sum, avg aggregators, etc., do not align well with counter fields.
It's required to update an appropriate aggregator to accurately represent this field in TSDB-enabled mode too.

@ritalwar
Copy link
Contributor Author

This PR is updating the metric_type of airflow.scheduler.heartbeat from counter to gauge. While the field is designated as a counter in the airflow documentation, the behaviour of the values—consistently 1 or 2—suggests it aligns better with the characteristics of a gauge metric.

Additionally, dashboard is modified to accurately represent this data, with the aggregator function updated to use last_value.

We will keep an eye on this issue and revisit it if any changes in behavior are observed or if updates become necessary in the future.

@ritalwar ritalwar assigned agithomas and ritalwar and unassigned ritalwar and agithomas Aug 28, 2023
@ritalwar ritalwar changed the title Choosing the right aggregator for the Airflow dashboard's scheduler.heartbeat field in the context of TSDB. Choosing the right metric_type mapping and aggregator function for the Airflow dashboard's scheduler.heartbeat field in the context of TSDB. Sep 6, 2023
@ritalwar
Copy link
Contributor Author

ritalwar commented Sep 6, 2023

Following discussions in this PR, leaving this issue open to prevent conflicts with the airflow documentation. We've opted not to assign any metric_type mapping for the 'airflow.scheduler.heartbeat' field. However, we have updated the aggregator function to use 'last_value' for data visualization.

We'll maintain this issue in our backlog for future review, especially if there are changes in the documentation or data related to this field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants