init() call once, and Argus handles the rest. Without a valid DSN, the SDK silently no-ops instead of crashing your app, but you won’t receive any error data, so getting this value right from the start matters.
DSN format
Every Argus DSN follows this structure:| Component | Description |
|---|---|
PUBLIC_KEY | The URL username — the portion of the DSN before the @. It identifies your SDK to the ingest endpoint. It is not a secret — safe to include in frontend code, commit to source control, or embed in build pipelines. |
your-domain.com | The host where your Argus instance is running. |
PROJECT_ID | The unique identifier for your project. The ingest route is scoped to this ID, so events land in exactly the right project. |
Finding your DSN
Log into the Argus dashboard
Navigate to your Argus instance and sign in with your account credentials.
Open your project
Select an existing project from the Projects Console. If you haven’t created one yet, click New Project — your DSN is displayed immediately on the onboarding screen once the project is created.
Using your DSN in code
Pass the DSN as thedsn property of the options object you hand to init(). Call init() once, as early as possible in your application’s startup sequence — before any code that could throw.
DSN validation
Argus validates the DSN synchronously insideinit() and throws an error immediately if anything is wrong. Conditions that cause a throw:
- The string is not a valid URL
- The public key (the part before
@) is missing - The project ID (the URL path) is missing
- The protocol is anything other than
httporhttps