Skip to content
betterstack-alchemyUnofficial

Errors.Release

Kind ResourceType id BetterStack.Errors.ReleaseSource src/Errors/Release.tsLive test available A live lifecycle test exists: it runs against the offline mock by default and against the real API under bun run test:live. This records that the test exists, not a dated live run (see Compatibility). Test file: test/Errors/Release.test.ts.

A release of an error-tracking Application: registers a version (and the environments it was deployed to) so it appears the moment it deploys, before the first event that carries it, and errors can be resolved “in the current release”.

The API has no update: changing version, applicationId, environment or teamId replaces the release. When version and applicationId stay the same (an environment or teamId change), the old release is deleted first, because registering the same version again answers the same release. A version the application already reports (detected from events) is that existing release: it is adopted only with --adopt.

Destroying the release deletes it; its errors are kept, and a version that still receives events is detected again by Better Stack’s next scan.

The version a deploy ships

const errors = yield* BetterStack.Errors.Application("api-errors", {
platform: "bun_errors",
});
yield* BetterStack.Errors.Release("v1", {
applicationId: errors.id,
version: "v1.2.3",
environment: ["production"],
});

The service reports the same version with SENTRY_RELEASE (or release in Sentry.init), so its events land on this release.

By id, or by its application and version (a version Better Stack detected from events)

const byId = BetterStack.Errors.Release.lookup({ id: "123456" });
const detected = BetterStack.Errors.Release.lookup({ applicationId: "4321", version: "v1.2.2" });

applicationId string required

The [Application](/reference/errors/application/) to register the release on: its id.

version string required

Release version or commit ref.

environment string[]

Environments this release was deployed to, such as ["production"]. Added to any environments the release already has. Never returned by the API on its own: the attributes keep what was sent.

teamId string

The team the release is for, as t123 or as the team ID the Sentry CLI sends as SENTRY_ORG. When you send only a version, the release is registered only on this team's applications. An unknown team is refused.

applicationId string always set

The application the props named (for a release found by list/lookup, the one the API answers). A connected application's release lives on the application it is connected to, whose id the API answers instead.

id string always set

The release's id.

createdAt string

When the release was created.

environment string[]

Environments sent on create (environments is what the API holds).

environments string[]

Environments this release was deployed to. Registering only a version, without applications, adds the environment to that version's release on every application that has one.

firstSeenAt string

When the release was registered or first seen in an event, whichever came first. Later registrations and events don't change it.

lastSeenAt string | null

When an event last carried the release. A registered release shows its registration time until its first event. null for a release with no event since this field was added.

origin "detected" | "reported"

How the release first became known.

teamId string

The team sent on create, if any. Never returned by the API.

updatedAt string

When the release was last updated.

version string

Release version or commit ref.

Release.lookup(props) reads an object this stack does not manage. It is never created, updated or deleted.

None.