Skip to content

feat: use content-type provided by prometheus client, pin airflow 2.6.1 dependencies.#5

Merged
seruman merged 17 commits into
masterfrom
metrics-content-type
Apr 4, 2025
Merged

feat: use content-type provided by prometheus client, pin airflow 2.6.1 dependencies.#5
seruman merged 17 commits into
masterfrom
metrics-content-type

Conversation

@seruman
Copy link
Copy Markdown
Contributor

@seruman seruman commented Mar 17, 2025

Prometheus >= 3.2.1, seems to reject text content-type by default, unless fallback_scrape_protocol is given for the target. Instead of setting fallback on Prometheus, responding with correct/expected content-type would be better.

CONTENT_TYPE_LATEST = 'text/plain; version=0.0.4; charset=utf-8'

Error scraping target: received unsupported Content-Type "text" and no fallback_scrape_protocol specified for targe


  • Airflow 2.6.1 seems to not have upper bound for most of its dependencies, which some of them had breaking changes. Added an extra called airflow-2.6.1 to pin Airflow itself and add upper bounds to the dependencies causing issues.
  • Removed explicit install of wtforms==2.3.3 on CI. Not sure why it was pinned but I think it makes more sense to let Airflow bring whatever version it needs.
  • Had to add airflow dags reserialize on CI to make sure DAGs are serialized in to database. Not sure how it was working before. On locally, unless I run scheduler as daemon DAGs are not serialized causing airflow dags unpause <dagname> to fail with; DAG: <dagname> does not exist in 'dag' table. I think it also makes more sense to run reserialize explicitly to prepare environment.

@seruman seruman changed the title airflow_exporter: set metrics content-type to text/plain airflow_exporter: set metrics content-type to text/plain; version=0.0.4; charset=utf-8 Mar 17, 2025
@seruman seruman marked this pull request as draft March 17, 2025 11:07
@seruman seruman changed the title airflow_exporter: set metrics content-type to text/plain; version=0.0.4; charset=utf-8 airflow_exporter: use content-type provided by prometheus client to serve metrics Mar 19, 2025
@seruman seruman force-pushed the metrics-content-type branch from 3134a57 to 6b68e38 Compare April 4, 2025 08:40
@seruman seruman force-pushed the metrics-content-type branch from e6053e1 to 91ae420 Compare April 4, 2025 09:08
@seruman seruman changed the title airflow_exporter: use content-type provided by prometheus client to serve metrics airflow_exporter: use content-type provided by prometheus client, pin airflow 2.6.1 dependencies. Apr 4, 2025
@seruman seruman changed the title airflow_exporter: use content-type provided by prometheus client, pin airflow 2.6.1 dependencies. feat: use content-type provided by prometheus client, pin airflow 2.6.1 dependencies. Apr 4, 2025
@seruman seruman marked this pull request as ready for review April 4, 2025 11:42
@seruman seruman requested review from igungor and sonmezonur April 4, 2025 11:43
@seruman seruman merged commit df82f85 into master Apr 4, 2025
1 check passed
@seruman seruman deleted the metrics-content-type branch April 4, 2025 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants