Skip to content

feat(integrations): Add Lilya integration#6801

Closed
tarsil wants to merge 1 commit into
getsentry:masterfrom
tarsil:feat/llilya-support
Closed

feat(integrations): Add Lilya integration#6801
tarsil wants to merge 1 commit into
getsentry:masterfrom
tarsil:feat/llilya-support

Conversation

@tarsil

@tarsil tarsil commented Jul 12, 2026

Copy link
Copy Markdown

Description

Add first-class Lilya framework integration with automatic ASGI instrumentation, route-based transaction names, handled HTTP exception capture, request data extraction, authenticated user propagation, and optional middleware spans.

The integration uses Lilya-native hooks only, registers the lilya extra and typing dependency, and adds generated tox/CI coverage for Lilya 0.27.0.

Validated with:

  • uv run tox -e py3.14-lilya-v0.27.0
  • uv run tox -e py3.14-lilya-latest
  • uv run ruff check sentry_sdk/integrations/lilya.py sentry_sdk/integrations/asgi.py tests/integrations/lilya/test_lilya.py
  • uv run ruff format --check sentry_sdk/integrations/lilya.py sentry_sdk/integrations/asgi.py tests/integrations/lilya/test_lilya.py

@tarsil
tarsil requested a review from a team as a code owner July 12, 2026 12:39
Comment thread sentry_sdk/integrations/lilya.py Outdated
Comment thread sentry_sdk/integrations/lilya.py
Comment thread sentry_sdk/integrations/lilya.py Outdated
@tarsil
tarsil force-pushed the feat/llilya-support branch from 8b3f11b to 881d8e9 Compare July 12, 2026 12:51
Comment thread sentry_sdk/integrations/lilya.py Outdated
Comment thread sentry_sdk/integrations/lilya.py Outdated
Comment thread sentry_sdk/integrations/lilya.py
@tarsil
tarsil force-pushed the feat/llilya-support branch from 881d8e9 to dc867d5 Compare July 12, 2026 13:02
Comment thread sentry_sdk/integrations/lilya.py Outdated
Comment thread sentry_sdk/integrations/lilya.py Outdated
Comment thread sentry_sdk/integrations/asgi.py Outdated
@tarsil
tarsil force-pushed the feat/llilya-support branch from dc867d5 to a372751 Compare July 12, 2026 13:25
Comment thread sentry_sdk/integrations/lilya.py
Comment thread sentry_sdk/integrations/lilya.py
@tarsil
tarsil force-pushed the feat/llilya-support branch from a372751 to cc83058 Compare July 12, 2026 13:34
Comment thread sentry_sdk/integrations/lilya.py Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit cc83058. Configure here.

Comment thread sentry_sdk/integrations/lilya.py Outdated
Add first-class Lilya framework instrumentation for route transaction names, request data, handled HTTP exceptions, authenticated users, and middleware spans.

Add end-to-end Lilya integration tests plus generated tox and CI matrix entries.
@tarsil
tarsil force-pushed the feat/llilya-support branch from cc83058 to c8fa784 Compare July 12, 2026 13:50
@tarsil tarsil changed the title feat(lilya): Add Lilya integration feat(integrations): Add Lilya integration Jul 13, 2026
@tarsil

tarsil commented Jul 13, 2026

Copy link
Copy Markdown
Author

@sl0thentr0py apologies for tagging you but I don't want this to get lost here since this is a framework that is actually being used by some financial institutions worldwide and I always workaround to make it work but it would be great if we could natively have this in sentry?

@ericapisani

Copy link
Copy Markdown
Member

Hi @tarsil , thanks for opening a pull request with us.

The team is currently heads down on completing a couple of projects this week, so we won't be able to review this immediately. For new frameworks, we also do additional evaluations given the team will be responsible for maintaining it after its introduction to the SDK, so we need time to do that as well.

However, can you give us more context on the workarounds that you've been doing so far? We might be able to figure something out so that it makes yours/your customer's lives a bit easier with configuring Sentry and Lilya.

@tarsil

tarsil commented Jul 14, 2026

Copy link
Copy Markdown
Author

Hi @tarsil , thanks for opening a pull request with us.

The team is currently heads down on completing a couple of projects this week, so we won't be able to review this immediately. For new frameworks, we also do additional evaluations given the team will be responsible for maintaining it after its introduction to the SDK, so we need time to do that as well.

However, can you give us more context on the workarounds that you've been doing so far? We might be able to figure something out so that it makes yours/your customer's lives a bit easier with configuring Sentry and Lilya.

Hi @ericapisani, thank you for your reply.

The project is not new, we simply didn't hype it but its used a lot and maintained by Dymmond, a UK company.

The workaround is basically see how Starlette uses it since it shares the ASGI principle and "copy" the integration to adapt to Lilya.

@ericapisani

Copy link
Copy Markdown
Member

Hi again @tarsil ,

Thanks for taking the time to put this together — we really do appreciate the effort that went into this PR.

I've had a chance to talk it over with the team, and we've decided not to bring on Lilya as a first-class integration in Sentry's Python SDK at this time. It's less about the framework itself and more about where we are as a team: with Lilya's current download numbers, we don't think we can commit to the ongoing maintenance an official integration requires, and we'd rather not add something we can't properly support long-term.

That said, this doesn't stop the integration from existing — if you wanted to open-source a Lilya integration yourself, we'd be glad to see it, and it's the kind of thing you could share directly with the Lilya and Sentry communities.

One thing for next time: our contributing guidelines ask that changes like this start with an issue and a quick conversation with a maintainer before you dive in. It's a small step that can save you the work of building out a full PR before we've had a chance to weigh in on scope or maintenance fit.

Thanks again for the contribution — it's genuinely appreciated even though we can't take this one on.

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