---
title: "Google Integration"
sidebar:
  label: "Google"
seo:
  title: "Google Integration with Judgment | Model Provider Docs"
  description: "Use Judgment with Google to capture model calls, trace agent behavior, and evaluate production AI systems."
---

{/* @test-flow
  id: provider-google
  lang: python
  env: JUDGMENT_API_KEY, JUDGMENT_ORG_ID
  skip: Requires GOOGLE_API_KEY which is not available in CI
*/}

If you use Google AI models (Gemini) within your application, you can trace, monitor, and analyze them with **Judgment**. You can do this by either

1. **Judgeval Wrap**: Add our [wrap()](/sdk-reference/python/trace/tracer#wrap) around the initialization of your client
2. **OpenTelemetry**: Use the [GoogleGenerativeAiInstrumentor](https://pypi.org/project/opentelemetry-instrumentation-google-generativeai/) library to wrap Google SDK calls and send Otel spans to Judgment.

1. ### Judgeval Wrap

    ```python
    import google.generativeai as genai
    from judgeval import Tracer, wrap

    Tracer.init(project_name="google_ai_project")

    genai.configure(api_key="your-api-key")

    model = genai.GenerativeModel('gemini-pro')
    wrapped_model = wrap(model)  # Use wrapped_model from here on
    ```

2. ### OpenTelemetry

    ```python
    from judgeval import Tracer
    # Make sure you installed the dependency: opentelemetry-instrumentation-google-generativeai
    from opentelemetry.instrumentation.google_generativeai import GoogleGenerativeAiInstrumentor

    Tracer.init(project_name="google_ai_project")
    Tracer.registerOTELInstrumentation(GoogleGenerativeAiInstrumentor())
    ```

> **Info**
>
> {" "}
> Only use one of these options to trace Google AI calls or you may see
> duplicate tracing.{" "}
