Skip to content

Commit 201a8ad

Browse files
committed
cursor is right
1 parent 6ef5ce0 commit 201a8ad

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

packages/node/src/integrations/tracing/google-genai/instrumentation.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,11 @@ import {
44
InstrumentationBase,
55
InstrumentationNodeModuleDefinition,
66
} from '@opentelemetry/instrumentation';
7-
import type { GoogleGenAIClient, Integration } from '@sentry/core';
7+
import type { GoogleGenAIClient, GoogleGenAIOptions, Integration } from '@sentry/core';
88
import { getCurrentScope, GOOGLE_GENAI_INTEGRATION_NAME, instrumentGoogleGenAIClient, SDK_VERSION } from '@sentry/core';
99

1010
const supportedVersions = ['>=0.10.0 <2'];
1111

12-
interface GoogleGenAIOptions {
13-
recordInputs?: boolean;
14-
recordOutputs?: boolean;
15-
}
16-
1712
export interface GoogleGenAIIntegration extends Integration {
1813
options: GoogleGenAIOptions;
1914
}
@@ -33,11 +28,9 @@ function determineRecordingSettings(
3328
integrationOptions: GoogleGenAIOptions | undefined,
3429
defaultEnabled: boolean,
3530
): { recordInputs: boolean; recordOutputs: boolean } {
36-
if (!integrationOptions?.recordInputs || !integrationOptions.recordOutputs) {
37-
return { recordInputs: defaultEnabled, recordOutputs: defaultEnabled };
38-
}
39-
40-
return { recordInputs: integrationOptions.recordInputs, recordOutputs: integrationOptions.recordOutputs };
31+
const recordInputs = integrationOptions?.recordInputs ?? defaultEnabled;
32+
const recordOutputs = integrationOptions?.recordOutputs ?? defaultEnabled;
33+
return { recordInputs, recordOutputs };
4134
}
4235

4336
/**

0 commit comments

Comments
 (0)