From fe4428e90e54df4b72c52a3f2f67b42439ac3473 Mon Sep 17 00:00:00 2001 From: Alexander Pantiukhov Date: Tue, 21 Apr 2026 13:01:55 +0200 Subject: [PATCH] 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. --- packages/core/src/index.ts | 4 +++- packages/core/src/tracing/google-genai/types.ts | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 38a1c2d4a5ab..c3f8c454e997 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -192,8 +192,10 @@ export type { GoogleGenAIClient, GoogleGenAIChat, GoogleGenAIOptions, - GoogleGenAIIstrumentedMethod, + GoogleGenAIInstrumentedMethod, } from './tracing/google-genai/types'; +// eslint-disable-next-line deprecation/deprecation +export type { GoogleGenAIIstrumentedMethod } from './tracing/google-genai/types'; export { SpanBuffer } from './tracing/spans/spanBuffer'; export { hasSpanStreamingEnabled } from './tracing/spans/hasSpanStreamingEnabled'; diff --git a/packages/core/src/tracing/google-genai/types.ts b/packages/core/src/tracing/google-genai/types.ts index 69f1e279fbd0..35ca728a4a60 100644 --- a/packages/core/src/tracing/google-genai/types.ts +++ b/packages/core/src/tracing/google-genai/types.ts @@ -186,10 +186,14 @@ export interface GoogleGenAIChat { sendMessageStream: (...args: unknown[]) => Promise>; } +export type GoogleGenAIInstrumentedMethod = keyof typeof GOOGLE_GENAI_METHOD_REGISTRY; + /** - * @deprecated This type is no longer used and will be removed in the next major version. + * @deprecated Use {@link GoogleGenAIInstrumentedMethod} instead. This alias + * preserves backwards compatibility with the misspelled name and will be + * removed in the next major version. */ -export type GoogleGenAIIstrumentedMethod = keyof typeof GOOGLE_GENAI_METHOD_REGISTRY; +export type GoogleGenAIIstrumentedMethod = GoogleGenAIInstrumentedMethod; // Export the response type for use in instrumentation export type GoogleGenAIResponse = GenerateContentResponse;