We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
user.ip_address
{{auto}}
1 parent 64e9fb6 commit 8670611Copy full SHA for 8670611
packages/browser/src/client.ts
@@ -112,6 +112,15 @@ export class BrowserClient extends Client<BrowserClientOptions> {
112
isolationScope: Scope,
113
): PromiseLike<Event | null> {
114
event.platform = event.platform || 'javascript';
115
+
116
+ // By default, we want to infer the IP address, unless this is explicitly set to `null`
117
+ if (typeof event.user?.ip_address === 'undefined') {
118
+ event.user = {
119
+ ...event.user,
120
+ ip_address: '{{auto}}',
121
+ };
122
+ }
123
124
return super._prepareEvent(event, hint, currentScope, isolationScope);
125
}
126
0 commit comments