-
-
Notifications
You must be signed in to change notification settings - Fork 379
GSK-1963: ignore mixpanel errors #1502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GSK-1963: ignore mixpanel errors #1502
Conversation
GSK-1963 Swallow Mixpanel errors when they happen
If mixpanel doesn't work we shouldn't interrupt users |
| return self._track(event_name, properties=properties, meta=meta, force=force) | ||
|
|
||
| @threaded | ||
| @analytics_method |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remember correctly, this was removed to avoid infinite loops. Can we add a test to ensure that this is not happening (since _report_error has been removed in the decorator, this should be the case) and make sure we will not reintroduce this in the future?
EDIT: maybe the test that is present already covers this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was actually the presence of
_report_error(e, error_type="tracking error")
that was causing an infinite loop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added an extra test for analytics_method
| @@ -0,0 +1,9 @@ | |||
| from mixpanel import Consumer | |||
|
|
|||
| from utils.analytics_collector import GiskardAnalyticsCollector | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| from utils.analytics_collector import GiskardAnalyticsCollector | |
| from tests.utils.analytics_collector import GiskardAnalyticsCollector |
|
@andreybavt I fixed the import, but the test is broken. Could you check? |
…l-errors-when-they-happen' into feature/gsk-1963-swallow-mixpanel-errors-when-they-happen
|
@mattbit the test should be fine now. It was caused by the way we run tests from pdm (by disabling analytics). That's why I wasn't having it locally (by running pytest directly) |
|
Kudos, SonarCloud Quality Gate passed! |








No description provided.