Skip to content

Commit b07a6e8

Browse files
t-h-manmarandaneto
andauthored
Add DSN in the manual init (#4381)
* Add DSN in the manual init DSN is an integral part of the manual initialisation * Update src/platforms/android/configuration/manual-init.mdx Co-authored-by: Manoel Aranda Neto <5731772+marandaneto@users.noreply.github.com> * Update src/platforms/android/configuration/manual-init.mdx Co-authored-by: Manoel Aranda Neto <5731772+marandaneto@users.noreply.github.com> Co-authored-by: Manoel Aranda Neto <5731772+marandaneto@users.noreply.github.com>
1 parent 7fa2043 commit b07a6e8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/platforms/android/configuration/manual-init.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public class SentryApplication extends Application {
4141
super.onCreate();
4242

4343
SentryAndroid.init(this, options -> {
44+
options.setDsn("___PUBLIC_DSN___");
4445
// Add a callback that will be used before the event is sent to Sentry.
4546
// With this callback, you can modify the event or, when returning null, also discard the event.
4647
options.setBeforeSend((event, hint) -> {
@@ -64,6 +65,7 @@ class SentryApplication : Application() {
6465
super.onCreate()
6566

6667
SentryAndroid.init(this) { options ->
68+
options.dsn = "___PUBLIC_DSN___"
6769
// Add a callback that will be used before the event is sent to Sentry.
6870
// With this callback, you can modify the event or, when returning null, also discard the event.
6971
options.beforeSend =

0 commit comments

Comments
 (0)