For Agents
Submit distributed trace spans into Google Cloud Trace from any instrumented service. Lets agents push end-to-end latency data into Google's tracing backend for analysis alongside logs and metrics.
Get started with Cloud Trace API in minutes using your preferred integration method.
# Add to your MCP client config (Claude Desktop, Cursor, Windsurf)
{
"jentic": {
"url": "https://api.jentic.com/mcp",
"auth": "oauth"
}
}
# Then ask your agent:
"send trace spans to google cloud"
# → Jentic returns the GET /events tool with parameter schema, agent executes.What an agent can do with Cloud Trace API API.
Batch-write trace spans for a completed request via traces:batchWrite
Create individual spans with parent IDs, timestamps, and attributes
Push OpenTelemetry spans through the official Cloud Trace exporter
Send traces from non-App-Engine workloads such as Cloud Run and GKE
GET STARTED
Use for: I need to send a trace span to Cloud Trace, Batch-write spans for a completed request, Push OpenTelemetry spans into Google Cloud Trace, Create a span representing a downstream API call
Not supported: Does not store logs or metrics, render dashboards, or query trace data — use for ingesting distributed trace spans into Google Cloud Trace only.
Cloud Trace is Google Cloud's distributed tracing backend. The v2 API accepts trace spans from instrumented applications via a single batchWrite endpoint and exposes a span create endpoint, while collected traces are queryable through the Cloud Trace UI and the broader observability stack. App Engine applications send trace data automatically; other workloads push spans through this API or via OpenTelemetry exporters that hit the same endpoints.
Tag spans with build IDs and labels for regression analysis
Patterns agents use Cloud Trace API API for, with concrete tasks.
★ Distributed Tracing For Microservices
Instrument a multi-service application with OpenTelemetry and ship spans to Cloud Trace via the batchWrite endpoint. Each request shows up as an end-to-end trace with latency at every hop, letting platform teams find regressions across service boundaries that would be invisible in single-service profilers.
Batch-write 50 spans representing a single user request through three services to projects/acme via /v2/{name}/traces:batchWrite
Latency Regression Detection
Continuously push trace data into Cloud Trace so the analysis tools can detect latency regressions for a specific RPC after a deploy. Because every span carries start and end timestamps and labels, regression queries can scope to the exact endpoint that changed and surface offending releases without manual log spelunking.
Push spans tagged with build_id=2026-06-10 so Cloud Trace's analysis can compare its p95 latency against the previous build
Spans From Cloud Run And GKE Workloads
Send traces from Cloud Run, Cloud Functions, and GKE workloads that do not benefit from App Engine's automatic tracing. The v2 API takes batched spans with parent IDs, so workloads outside the App Engine runtime can participate in the same traces as the App Engine front end and downstream services.
From a Cloud Run service, batch-write three spans for /api/checkout, the downstream payment call, and the database write under one trace ID
Agent-Submitted Trace Data
An AI agent that orchestrates downstream API calls can submit a trace to Cloud Trace describing each step of its workflow. Through Jentic the agent searches for 'send trace span', loads the spans.batchWrite schema, and pushes its own spans so engineers can see what the agent actually did and where it spent time.
Use Jentic to call traces.batchWrite under projects/acme with five spans representing the agent's plan, search, load, execute, and finalize steps
2 endpoints — cloud trace is google cloud's distributed tracing backend.
METHOD
PATH
DESCRIPTION
/v2/{+name}/traces:batchWrite
Batch-write multiple spans across one or more traces
/v2/{+name}
Create a single span under a parent trace
/v2/{+name}/traces:batchWrite
Batch-write multiple spans across one or more traces
/v2/{+name}
Create a single span under a parent trace
Three things that make agents converge on Jentic-routed access.
Credential isolation
Google OAuth 2.0 refresh tokens for Cloud Trace are stored encrypted in the Jentic vault. Agents receive only short-lived access tokens with the trace.append scope at execution time.
Intent-based discovery
Agents search Jentic with intents like 'send trace span' and Jentic returns the traces.batchWrite operation with its request schema, so the agent does not need to read the Cloud Trace discovery doc.
Time to first call
Direct integration with Cloud Trace: 1-2 days for OAuth setup and OpenTelemetry exporter wiring. Through Jentic: under 30 minutes — search, load schema, execute.
Alternatives and complements available in the Jentic catalogue.
Cloud Logging API
Stores logs that often need to be correlated with trace spans for root-cause analysis
Send logs and traces from the same workload so Google's observability UI can link them by trace ID
Cloud Monitoring API
Stores metrics that complement trace data when investigating regressions
Pair Monitoring metrics with Cloud Trace spans to see whether latency regressions match a CPU or memory spike
Compute Engine API
Hosts the VM workloads whose application code emits Cloud Trace spans
Use Compute Engine to provision instances that run the instrumented services exporting to Cloud Trace
Specific to using Cloud Trace API API through Jentic.
What authentication does the Cloud Trace API use?
It uses Google OAuth 2.0 with the https://www.googleapis.com/auth/trace.append scope for ingestion and https://www.googleapis.com/auth/cloud-platform for the broader read paths. Through Jentic the OAuth credentials are stored encrypted in the Jentic vault and never reach the agent runtime.
Can I push OpenTelemetry spans to Cloud Trace?
Yes. Use the official OpenTelemetry exporter for Cloud Trace, or send spans directly to /v2/{name}/traces:batchWrite. The endpoint accepts a list of spans with their parent IDs, start time, end time, and attributes.
What are the rate limits for the Cloud Trace API?
Span ingestion is limited per project per minute and individual spans are capped in size. Batch your spans into the batchWrite endpoint instead of calling spans.create individually to stay well under the per-minute quota.
How do I send a trace span through Jentic?
Search Jentic for 'send trace span', load the traces.batchWrite schema, and execute the call against /v2/{name}/traces:batchWrite with a list of spans. Jentic returns the schema so the agent does not need to read the Cloud Trace discovery doc.
Is the Cloud Trace API free?
Cloud Trace gives a generous monthly free tier of trace spans per billing account and charges a small fee per million spans beyond that. The API itself has no per-call surcharge.