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

[Airflow] Remove metric_type mapping for 'airflow.scheduler.heartbeat' field and adjust the dashboard to visualize this #7554

Merged
merged 4 commits into from
Sep 7, 2023

Conversation

ritalwar
Copy link
Contributor

@ritalwar ritalwar commented Aug 28, 2023

  • Bug

What does this PR do?

This PR modifies the metric_type of airflow.scheduler.heartbeat from counter to gauge. Despite the field being labeled as a counter in the airflow documentation, the behavior 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.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

Related issues

Screenshots

Screenshot 2023-08-28 at 11 40 39 AM Screenshot 2023-08-28 at 11 36 26 AM

@ritalwar ritalwar requested a review from a team as a code owner August 28, 2023 06:24
@elasticmachine
Copy link

elasticmachine commented Aug 28, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-09-06T11:46:14.840+0000

  • Duration: 14 min 27 sec

Test stats 🧪

Test Results
Failed 0
Passed 2
Skipped 0
Total 2

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-08-28T06:24:48.070+0000

  • Duration: 14 min 1 sec

Test stats 🧪

Test Results
Failed 0
Passed 2
Skipped 0
Total 2

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link

elasticmachine commented Aug 28, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (0/0) 💚
Files 100.0% (0/0) 💚
Classes 100.0% (0/0) 💚
Methods 25.0% (1/4) 👎 -75.0
Lines 100.0% (0/0) 💚
Conditionals 100.0% (0/0) 💚

@agithomas
Copy link
Contributor

@lalit-satapathy / @ritalwar , I want to propose a third option - not to mention either gauge / counter following the conflicted behaviour we noticed and what is documented. Yes, this would lead to not able to benefit TSDB advantages. We can create a backlog item for metric_type mapping of this field. As we get more clarity, the change to map either to gauge or counter can be made. Thoughts?

@agithomas
Copy link
Contributor

The advantage with the above approach is that the change (and thus the readme) don't contradict the official documentation of couchdb.

@ritalwar
Copy link
Contributor Author

ritalwar commented Sep 1, 2023

@lalit-satapathy / @ritalwar , I want to propose a third option - not to mention either gauge / counter following the conflicted behaviour we noticed and what is documented. Yes, this would lead to not able to benefit TSDB advantages. We can create a backlog item for metric_type mapping of this field. As we get more clarity, the change to map either to gauge or counter can be made. Thoughts?

I think we can go with this to avoid any conflicts and keep this issue open. However, let's keep this PR to stick with the 'last_value' as the aggregator function for this visualisation, as discussed. We'll put the metric_type mapping on hold for now. @lalit-satapathy , WDYT?

@ritalwar
Copy link
Contributor Author

ritalwar commented Sep 6, 2023

Following our discussion, I've removed the metric_type mapping for the 'scheduler.heartbeat' field and made the necessary updates to the dashboard, utilizing 'last_value' for visualizing this field's data. We can maintain the related issue as open to determine the appropriate metric_type mapping without conflicting with the documentation.

Screenshot 2023-09-06 at 4 40 24 PM Screenshot 2023-09-06 at 4 40 08 PM Screenshot 2023-09-06 at 4 39 10 PM

@ritalwar ritalwar changed the title [Airflow] Update metric_type mapping for field airflow.scheduler.heartbeat to gauge. [Airflow] Remove metric_type mapping for 'airflow.scheduler.heartbeat' field and adjust the dashboard to visualize this Sep 6, 2023
@ritalwar ritalwar self-assigned this Sep 6, 2023
Copy link
Contributor

@agithomas agithomas left a comment

Choose a reason for hiding this comment

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

LGTM!

@ritalwar ritalwar merged commit 5d02e7f into elastic:main Sep 7, 2023
4 checks passed
@elasticmachine
Copy link

Package airflow - 0.3.1 containing this change is available at https://epr.elastic.co/search?package=airflow

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

Successfully merging this pull request may close these issues.

4 participants