Skip to content

Allow enabling infer_ip without enabling all default PII #19072

@bagedevimo

Description

@bagedevimo

Problem Statement

We really don't want to collect (for example) session cookie Set-Cookie headers, so keeping includeDefaultPii disabled gives us a lot more safety that no accidents will occur. However, IP is frequently very helpful for debugging issues. Since the changes in 10.4.0, there is no way to have includeDefaultPii: false but still collect the inferred IP in Relay.

Solution Brainstorm

You can pass _metadata: { sdk: { settings: { infer_ip: "auto" } } } to Sentry.init() to get access force enable infer_ip, however this is other side-effects like preventing the sdk name and version being sent through to the sentry server.

It feels like the there could be a way to specify you'd like to enable this specific feature somehow when calling Sentry.init, which is merged into the default _metadata. Alternatively, when the user-supplied _metadata.sdk.settings block is merged into BrowserClient, it could handle this case by still inserting other values required for full functioning of the SDK.

Additional Context

No response

Priority

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions