Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use spotlight without supplying a DSN #2213

Open
ueman opened this issue Aug 5, 2024 · 5 comments
Open

Use spotlight without supplying a DSN #2213

ueman opened this issue Aug 5, 2024 · 5 comments

Comments

@ueman
Copy link
Collaborator

ueman commented Aug 5, 2024

Problem Statement

I want to be able to use spotlight without having to add a DSN.

Solution Brainstorm

Don't throw when spotlight is enabled, but no DSN is configured.

I have no clue whether this is an intended use case, but it would be nice if it's possible.

Are you willing to submit a PR?

Yes

@buenaflor
Copy link
Contributor

Yeah sounds good, afaik other sdks do it as well

e.g getsentry/sentry-ruby#2226 and same feature request on .net getsentry/sentry-dotnet#3481

@ueman
Copy link
Collaborator Author

ueman commented Aug 5, 2024

From the Dart SDK perspective it's pretty much just a change in the init assertion, would there be more needed on the native SDKs to make it possible?

@buenaflor
Copy link
Contributor

buenaflor commented Aug 5, 2024

would there be more needed on the native SDKs to make it possible?

probably the same, I don't think the native sdks currently allow using spotlight without dsn as well.

@buenaflor
Copy link
Contributor

Blocked by #2282 <- I want this issue done first

@martinhaintz
Copy link
Collaborator

martinhaintz commented Sep 17, 2024

would there be more needed on the native SDKs to make it possible?

probably the same, I don't think the native sdks currently allow using spotlight without dsn as well.

@buenaflor
It looks like the Android SDK needs a dsn: sentry.java

    if (!options.isEnabled() || (dsn != null && dsn.isEmpty())) {
      close();
      return false;
    } else if (dsn == null) {
      throw new IllegalArgumentException(
          "DSN is required. Use empty string or set enabled to false in SentryOptions to disable SDK.");
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Blocked
Development

No branches or pull requests

3 participants