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

Modify some context from Plugin #346

Closed
miquelalvarado opened this issue May 15, 2024 · 1 comment
Closed

Modify some context from Plugin #346

miquelalvarado opened this issue May 15, 2024 · 1 comment
Assignees
Labels

Comments

@miquelalvarado
Copy link

Describe the bug
We need to anonymize the last byte of the IP when certain conditions are met. For that we have an Enrichment Plugin that tries to get the ip key from the context and map it but it doesn't seem to be there by that point.

To Reproduce
Steps to reproduce the behavior:

  1. Create an Enrichment Plugin
  2. Try to get the ip value from any event context
  3. It will return nil

Expected behavior
IP is already accessible.

Platform (please complete the following information):

  • Library Version in use: 1.5.11
  • Platform being tested: iOS

Additional context
My guess is that certain context attributes are added internally by another Plugin at a later stage. Ideally I think that when our Plugins are executed the event should be as real as possible (meaning having the same elements that will be sent in the final event and before processing clients' plugins).
Maybe there's another kind of Plugin (not enrichment) that could fit this need?

@bsneed
Copy link
Contributor

bsneed commented May 15, 2024

The ip value in context is set server side. If you supply your own ip address, the server won't add that value. However, the value the server sets would be inaccessible on-device. You can do what you're requesting via Segment's Functions product (here)

@bsneed bsneed closed this as completed May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants