SentryErrors
Defined in: plugins/holocron-plugin-sentry/src/capabilities/errors.ts:25
The errors capability for Sentry: finds or creates a project and reports its DSN, and manages the Comlink relay.
Implements
Section titled “Implements”Errors
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new SentryErrors(
client,opts,relayClient?):SentryErrors
Defined in: plugins/holocron-plugin-sentry/src/capabilities/errors.ts:31
Parameters
Section titled “Parameters”client
Section titled “client”() => object
relayClient?
Section titled “relayClient?”() => object
The client for the relay, made with the Comlink token (see resolveRelayToken).
Returns
Section titled “Returns”SentryErrors
Properties
Section titled “Properties”
readonlykey:"errors"
Defined in: plugins/holocron-plugin-sentry/src/capabilities/errors.ts:27
The capability key, always errors.
Implementation of
Section titled “Implementation of”Errors.key
providerName
Section titled “providerName”
readonlyproviderName:"sentry"="sentry"
Defined in: plugins/holocron-plugin-sentry/src/capabilities/errors.ts:29
The provider name, sentry.
Implementation of
Section titled “Implementation of”Errors.providerName
Methods
Section titled “Methods”describe()
Section titled “describe()”describe():
Promise<{envKeys:string[];frameworkEnvKeys: {next:string[]; };provider:string; }>
Defined in: plugins/holocron-plugin-sentry/src/capabilities/errors.ts:50
Returns the env var names the app reads at runtime for this provider.
envKeys are always pushed; the optional frameworkEnvKeys maps a
framework name, as deriveStack() spells it (next), to the extra keys
pushed only when that framework is in the repo’s detected stack (the root
package.json and every workspace package’s).
Returns
Section titled “Returns”Promise<{ envKeys: string[]; frameworkEnvKeys: { next: string[]; }; provider: string; }>
Implementation of
Section titled “Implementation of”Errors.describe
ensureProject()
Section titled “ensureProject()”ensureProject(
input):Promise<{alreadyExists:boolean;dsn:string; }>
Defined in: plugins/holocron-plugin-sentry/src/capabilities/errors.ts:69
Returns the public DSN of the project named input.name (matched by its slug), creating it when missing; needs org, and the new project uses team (default the org slug) and platform (default node).
Parameters
Section titled “Parameters”string
platform?
Section titled “platform?”string
Returns
Section titled “Returns”Promise<{ alreadyExists: boolean; dsn: string; }>
Implementation of
Section titled “Implementation of”Errors.ensureProject
ensureRelay()
Section titled “ensureRelay()”ensureRelay(
input):Promise<EnsureRelayResult>
Defined in: plugins/holocron-plugin-sentry/src/capabilities/errors.ts:38
Make the tracker send its alerts to a relay (the Comlink Worker): an integration that posts to webhookUrl, and
an alert rule on each project that uses it. Idempotent: an integration or rule with the same name is adopted and
only what differs is changed. clientSecret is the integration’s signing secret, handed to the caller to give
the relay; it is a credential and must not be printed or stored anywhere but there. It is absent when the
provider did not give it (some show it only when the integration is made).
Parameters
Section titled “Parameters”EnsureRelayInput
Returns
Section titled “Returns”Promise<EnsureRelayResult>
Implementation of
Section titled “Implementation of”Errors.ensureRelay
inspect()
Section titled “inspect()”inspect(
input):Promise<ErrorsInspection>
Defined in: plugins/holocron-plugin-sentry/src/capabilities/errors.ts:46
Read the tracker’s organization and the named projects without changing anything: whether each exists, whether it
has a client key (a DSN to give an SDK) and how many enabled alert rules watch it. Never returns a DSN or a key.
holocron doctor errors uses it. Optional — a provider with no management API omits it.
Parameters
Section titled “Parameters”InspectErrorsInput
Returns
Section titled “Returns”Promise<ErrorsInspection>
Implementation of
Section titled “Implementation of”Errors.inspect
inspectRelay()
Section titled “inspectRelay()”inspectRelay(
input):Promise<RelayState>
Defined in: plugins/holocron-plugin-sentry/src/capabilities/errors.ts:42
Read back what ensureRelay makes without changing anything: the integration and, for each project, whether the
alert rule is on it, enabled and sends through the integration. Never reads the signing secret.
Optional — a provider with no relay omits it.
Parameters
Section titled “Parameters”InspectRelayInput
Returns
Section titled “Returns”Promise<RelayState>
Implementation of
Section titled “Implementation of”Errors.inspectRelay
whoami()
Section titled “whoami()”whoami():
Promise<{org:string; } |null>
Defined in: plugins/holocron-plugin-sentry/src/capabilities/errors.ts:59
Reachability probe. null means the check genuinely can’t run right
now on an otherwise-valid configuration (e.g. Sentry’s optional org
setting is unset — error ingestion still works from the DSN alone,
org is only needed for the management-API calls whoami makes) —
callers should fall back to describe(), not treat it as a failure.
Still throws for a genuine failure (bad token, network error, etc.).
Returns
Section titled “Returns”Promise<{ org: string; } | null>
Implementation of
Section titled “Implementation of”Errors.whoami