Help Center / Platforms / Configuration / How do I set the IP address?

How do I set the IP address?

For certain SDKs you have to manually enable capturing of IP addresses. Here are some examples:

C#

Sentry.ConfigureScope(s => s.User.IpAddress = "{{auto}}");

or:

Sentry.Init(o => o.BeforeSend = e => {  e.User.IpAddress = "{{auto}}"; 
 return e; });

Java

Sentry.getContext().setUser(
    new UserBuilder().setIpAddress({{auto}}).build()
);

Native

sentry[user][ip_address]={{auto}}

All the help you could dream of

© 2021 • Sentry is a registered Trademark
of Functional Software, Inc.