Repository navigation
feat(experimentation): receive SDK events in Django for the Flagsmith database warehouse - #8864
Merged
Merged
Conversation
…events column type
…se-deployment # Conflicts: # api/experimentation/warehouses/constants.py # api/experimentation/warehouses/postgres.py # api/tests/unit/experimentation/conftest.py # api/tests/unit/experimentation/test_views.py # api/tests/unit/experimentation/warehouses/test_postgres.py
…nt' into feat/postgres-warehouse-deployment
…fore asking for a password
…ame insert privilege
…o model fed by an sdk events endpoint
… server's 2 MiB limit
…nt' into feat/postgres-warehouse-deployment
… and skip delivery status for the flagsmith database
…nt' into feat/postgres-warehouse-deployment # Conflicts: # openapi.yaml
… database warehouse
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
…non-finite traits and cap generated connection names
…and sdk event validation
… the batch with a serializer and move mappers and limits
…ation works on Python 3.11
gagantrivedi
approved these changes
Nov 4, 2026
4 tasks done
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Follows #8857.
Environments using the Flagsmith database warehouse receive SDK events in Django, with no ingestion server.
POST /api/v1/eventsaccepts the ingestion server's payload and limits (X-Environment-Key, per-event validation, 202/400 withaccepted/rejected, 2 MiB body limit with 413), so SDKs only change their events base URL.SDKExperimentationEventSerializer; valid ones are stored inSDKExperimentationEventwith onebulk_create.flagsmith_experimentation_sdk_events_totalcounter and anexperimentation.sdk_events.rejectedlog event (counts and field names only).Contract deviations: DRF-style error messages; 403 for a missing or unknown key; 500 on database errors; SDK versions not yet tracked in
app_analyticsare stored asunknown; no gzip request decompression; chunked bodies withoutContent-Lengthread as empty. The endpoint is unthrottled, like the existing SDK endpoints and the ingestion server.How did you test this code?
Unit tests for the serializer and the endpoint, plus the Python SDK against a local self-hosted instance on PostgreSQL 16: events stored, and event names, stats and experiment results matched what was sent.