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

Explicity set user.ip_address: {{auto}} #118

Open
6 of 14 tasks
cleptric opened this issue Jan 14, 2025 · 6 comments
Open
6 of 14 tasks

Explicity set user.ip_address: {{auto}} #118

cleptric opened this issue Jan 14, 2025 · 6 comments

Comments

@cleptric
Copy link
Member

cleptric commented Jan 14, 2025

Description

For client side SDKs, we need to explicitly set the user's IP address to {{auto}}, if the property was not set by the user.

By default, SDKs should not set {{auto}} and only do so if sendDefaultPii was set to true by the user.

Docs: https://develop.sentry.dev/sdk/expected-features/data-handling/

See getsentry/relay#4431

Stakeholder(s)

@jjbayer

Team(s)

Mobile, Web Frontend, GDX

SDKs

SDKs

Preview Give feedback
  1. Platform: Android Platform: Java
    markushi
  2. Platform: React-Native
    krystofwoldrich
@bruno-garcia
Copy link
Member

@bitsandfoxes I'm pretty sure Unity does the right thing (the dotnet sdk that is, which would be true then for Unity, Xamarin and PowerShell. But could you please double check?

@kahest
Copy link
Member

kahest commented Jan 14, 2025

@jjbayer
Copy link
Member

jjbayer commented Jan 15, 2025

@lucas-zimerman
Copy link

lucas-zimerman commented Jan 17, 2025

Issue created for Capacitor getsentry/sentry-capacitor#819
and Cordova getsentry/sentry-cordova#369

mydea added a commit to getsentry/sentry-javascript that referenced this issue Jan 20, 2025
Part of getsentry/team-sdks#118

This is so far inferred at relay-side, which is pretty intransparent and
potentially confusing.
So instead, we want to explicitly set this in the SDK. If this is set to
`null` it will not be inferred (which is kind of intransparent too,
but...)

This is set for:

* error events (as `user.ip_address`)
* transactions (as `user.ip_address`)
* replay events (as `user.ip_address`)
* profiles (as `user.ip_address`)
* sessions (as `user.ip_address`)
* session aggregates: as `attr.ip_address: '{{auto}}'`
* standalone spans (not by default, but added to all standalone web
vitals spans we emit, as `'client.address': '{{auto}}'` attribute)
@jjbayer
Copy link
Member

jjbayer commented Jan 20, 2025

Current Relay behavior:

Data type auto-derive when IP missing auto-derive when IP is {{auto}}
Errors + Transactions only for platform:[js,cocoa] Yes
Sessions No Yes
Standalone (INP) spans Yes Yes
Replays only for platform:[js,cocoa] Yes

We can change the special casing for js and cocoa to a specific verion. Since INP spans also come from javascript, we can apply the same fallback behavior there, so the behavior is aligned across data types.

@krystofwoldrich
Copy link
Member

@jjbayer What is covered by js, any sdk starting with sentry.javascript.*? Just checking what the behaviour will be for hybrid SDKs (RN, Flutter, ...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs Discussion
Development

No branches or pull requests

7 participants