Launch Week 02 wrapped — explore all five launches

Google Gemini Enterprise Agent Platform

Export hosted agent traces to Confident AI with OpenTelemetry

Overview

Gemini Enterprise Agent Platform is Google Cloud's platform for building and deploying agents. Its managed Agent Runtime, formerly Vertex AI Agent Engine, hosts agents built with Google ADK and other frameworks.

Send the OpenTelemetry spans generated by your hosted application to Confident AI by configuring an OTLP trace exporter in the agent process. This guide covers custom agents whose instrumentation and exporter you control.

Before You Begin

  • An agent deployed to Agent Runtime with control over its startup and dependencies.
  • OpenTelemetry instrumentation and an OTLP/HTTP protobuf trace exporter.
  • A project API key from Confident AI.
  • Outbound HTTPS access to Confident AI, including any applicable VPC or Agent Gateway egress configuration.

Configure Trace Export

  1. Configure application tracing

    Initialize your agent's instrumentation and an OTLP trace exporter during application startup. For custom agent objects, initialize runtime-only telemetry objects in the deployment's setup lifecycle rather than serializing an active exporter. Container deployments can initialize tracing in their application entry point.

    If you use Google ADK and need instrumentation, follow the Google ADK integration. If your application already emits OpenTelemetry spans, reuse its provider and configure the exporter using OpenTelemetry setup.

  2. Set the Confident AI destination

    Configure the following values for your application's OTLP trace exporter:

    SettingValue
    OTEL_EXPORTER_OTLP_TRACES_ENDPOINThttps://otel.confident-ai.com/v1/traces
    OTEL_EXPORTER_OTLP_TRACES_PROTOCOLhttp/protobuf
    OTEL_EXPORTER_OTLP_TRACES_HEADERSx-confident-api-key=YOUR_CONFIDENT_PROJECT_KEY
    OTEL_SERVICE_NAMEA stable name for your agent

    For an EU project, use https://eu.otel.confident-ai.com/v1/traces. For a self-hosted deployment, use its full OTLP/HTTP traces URL. Store the key in your deployment's secret configuration.

    Set these values in the deployed agent's environment before initializing the exporter. If the framework explicitly supplies an exporter endpoint or authentication, update that configuration directly. Google Cloud authentication for Cloud Trace does not replace the Confident AI project-key header.

  3. Deploy and verify

    Deploy the updated agent and invoke it once. Open the Observatory in your Confident AI project and check the incoming trace, span hierarchy, model calls, and tool operations. Allow batched export to complete and flush pending spans during graceful shutdown.

What Gets Captured

Confident AI receives spans exported by your application's instrumentation. This can include agent runs, model calls, tools, and custom operations. This setup does not export all Google-managed platform telemetry or import historical Cloud Trace data.

Prompt and response capture is controlled by the instrumentation. Google's built-in tracing documentation includes a mode that records content as log events; a trace-only exporter does not forward those separate logs. Configure content on spans where your instrumentation supports it, and check the supported attributes.

Troubleshooting

  • Traces appear only in Cloud Trace: verify that the application's exporter points to Confident AI and is not replaced by Google's default telemetry initialization.
  • No traces: confirm the agent emits spans and the exporter is initialized in the deployed process, not only in a local notebook.
  • Export connection errors: check runtime egress access to the selected US, EU, or self-hosted endpoint.
  • Missing messages: check whether content capture is disabled or emitted as separate logs rather than span attributes.

See Google's Agent Runtime tracing documentation and release notes for built-in telemetry and product naming.

Need help wiring this into your stack?Bring traces and evals into the tools your team already usesTalk to an expert

Last updated on

Built byConfident AI