Octri

init

Configures the runtime. Call it once at startup, before anything else. Every other function does nothing until init has run, so a missing call fails quietly rather than breaking your application.

Parameters

urlstringrequired

Your monitoring address, the Ingest URL in the Monitoring connection settings.

tokenstring

The project's ingest token. Keep it in an environment variable. Leave it out only for a self-hosted endpoint that takes events without one.

environmentstringrequired

Your environment id, which is your project's id. The Monitoring connection settings show it.

releasestring

Which deploy this is, usually the git SHA. Errors are grouped by it on the releases view.

Example

Node
import { init } from "@octri/node";

init({
  url: process.env.MONITORING_URL!,
  token: process.env.OCTRI_TOKEN,
  environment: "YOUR_PROJECT_ID",
  release: process.env.GIT_SHA,
});

In each language

LanguageCall
Nodeinit()
Pythonoctri.init()
Gooctri.Init()
RubyOctri.init
JavaOctri.init()
KotlinOctri.init()
PHPOctri::init()
Rustoctri_monitoring::init()
SwiftOctri.initialize()
DartOctri.init()

Each language's own setup is on backend SDKs. Go, Java, Kotlin, PHP, Rust, Swift and Dart take the same four settings in a config object.