traceAgentInvocation (telemetry/tracing.ts)

adk-js · core/src/telemetry/tracing.ts · typescript · Apache-2.0
analytics

Provides OpenTelemetry tracing utilities for GenAI agent workflows and tool calls

// Source: https://github.com/google/adk-js | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * @license
 * Copyright 2025 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */

/**
 * NOTE:
 *
 *    We expect that the underlying GenAI SDK will provide a certain
 *    level of tracing and logging telemetry aligned with Open Telemetry
 *    Semantic Conventions (such as logging prompts, responses,
 *    request properties, etc.) and so the information that is recorded by the
 *    Agent Development Kit should be focused on the higher-level
 *    constructs of the framework that are not observable by the SDK.
 */

import {ApiError, Content, HttpOptions} from '@google/genai';
impo

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key