ADK for TypeScript: API Reference
    Preparing search index...

    函数:getGcpResource

    • 用于构建描述 Google Cloud 部署情况的 OTel 资源。

      该机制遵循分层优先级规则:首先使用“通用资源”(common resources);其次使用“代理运行时资源”(Agent Runtime resources);接下来使用“OTel环境检测器”(OTel Environment Detector)和“GCP检测器”(GCP Detector);最后使用“代理注册表 URI 丰富功能”(Agent Registry URN Enrichment)。

      参数

      • OptionalprojectId: string

        可选的项目 ID。如果未提供该项目 ID,系统会自动使用 `GOOGLE_CLOUD_PROJECT` 或 `ADC`。

      返回值 Promise<资源>

      检测到的资源对象(Detected Resource object)。