Skip to content

Commit b7abc65

Browse files
committed
PR feedback
1 parent 4dab0aa commit b7abc65

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

packages/node/src/sdk/client.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export class NodeClient extends ServerRuntimeClient<NodeClientOptions> {
156156
}
157157

158158
function applyDefaultOptions<T extends Partial<NodeClientOptions>>(options: T): T {
159-
const release = getRelease(options.release);
159+
const release = options.release ?? getSentryRelease();
160160
const spotlight =
161161
options.spotlight ?? envToBool(process.env.SENTRY_SPOTLIGHT, { strict: true }) ?? process.env.SENTRY_SPOTLIGHT;
162162
const tracesSampleRate = getTracesSampleRate(options.tracesSampleRate);
@@ -177,19 +177,6 @@ function applyDefaultOptions<T extends Partial<NodeClientOptions>>(options: T):
177177
};
178178
}
179179

180-
function getRelease(release: NodeClientOptions['release']): string | undefined {
181-
if (release !== undefined) {
182-
return release;
183-
}
184-
185-
const detectedRelease = getSentryRelease();
186-
if (detectedRelease !== undefined) {
187-
return detectedRelease;
188-
}
189-
190-
return undefined;
191-
}
192-
193180
/**
194181
* Tries to get a `tracesSampleRate`, possibly extracted from the environment variables.
195182
*/

packages/node/src/sdk/index.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,7 @@ export function initWithoutDefaultIntegrations(options: NodeOptions = {}): NodeC
104104

105105
/**
106106
* Initialize a Node client with the provided options and default integrations getter function.
107-
* This is an internal method the SDK uses under the hood to set up things - you should not use this as a user!
108-
* Instead, use `init()` to initialize the SDK.
109-
*
110-
* @hidden
111-
* @internal
107+
* This is an internal method the SDK uses under the hood to set up things.
112108
*/
113109
function _init(
114110
options: NodeOptions = {},

0 commit comments

Comments
 (0)