Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

fix(sentry): configure sentry before app instantiation #258

Merged
merged 2 commits into from
Jan 19, 2023

Conversation

gazorby
Copy link
Collaborator

@gazorby gazorby commented Jan 18, 2023

The lib call sentry.configure as part of starlite's on_app_init hook, but as sentry integration patch Starlite.__init__ (and other stuff too), it does not take effect for the app being instantiated. So we must configure sentry early, before on_app_init to ensure sentry's monkeypatching will be used.

@gazorby gazorby requested a review from peterschutt January 18, 2023 11:47
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@peterschutt
Copy link
Member

Good catch! I've slightly refactored init_plugin module in #213, so may just need to rebase this on that once it is merged.

I'll create a 0.29 release branch and we can work into that.

@peterschutt peterschutt changed the base branch from main to 0.29 January 18, 2023 12:06
@peterschutt peterschutt force-pushed the fix/sentry-integration branch from 4c3f848 to 6818410 Compare January 19, 2023 01:35
@peterschutt peterschutt merged commit c9c8810 into 0.29 Jan 19, 2023
@peterschutt peterschutt deleted the fix/sentry-integration branch January 19, 2023 01:37
@peterschutt
Copy link
Member

Thanks again @gazorby !

peterschutt added a commit that referenced this pull request Jan 20, 2023
* 🐛 fix(sentry): call configure before starlite init

* chore: changes for rebase on 0.29

Co-authored-by: Peter Schutt <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants