Skip to content

Commit 8d72ca7

Browse files
committed
feat: add SENTRY_RELEASE and SENTRY_ENVIRONMENT
1 parent bd35d73 commit 8d72ca7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/node/src/sdk.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,14 @@ export function init(options: NodeOptions = {}): void {
7474
options.dsn = process.env.SENTRY_DSN;
7575
}
7676

77+
if (options.release === undefined && process.env.SENTRY_RELEASE) {
78+
options.release = process.env.SENTRY_RELEASE;
79+
}
80+
81+
if (options.environment === undefined && process.env.SENTRY_ENVIRONMENT) {
82+
options.environment = process.env.SENTRY_ENVIRONMENT;
83+
}
84+
7785
if (domain.active) {
7886
setHubOnCarrier(getMainCarrier(), getCurrentHub());
7987
}

0 commit comments

Comments
 (0)