protected SentryClient configureSentryClient(SentryClient sentryClient, Dsn dsn) {
        String release = getRelease(dsn);
        if (release != null) {
            sentryClient.setRelease(release);
        }

        String dist = getDist(dsn);
        if (dist != null) {
            sentryClient.setDist(dist);
        }

        String environment = getEnvironment(dsn);
        if (environment != null) {
            sentryClient.setEnvironment(environment);
        }

        String serverName = getServerName(dsn);
        if (serverName != null) {
            sentryClient.setServerName(serverName);
        }

        Map<String, String> tags = getTags(dsn);
        if (!tags.isEmpty()) {
            for (Map.Entry<String, String> tagEntry : tags.entrySet()) {
                sentryClient.addTag(tagEntry.getKey(), tagEntry.getValue());
            }
        }

        Set<String> mdcTags = getMdcTags(dsn);
        if (!mdcTags.isEmpty()) {
            for (String mdcTag : mdcTags) {
                sentryClient.addMdcTag(mdcTag);
            }
        }

        Map<String, String> extra = getExtra(dsn);
        if (!extra.isEmpty()) {
            for (Map.Entry<String, String> extraEntry : extra.entrySet()) {
                sentryClient.addExtra(extraEntry.getKey(), extraEntry.getValue());
            }
        }

        if (getUncaughtHandlerEnabled(dsn)) {
            sentryClient.setupUncaughtExceptionHandler();
        }

        for (String inAppPackage : getInAppFrames(dsn)) {
            FrameCache.addAppPackage(inAppPackage);
        }

        return sentryClient;
    }
protected SentryClient configureSentryClient ( SentryClient sentryClient , Dsn dsn ) { String release = getRelease ( dsn ) ; if ( release != null ) { sentryClient . setRelease ( release ) ; } String dist = getDist ( dsn ) ; if ( dist != null ) { sentryClient . setDist ( dist ) ; } String environment = getEnvironment ( dsn ) ; if ( environment != null ) { sentryClient . setEnvironment ( environment ) ; } String serverName = getServerName ( dsn ) ; if ( serverName != null ) { sentryClient . setServerName ( serverName ) ; } Map < String , String > tags = getTags ( dsn ) ; if ( ! tags . isEmpty ( ) ) { for ( Map . Entry < String , String > tagEntry : tags . entrySet ( ) ) { sentryClient . addTag ( tagEntry . getKey ( ) , tagEntry . getValue ( ) ) ; } } Set < String > mdcTags = getMdcTags ( dsn ) ; if ( ! mdcTags . isEmpty ( ) ) { for ( String mdcTag : mdcTags ) { sentryClient . addMdcTag ( mdcTag ) ; } } Map < String , String > extra = getExtra ( dsn ) ; if ( ! extra . isEmpty ( ) ) { for ( Map . Entry < String , String > extraEntry : extra . entrySet ( ) ) { sentryClient . addExtra ( extraEntry . getKey ( ) , extraEntry . getValue ( ) ) ; } } if ( getUncaughtHandlerEnabled ( dsn ) ) { sentryClient . setupUncaughtExceptionHandler ( ) ; } for ( String inAppPackage : getInAppFrames ( dsn ) ) { FrameCache . addAppPackage ( inAppPackage ) ; } return sentryClient ; }
Configures a {@link SentryClient} instance after it has been constructed.

@param sentryClient The {@link SentryClient} to configure.
@param dsn Data Source Name of the Sentry server to use.
@return The same {@link SentryClient} instance, after configuration.