Skip to content

Add REST API metrics#64523

Open
henry3260 wants to merge 2 commits intoapache:mainfrom
henry3260:add-metrics-in-rest-api
Open

Add REST API metrics#64523
henry3260 wants to merge 2 commits intoapache:mainfrom
henry3260:add-metrics-in-rest-api

Conversation

@henry3260
Copy link
Copy Markdown
Contributor

@henry3260 henry3260 commented Mar 31, 2026

What

adds REST API instrumentation using Airflow's existing metrics abstraction.

Changes included:

  • Added basic API metrics emission in HttpAccessLogMiddleware.
  • Emit api.requests, api.request.duration, and api.request.errors for /api/v2 and /ui requests.
  • Added low-cardinality metric tags: api_surface, method, route, status_code, and status_family.

related: #56034

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

  • 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, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@boring-cyborg boring-cyborg bot added the area:API Airflow's REST/HTTP API label Mar 31, 2026
@henry3260 henry3260 force-pushed the add-metrics-in-rest-api branch from 4233a57 to 75bbd10 Compare March 31, 2026 14:30
@henry3260
Copy link
Copy Markdown
Contributor Author

cc @pierrejeambrun

@henry3260 henry3260 force-pushed the add-metrics-in-rest-api branch from 75bbd10 to d18b47b Compare March 31, 2026 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant