Skip to content

feat(core,node): Add instrumentation for GoogleGenAI#17625

Merged
RulaKhaled merged 10 commits intodevelopfrom
instrument-genai-google
Sep 19, 2025
Merged

feat(core,node): Add instrumentation for GoogleGenAI#17625
RulaKhaled merged 10 commits intodevelopfrom
instrument-genai-google

Conversation

@RulaKhaled
Copy link
Contributor

@RulaKhaled RulaKhaled commented Sep 12, 2025

This PR implements instrumentation for the Google Gen AI SDK, adding automatic tracing for both direct model calls (models.generateContent) and conversational chat sessions (chats.create + sendMessage). The implementation follows Sentry's AI Agents Manual Instrumentation conventions and includes integration tests.

Usage:

import * as Sentry from '@sentry/node';

Sentry.init({
  integrations: [
    Sentry.googleGenAIIntegration({
      recordInputs: true,   // Record prompts/messages
      recordOutputs: true,  // Record AI responses
    }),
  ],
});

// Chat Google GenAI calls are now automatically instrumented

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants