Skip to content

Commit c22af28

Browse files
committed
PR review
1 parent 6c169a3 commit c22af28

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

packages/node/src/sdk/client.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ export class NodeClient extends ServerRuntimeClient<NodeClientOptions> {
2121
private _logOnExitFlushListener: (() => void) | undefined;
2222

2323
public constructor(options: NodeClientOptions) {
24-
const serverName = options.skipIncludingServerName
25-
? undefined
26-
: options.serverName || global.process.env.SENTRY_NAME || os.hostname();
24+
const serverName =
25+
options.includeServerName === false
26+
? undefined
27+
: options.serverName || global.process.env.SENTRY_NAME || os.hostname();
2728

2829
const clientOptions: ServerRuntimeClientOptions = {
2930
...options,

packages/node/src/types.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,14 @@ export interface BaseNodeOptions {
6262
profileLifecycle?: 'manual' | 'trace';
6363

6464
/**
65-
* If set to true, the SDK will not automatically detect the `serverName`.
65+
* If set to `false`, the SDK will not automatically detect the `serverName`.
6666
*
6767
* This is useful if you are using the SDK in a CLI app or Electron where the
6868
* hostname might be considered PII.
69+
*
70+
* @default true
6971
*/
70-
skipIncludingServerName?: boolean;
72+
includeServerName?: boolean;
7173

7274
/** Sets an optional server name (device name) */
7375
serverName?: string;

0 commit comments

Comments
 (0)