Reflect changes from https://github.com/getsentry/sentry-java/pull/1243 @maciejwalkowiak
Reflect changes from getsentry/sentry-java#1243
@maciejwalkowiak