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

[bitnami/airflow] Metrics based on StatsD #30459

Merged
merged 8 commits into from
Nov 15, 2024

Conversation

juan131
Copy link
Contributor

@juan131 juan131 commented Nov 14, 2024

Description of the change

⚠️ MAJOR VERSION

This PR version replaces exposing Prometheus metrics using the Airflow prometheus exporter, that exposes metrics based on the data retrieved from the database, by configuring Airflow components to send StatsD metrics to the StatsD exporter that transforms them into Prometheus metrics. Find more information about this approach in the Apache Airflow official documentation.

Benefits

Follow upstream approach for exposing metrics.

Possible drawbacks

Dashboards based on old metrics won't be valid anymore.

Applicable issues

Additional information

N/A

Checklist

  • Chart version bumped in Chart.yaml according to semver. This is not necessary when the changes only affect README.md files.
  • Variables are documented in the values.yaml and added to the README.md using readme-generator-for-helm
  • Title of the pull request follows this pattern [bitnami/<name_of_the_chart>] Descriptive title
  • All commits signed off and in agreement of Developer Certificate of Origin (DCO)

@github-actions github-actions bot added airflow verify Execute verification workflow for these changes bitnami labels Nov 14, 2024
@github-actions github-actions bot requested a review from dgomezleon November 14, 2024 14:29
Signed-off-by: Bitnami Containers <[email protected]>
bitnami/airflow/README.md Outdated Show resolved Hide resolved
.vib/airflow/runtime-parameters.yaml Outdated Show resolved Hide resolved
@juan131 juan131 requested a review from javsalgar November 14, 2024 15:30
javsalgar
javsalgar previously approved these changes Nov 14, 2024
Copy link
Contributor

@javsalgar javsalgar left a comment

Choose a reason for hiding this comment

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

LGTM but the CI is failing

Signed-off-by: juan131 <[email protected]>
@juan131 juan131 requested a review from javsalgar November 15, 2024 07:49
Signed-off-by: Bitnami Containers <[email protected]>
Copy link
Member

@dgomezleon dgomezleon left a comment

Choose a reason for hiding this comment

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

LGTM

@juan131 juan131 merged commit 5c88481 into bitnami:main Nov 15, 2024
12 checks passed
@juan131 juan131 deleted the feat/airflow-statsd-metrics branch November 15, 2024 08:46
- name: airflow-exporter
image: docker.io/bitnami/airflow-exporter:0.20220314.0-debian-12-r51
- name: statsd-exporter
image: docker.io/bitnami/airflow-statsd:0.28.0-debian-12-r0
Copy link
Member

@carrodher carrodher Nov 17, 2024

Choose a reason for hiding this comment

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

Shouldn't this be docker.io/bitnami/statsd-exporter:0.28.0-debian-12-r0?
I though this is autogenerated by EAM, so not sure where this invalid airflow-statsd comes from

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 fault! Manually edited, fixing it on a new PR

sajad-sadra pushed a commit to sajad-sadra/bitnami-charts that referenced this pull request Nov 20, 2024
@sergiofteixeira
Copy link

sergiofteixeira commented Dec 11, 2024

got this enabled but still only get basic metrics such as :

garbage collection cycles. go_gc_duration_seconds{quantile="0"} 4.1798e-05 go_gc_duration_seconds{quantile="0.25"} 6.4768e-05 go_gc_duration_seconds{quantile="0.5"} 7.4839e-05 go_gc_duration_seconds{quantile="0.75"} 9.0782e-05 go_gc_duration_seconds{quantile="1"} 0.000147398 go_gc_duration_seconds_sum 0.000893869 go_gc_duration_seconds_count 11 statsd_metric_mapper_cache_length 0

etc, no airflow_ metrics, anything else im missing?

airflow.cfg has statsd enabled:

[metrics]
statsd_host=airflow-statsd-metrics
statsd_on=True
statsd_port=9125
statsd_prefix=airflow

Edit: found the issue, with network policies enabled, statsd cant collect metrics.

@JiffsMaverick
Copy link
Contributor

@sergiofteixeira I also faced this issue. Disabling the Network Policy helped me as well. The problem is related to the Network Policy configuration specifying the TCP protocol instead of UDP. I created a pull request (#30990) to fix this.

@sergiofteixeira
Copy link

@sergiofteixeira I also faced this issue. Disabling the Network Policy helped me as well. The problem is related to the Network Policy configuration specifying the TCP protocol instead of UDP. I created a pull request (#30990) to fix this.

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
airflow bitnami solved verify Execute verification workflow for these changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

airflow-exporter providing limited metrics. Enabling statsd metrics on Airflow Hem Chart
7 participants