Skip to main content

Your first project

This guide goes from an empty project to seeing your application's first error in Collector. It takes a few minutes.

1. Create the project​

Creating projects is for admins and owners. If you're a member, ask one to create it, or skip to step 2 if it already exists.

  1. In your organization, open the project switcher in the top bar and pick New project. You can also do it from the Projects tab.
  2. Type a Name: your application's, as your team knows it ("Web shop", "Payments API"). The project's address is taken from the name once and doesn't change even if you rename it later.
  3. Pick Create project.

Collector takes you to the new project's Setup tab.

From the terminal it's the same:

collector projects create "Web shop" # prints the new project's DSN

2. Follow the setup​

Setup says: Three steps and your app reports its errors here. At the top there's a tab per language: Elixir, Node, JavaScript (the browser) and Other (any language, over HTTP). Open your application's. If your project has a server and a web page, follow both.

The three steps are always the same:

  1. Install the package of the SDK.
  2. Give the DSN to your deployed application. The DSN is on the same screen, under Your DSN. It isn't a secret: it only lets an app send errors to this project, so it can go in browser code.
  3. Deploy.

For JavaScript and Node, the screen asks for your framework and your bundler, and the code it shows follows what you pick. Under the three steps are options worth having but not needed to start: seeing the original code instead of the built one, knowing which user hit the error, measuring speed, sending logs. Copy instructions copies all of it, ready to paste to your AI agent.

Each SDK has its page with all the details: Elixir, Browser, Node.

3. Send a test event​

There's no need to wait for something to break. Check it: send a test event shows how for your language:

  • Elixir: MIX_ENV=prod mix collector.test, or Collector.test_event() inside a release.
  • Node and browser: await Collector.test() in your application, after init. In the browser, with debug: true, you can also run __collector.test() from the console.
  • Any language, or without installing anything: collector test, with COLLECTOR_DSN set.

Meanwhile, the screen shows Waiting for the first event…. As soon as it arrives it changes by itself, without reloading, and offers See its issues.

4. Look at the issue​

The Issues tab has the test error. Open it to see what you'll see with every real error: the stack trace with your code, the environment and release, and what happened before. See An issue.

From now on, every new error reaches you by email. If you don't want this project's emails, you can mute it just for you.

What's next​