Sentry Plugin
Install
pnpm add -D @theholocron/holocron-plugin-sentryCapabilities
| Capability | Token |
|---|---|
observability | HOLOCRON_SENTRY_TOKEN (sentry) |
Config
Section titled “Config”providers: { observability: ["sentry", { // Required: your Sentry organization slug org: "my-org", }],}Options
Section titled “Options”| Option | Required | Description |
|---|---|---|
org |
Yes | Sentry organization slug |
team |
No | Default team slug for project creation. Defaults to org slug |
Authentication
Section titled “Authentication”- Go to sentry.io/settings/account/api/auth-tokens/
- Click Create New Token
- Enable scopes: project:read, project:write, org:read
- Click Create Token and copy it
For CI, prefer an org-level token: Settings → [Your Org] → Developer Settings → Auth Tokens.
holocron auth set sentry <TOKEN>Or via env var:
export HOLOCRON_SENTRY_TOKEN=<TOKEN># Also recognized:export SENTRY_AUTH_TOKEN=<TOKEN>What observability provides
Section titled “What observability provides”describe()— returns the provider name and required env var keys (SENTRY_DSN,NEXT_PUBLIC_SENTRY_DSN)whoami()— verifies the token by fetching the organizationensureProject(input)— create or retrieve a Sentry project, returning its DSN and whether it already existed
Example
Section titled “Example”import { createPlugin } from "@theholocron/holocron-plugin-sentry";
const plugin = createPlugin({ token: process.env.HOLOCRON_SENTRY_TOKEN, org: "my-org",});const obs = plugin.capabilities.observability();
const { dsn, alreadyExists } = await obs.ensureProject({ name: "my-app", platform: "node",});console.log(`DSN: ${dsn} (${alreadyExists ? "existing" : "created"})`);