Skip to content

Add a Quart integration#1248

Merged
sl0thentr0py merged 2 commits intogetsentry:masterfrom
pgjones:master
Jan 3, 2022
Merged

Add a Quart integration#1248
sl0thentr0py merged 2 commits intogetsentry:masterfrom
pgjones:master

Conversation

@pgjones
Copy link
Copy Markdown
Contributor

@pgjones pgjones commented Nov 14, 2021

This is based on the Flask integration but includes background and
websocket exceptions, and works with asgi.

Note I think the background task exception monitoring and Quart-Auth integration make this more useful than the ASGI middleware alone.

If this is welcomed I'm happy to write the tests (based on the Flask ones).

@AbhiPrasad AbhiPrasad requested review from a team, lobsterkatie and sl0thentr0py and removed request for a team November 15, 2021 18:29
@AbhiPrasad
Copy link
Copy Markdown
Contributor

Awesome, thank you for your contribution! You might have to rebase because we fixed some broken tests on master.

I think we'll need some tests if we want to get this merged, but more than happy to provide you with any assistance you need writing them. Once that's in a good place, we can also update the Sentry docs to link to this!

Copy link
Copy Markdown
Member

@sl0thentr0py sl0thentr0py left a comment

Choose a reason for hiding this comment

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

just one minor comment for now since @AbhiPrasad already reviewed

Copy link
Copy Markdown
Contributor

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

Awesome looking great. Do you also mind also adding docs for quart in https://github.com/getsentry/sentry-docs/tree/master/src/platforms/python/guides? We can then mention the 0.16.1 version requirement, as well as what SDK version it's available in.

As an example, see what we do for Sanic: https://github.com/getsentry/sentry-docs/blob/master/src/platforms/python/guides/sanic/index.mdx

_AUTO_ENABLING_INTEGRATIONS = (
"sentry_sdk.integrations.django.DjangoIntegration",
"sentry_sdk.integrations.flask.FlaskIntegration",
"sentry_sdk.integrations.quart.QuartIntegration",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure we want Quart to be auto enabling quite yet, we can turn it on later based on user feedback. For now let's leave it off?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Should I remove all the tests for the auto integration as well?

@pgjones
Copy link
Copy Markdown
Contributor Author

pgjones commented Nov 29, 2021

I've added documentation, getsentry/sentry-docs#4444.

@AbhiPrasad
Copy link
Copy Markdown
Contributor

Thank @pgjones. We haven't had the time to look at this recently, but it's on our radar and we really want to see it merged! Will do another review soon, thanks for your patience :)

@sl0thentr0py
Copy link
Copy Markdown
Member

Hey @pgjones, many apologies for taking so long on this. I'm in for merging this now.

  • let's disable auto-enabling and remove the auto tests as discussed above
  • not sure what to do about the request body TODO, I'm fine with enhancing the request parsing in a later iteration

@pgjones
Copy link
Copy Markdown
Contributor Author

pgjones commented Jan 3, 2022

I've disabled the auto integration as an additional commit, which will make it easier to revert when desired.

This is based on the Flask integration but includes background and
websocket exceptions, and works with asgi.
This can be reverted when the integration is considered stable.
@sl0thentr0py
Copy link
Copy Markdown
Member

Thanks a lot @pgjones for the contribution and for your patience!
master is failing again due to an unrelated sanic issue, so I'll merge this and handle that separately.

@sl0thentr0py sl0thentr0py merged commit 2246620 into getsentry:master Jan 3, 2022
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.

4 participants