How-to migrate my applications to the organization token?


With the introduction of the organization token, Sqreen provides you with a single unique token for your entire organization, enabling you to deploy Sqreen at scale. This guide covers the migration process from application-based tokens to the organization token.

What happened to the application-based tokens?

In order to deploy Sqreen prior to the release of the organization token, it was necessary to get a unique token per application. One had to create each application manually from the dashboard with its own token.

The application-based token remain fully supported, meaning you don't have to change anything on applications already connected to Sqreen.

Yet, we believe the organization token eases the deployment process at scale and we recommend that everyone eventually migrate to it.

Migrating applications to the organization token

This section describes how to migrate applications using the application-based token to the organization token. Depending on the specifics of your Sqreen setup, you will need to follow the guide for one of the following scenarios.

The application is connected only once

This is the easiest scenario to migrate from.

The organization token requires you to provide a unique application identifier, which can be set through the Sqreen agent configuration file.

Here's the steps you need to complete:

  1. Grab your organization token from your Dashboard https://my.sqreen.com/profile/organization/tokens
  2. Set the token configuration key in the Sqreen agent configuration file to this token
  3. From your Dashboard, fetch the application name already in use and set the app_name configuration key with this value
  4. Restart the application
  5. Perform some requests to check they're still recorded under the same application

Congrats 🎉! You're done with the migration.

You can repeat those steps on every application connected to Sqreen to fully migrate over.

The same application is deployed in multiple environments

This scenario requires more steps to complete.

The organization token requires you to provide a unique application identifier, which can be set through the Sqreen agent configuration file.

For instances where one application is deployed in multiple environments, you'll have to set a unique identifier for each instance of the application (e.g. development, staging, production).

Let's use the following example: Sqreen is deployed on an application named Backend, using an application-based token. The Backend application is deployed on staging and production, each using a separate dedicated token.

Using the organization token, we'll have to distinguish them by adding the environment in the identifier used by the application to connect to Sqreen.

For instance, Backend (staging) and Backend (production). The naming convention is entirely up to you; there are no constraints enforced by Sqreen.

Migrating from this setup requires our team to assist in order for you not to lose existing applications and their configurations. Please reach out to us at support@sqreen.com and we'll get you sorted out.