Early accessBy invitation, and the SDKs aren't published yet.Ask for an invitation
Skip to Content
Docs

Environments

Debug builds, TestFlight and the App Store send to the same project, and each event says which.

Every event carries an environment, so one project can hold development, beta and production events without mixing them up. The dashboard shows one environment at a time, or all of them.

The names

Each SDK names the environment its own way (below). Any other name works when you set it yourself: lowercase letters, digits, - and _, up to 32 characters, starting with a letter or a digit (staging, internal, staging-eu).

How each SDK detects it

SDKDetection
Swiftdevelopment for a Debug build or any build on the simulator, testflight for a build installed from TestFlight, production otherwise (the App Store)
Androiddevelopment when the app is debuggable (every debug build), production otherwise
React Native, FlutterThe native SDK's: Swift's rule on iOS, Android's on Android
JavaScript, browserdevelopment on localhost, 127.0.0.1, [::1] or a *.localhost host, production anywhere else
JavaScript, Nodeproduction when NODE_ENV=production, development otherwise
Python, Go, JVMThe LYRELOG_ENVIRONMENT environment variable, else production

Overriding it

Set environment in the SDK's configuration. In Swift, nil keeps the detection (null on Android and in Flutter, undefined in React Native), so you can combine it with your own rule:

Lyrelog.start(Configuration(
    endpoint: URL(string: "https://ingest.lyrelog.com")!,
    apiKey: "lyr_ing_...",
    environment: isInternalTester ? "internal" : nil   // nil = detected
))

Lyrelog.detectedEnvironment returns what the Swift SDK would pick on its own.

Your own runs are development

A build you run from Xcode, any build on the simulator, an Android debug build (also from React Native or flutter run), and a web page on localhost all send development. The dashboard opens on production, so pick development (or All environments) in the top bar to see your first events.

The TestFlight check reads the build's App Store receipt: a TestFlight build has a sandbox receipt. A Release build you install yourself (ad hoc, or straight from Xcode with the Release configuration) has none, so it counts as production. Set environment yourself when that matters.

Over HTTP, set resource.environment. An event sent without one is stored as production.

In the dashboard

The picker in the top bar lists the environments seen in the last 30 days, with how many events each, plus All environments. Your choice is remembered per project in your browser. Until you pick one, the dashboard opens on the project's default environment: production unless an owner changes it in Settings, where it can also be All. Every page about events follows the picker. See Environments and platforms.

The Environments section of Settings also shows how the environment is decided for the platforms the project has.