Skip to content

fix: send correct SDK user agent in analytics events - #246

Merged
Zaimwa9 merged 1 commit into
mainfrom
fix/analytics-sdk-user-agent
Aug 31, 2026
Merged

fix: send correct SDK user agent in analytics events#246
Zaimwa9 merged 1 commit into
mainfrom
fix/analytics-sdk-user-agent

Conversation

@Zaimwa9

@Zaimwa9 Zaimwa9 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

The events flush sent Flagsmith-SDK-User-Agent: flagsmith-python-client/{version}, while the flags client sends flagsmith-python-sdk/{version}. The API only recognises flagsmith-python-sdk, so analytics events were labelled sdk_label: unknown.

DEFAULT_USER_AGENT now lives in flagsmith/version.py and is used by both code paths.

How did you test this code?

Updated the existing header assertion in tests/test_event_processor.py; full suite passes.

@Zaimwa9
Zaimwa9 requested a review from a team as a code owner August 31, 2026 12:58
@Zaimwa9
Zaimwa9 requested review from matthewelwell and removed request for a team August 31, 2026 12:58
@Zaimwa9
Zaimwa9 merged commit aa7d7be into main Aug 31, 2026
6 checks passed
@Zaimwa9
Zaimwa9 deleted the fix/analytics-sdk-user-agent branch August 31, 2026 13:07
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.

2 participants