@@ -134,7 +134,7 @@ public static Baggage fromEvent(
134134 final Baggage baggage = new Baggage (options .getLogger ());
135135 final SpanContext trace = event .getContexts ().getTrace ();
136136 baggage .setTraceId (trace != null ? trace .getTraceId ().toString () : null );
137- baggage .setPublicKey (new Dsn ( options .getDsn () ).getPublicKey ());
137+ baggage .setPublicKey (options .getParsedDsn ( ).getPublicKey ());
138138 baggage .setRelease (event .getRelease ());
139139 baggage .setEnvironment (event .getEnvironment ());
140140 final User user = event .getUser ();
@@ -405,7 +405,7 @@ public void setValuesFromTransaction(
405405 final @ NotNull SentryOptions sentryOptions ,
406406 final @ Nullable TracesSamplingDecision samplingDecision ) {
407407 setTraceId (transaction .getSpanContext ().getTraceId ().toString ());
408- setPublicKey (new Dsn ( sentryOptions .getDsn () ).getPublicKey ());
408+ setPublicKey (sentryOptions .getParsedDsn ( ).getPublicKey ());
409409 setRelease (sentryOptions .getRelease ());
410410 setEnvironment (sentryOptions .getEnvironment ());
411411 setUserSegment (user != null ? getSegment (user ) : null );
@@ -427,7 +427,7 @@ public void setValuesFromScope(
427427 final @ Nullable User user = scope .getUser ();
428428 final @ NotNull SentryId replayId = scope .getReplayId ();
429429 setTraceId (propagationContext .getTraceId ().toString ());
430- setPublicKey (new Dsn ( options .getDsn () ).getPublicKey ());
430+ setPublicKey (options .getParsedDsn ( ).getPublicKey ());
431431 setRelease (options .getRelease ());
432432 setEnvironment (options .getEnvironment ());
433433 if (!SentryId .EMPTY_ID .equals (replayId )) {
0 commit comments