Skip to content

Commit fe4428e

Browse files
committed
fix(core): Correct GoogleGenAIIstrumentedMethod typo in type name
Rename `GoogleGenAIIstrumentedMethod` to `GoogleGenAIInstrumentedMethod` (previously missing an 'n'). The misspelled name is kept as a deprecated type alias and is still re-exported from `@sentry/core`, so existing consumers continue to work without changes. The deprecated alias will be removed in the next major version.
1 parent 403391e commit fe4428e

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

packages/core/src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,10 @@ export type {
192192
GoogleGenAIClient,
193193
GoogleGenAIChat,
194194
GoogleGenAIOptions,
195-
GoogleGenAIIstrumentedMethod,
195+
GoogleGenAIInstrumentedMethod,
196196
} from './tracing/google-genai/types';
197+
// eslint-disable-next-line deprecation/deprecation
198+
export type { GoogleGenAIIstrumentedMethod } from './tracing/google-genai/types';
197199

198200
export { SpanBuffer } from './tracing/spans/spanBuffer';
199201
export { hasSpanStreamingEnabled } from './tracing/spans/hasSpanStreamingEnabled';

packages/core/src/tracing/google-genai/types.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,14 @@ export interface GoogleGenAIChat {
186186
sendMessageStream: (...args: unknown[]) => Promise<AsyncGenerator<GenerateContentResponse, any, unknown>>;
187187
}
188188

189+
export type GoogleGenAIInstrumentedMethod = keyof typeof GOOGLE_GENAI_METHOD_REGISTRY;
190+
189191
/**
190-
* @deprecated This type is no longer used and will be removed in the next major version.
192+
* @deprecated Use {@link GoogleGenAIInstrumentedMethod} instead. This alias
193+
* preserves backwards compatibility with the misspelled name and will be
194+
* removed in the next major version.
191195
*/
192-
export type GoogleGenAIIstrumentedMethod = keyof typeof GOOGLE_GENAI_METHOD_REGISTRY;
196+
export type GoogleGenAIIstrumentedMethod = GoogleGenAIInstrumentedMethod;
193197

194198
// Export the response type for use in instrumentation
195199
export type GoogleGenAIResponse = GenerateContentResponse;

0 commit comments

Comments
 (0)