Skip to content

feat: grafana loki backend#64510

Closed
EvertonSA wants to merge 9 commits intoapache:mainfrom
EvertonSA:feature/grafana-loki
Closed

feat: grafana loki backend#64510
EvertonSA wants to merge 9 commits intoapache:mainfrom
EvertonSA:feature/grafana-loki

Conversation

@EvertonSA
Copy link
Copy Markdown
Contributor

@EvertonSA EvertonSA commented Mar 30, 2026

loki remote logging, partially resolves #64639

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

Generated by Gemini 3.1 Pro with Antigravity.


  • 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.

@kaxil kaxil requested a review from Copilot April 2, 2026 00:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new Grafana provider integration to support Grafana Loki as a remote logging backend in Airflow, including packaging/workspace registration.

Changes:

  • Registers apache-airflow-providers-grafana in the workspace and adds a grafana extra.
  • Introduces a Loki remote log IO + task handler implementation to upload/read task logs via Loki’s HTTP API.
  • Adds unit tests validating upload cleanup behavior, label cardinality strategy, and generated LogQL.

Reviewed changes

Copilot reviewed 11 out of 14 changed files in this pull request and generated 12 comments.

File Description
uv.lock Adds the Grafana provider package to the lock/workspace metadata and updates extras/dependency markers.
pyproject.toml Registers the new provider, adds grafana extra + mypy paths, and adjusts a couple of provider extra markers.
providers/grafana/src/airflow/providers/grafana/loki/log/loki_task_handler.py Implements LokiRemoteLogIO and LokiTaskHandler for Loki push/query and Airflow logging integration.
providers/grafana/tests/unit/grafana/loki/log/test_loki_task_handler.py Adds unit tests for Loki upload and query behavior.

@EvertonSA EvertonSA marked this pull request as ready for review April 2, 2026 18:04
@EvertonSA EvertonSA marked this pull request as draft April 2, 2026 18:09
@EvertonSA EvertonSA marked this pull request as draft April 2, 2026 18:09
@EvertonSA
Copy link
Copy Markdown
Contributor Author

closing in favor of sidecar strategy

@EvertonSA EvertonSA closed this Apr 2, 2026
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.

Airflow and Grafana ecosystem

2 participants