Skip to content
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

fix: Mixpanel Transformer - Fall Back to message.context.traits for Group Key Retrieval #4053

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

etsenake
Copy link

@etsenake etsenake commented Feb 6, 2025

What are the changes introduced in this PR?

  • Fixes an issue where the Mixpanel transformer was not correctly retrieving the group key due to traits no longer being available at the top level in the RudderStack Ruby SDK (3.0.0+).
  • Updates the transformer to correctly fetch the group key from context.traits instead of message.traits.

Please explain the objectives of your changes below

  • The Rudderstack Ruby SDK (3.0.0) removed top-level traits, requiring traits to be merged into context.
  • The Mixpanel transformer was still relying on message.traits[groupKey], causing group calls to fail with "Group Key not present" errors.
  • This change ensures the group key and traits are retrieved from message.context.traits when message.traits is empty or not present allowing for backwards and forward compatibility.

Any changes to existing capabilities/behavior?

  • Fixes group calls failing due to missing group key and traits.

Any new dependencies introduced with this change?

N/A

Any new generic utility introduced or modified?

N/A

Any technical or performance-related pointers to consider with the change?

N/A

@coderabbitai review


Developer checklist

  • My code follows the style guidelines of this project
  • No breaking changes are being introduced.
  • All related docs linked with the PR?
  • All changes manually tested?
  • Any documentation changes needed with this change?
  • Is the PR limited to 10 file changes?
  • Is the PR limited to one Linear task?
  • Are relevant unit and component test-cases added in new readability format?

Reviewer checklist

  • Is the type of change in the PR title appropriate as per the changes?
  • Verified that there are no credentials or confidential data exposed with the changes.

@contributor-support
Copy link

Thank you @etsenake for contributing this PR.
Please sign the Contributor License Agreement (CLA) before merging.

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.

1 participant