update mixpanel endpoint#2591
Conversation
There was a problem hiding this comment.
Code Review
This pull request configures the Mixpanel analytics collector to route events to the EU endpoint using a custom Consumer. The review feedback recommends applying this EU endpoint configuration only when not in development mode, as development events might otherwise be rejected if the development Mixpanel project is hosted in the US region.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| return Mixpanel( | ||
| GiskardAnalyticsCollector.dev_mp_project_key | ||
| if is_dev_mode | ||
| else GiskardAnalyticsCollector.prod_mp_project_key | ||
| else GiskardAnalyticsCollector.prod_mp_project_key, | ||
| consumer=Consumer(api_host="api-eu.mixpanel.com"), | ||
| ) |
There was a problem hiding this comment.
If is_dev_mode is enabled, the analytics collector uses dev_mp_project_key. If the development Mixpanel project is hosted in the US region (which is the default), routing its events to the EU endpoint (api-eu.mixpanel.com) will cause them to be rejected and lost. To prevent this, only apply the EU consumer when is_dev_mode is False.
| return Mixpanel( | |
| GiskardAnalyticsCollector.dev_mp_project_key | |
| if is_dev_mode | |
| else GiskardAnalyticsCollector.prod_mp_project_key | |
| else GiskardAnalyticsCollector.prod_mp_project_key, | |
| consumer=Consumer(api_host="api-eu.mixpanel.com"), | |
| ) | |
| if is_dev_mode: | |
| return Mixpanel(GiskardAnalyticsCollector.dev_mp_project_key) | |
| return Mixpanel( | |
| GiskardAnalyticsCollector.prod_mp_project_key, | |
| consumer=Consumer(api_host="api-eu.mixpanel.com"), | |
| ) |
Description
Updates mixpanel endpoint to use the UE one.
Type of Change