[AI-FSSDK] [FSSDK-12670] Block ODP identify events with single identifier#452
Open
jaeopt wants to merge 1 commit into
Open
[AI-FSSDK] [FSSDK-12670] Block ODP identify events with single identifier#452jaeopt wants to merge 1 commit into
jaeopt wants to merge 1 commit into
Conversation
Change IdentifyUser in event manager to accept identifiers map instead of single userID. Filter out empty values and require 2+ valid identifiers before dispatching. Server-side Go SDK only has fs_user_id (no VUID), so identify events will be correctly skipped.
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.
Summary
Block ODP identify events when only a single valid identifier is provided. Identify events exist to link multiple user identifiers together; sending them with a single identifier provides no value and wastes network calls.
Jira: FSSDK-12670
Changes
pkg/odp/event/event_manager.goIdentifyUsersignature from(apiKey, apiHost, userID string)to(apiKey, apiHost string, identifiers map[string]string)pkg/odp/odp_manager.goIdentifyUserto build identifiers map from userID and pass to event manageridentifyUserIdentifiershelper functionevent.Managerinterface to match new signatureTests
TestIdentifyUserSkippedWithSingleIdentifier- verifies single identifier blockedTestIdentifyUserSkippedWithEmptyValues- verifies empty values filtered outNotes
IdentifyUserwill always have a singlefs_user_ididentifier and identify events will be correctly skippedOdpManager.Managerpublic interface (IdentifyUser(userID string)) is unchanged for backward compatibilityevent.Managerinterface