次の方法で共有


エージェントの監視

重要

Microsoft Agent 365 の早期アクセスを利用するには、フロンティア プレビュープログラムに参加する必要があります。 フロンティアは、Microsoft の最新の AI イノベーションと直接接続します。 Frontier のプレビューは、お客様の契約書に記載されている既存のプレビュー利用規約に従います。 これらの機能は現在開発中であるため、提供状況や機能は今後変更される可能性があります。

Agent 365 エコシステムに参加するには、エージェントに Agent 365 監視機能を追加する必要があります。 Agent 365 監視は、OpenTelemetry (OTel) 上に構築され、すべてのエージェント プラットフォームでテレメトリを一貫して安全にキャプチャするための統合フレームワークを提供します。 この必須コンポーネントを実装することで、IT 管理者は Microsoft 管理センター (MAC) でエージェントの活動を監視し、セキュリティ チームがコンプライアンスと脅威の検出に Defender と Purview を使用することができるようになります。

主な利点

  • エンドツーエンドの可視性: セッション、ツール呼び出し、例外など、すべてのエージェント呼び出しの包括的なテレメトリをキャプチャし、プラットフォーム間で完全なトレーサビリティを提供します。
  • セキュリティ & コンプライアンスの有効化: 統合監査ログを Defender と Purview にフィードし、エージェントの詳細なセキュリティ シナリオとコンプライアンス レポートを有効にします。
  • クロスプラットフォームの柔軟性: OTel 標準に基づいて構築し、Copilot Studio、Foundry、将来のエージェント フレームワークなどの多様なランタイムとプラットフォームをサポートします。
  • 管理者の運用効率: MAC で集中管理された監視を提供し、エージェントを管理する IT チームのロールベースのアクセス制御を使用して、トラブルシューティング時間を短縮し、ガバナンスを向上させます。

インストール

次のコマンドを使用して、Agent 365 でサポートされている言語の監視モジュールをインストールします。

pip install microsoft-agents-a365-observability-core
pip install microsoft-agents-a365-runtime

構成

以下の設定を使って、エージェントのエージェントのAgent 365 Observabilityを有効にしてカスタマイズしてください。

監視に必要な環境変数は次のとおりです:

環境変数 プロパティ
ENABLE_OBSERVABILITY=true トレースを有効または無効にするフラグ。 既定では false
ENABLE_A365_OBSERVABILITY_EXPORTER=true True ログをサービスにエクスポートします。 それ以外の場合は、コンソール エクスポーターにフォールバックします
from microsoft_agents_a365.observability.core import config

def token_resolver(agent_id: str, tenant_id: str) -> str | None:
    # Implement secure token retrieval here
    return "Bearer <token>"

config.configure(
    service_name="my-agent-service",
    service_namespace="my.namespace",
    token_resolver=token_resolver,
)

コンソールにログを記録するトークン リゾルバーを除外します。

バゲッジ属性

BaggageBuilder を使用して、要求のすべてのスパンを流れるコンテキスト情報を設定します。 SDK は、既存の属性を上書きすることなく、空でないすべてのバゲッジ エントリを新しく開始されたスパンにコピーする SpanProcessor を実装します。

from microsoft_agents_a365.observability.core.middleware.baggage_builder import BaggageBuilder

with (
    BaggageBuilder()
    .tenant_id("tenant-123")
    .agent_id("agent-456")
    .correlation_id("corr-789")
    .build()
):
    # Any spans started in this context will receive these as attributes
    pass

トークン リゾルバー

Agent 365 エクスポーターを使用する場合は、認証トークンを返すトークン リゾルバー関数を指定する必要があります。 エージェント ホスティング フレームワークで Agent 365 監視 SDK を使用する場合は、エージェント活動の TurnContext を使用してトークンを生成できます

from microsoft_agents.activity import load_configuration_from_env
from microsoft_agents.authentication.msal import MsalConnectionManager
from microsoft_agents.hosting.aiohttp import CloudAdapter
from microsoft_agents.hosting.core import (
    AgentApplication,
    Authorization,
    MemoryStorage,
    TurnContext,
    TurnState,
)
from microsoft_agents_a365.runtime.environment_utils import (
    get_observability_authentication_scope,
)

agents_sdk_config = load_configuration_from_env(environ)

STORAGE = MemoryStorage()
CONNECTION_MANAGER = MsalConnectionManager(**agents_sdk_config)
ADAPTER = CloudAdapter(connection_manager=CONNECTION_MANAGER)
ADAPTER.use(TranscriptLoggerMiddleware(ConsoleTranscriptLogger()))
AUTHORIZATION = Authorization(STORAGE, CONNECTION_MANAGER, **agents_sdk_config)

AGENT_APP = AgentApplication[TurnState](
    storage=STORAGE, adapter=ADAPTER, authorization=AUTHORIZATION, **agents_sdk_config
)

@AGENT_APP.activity("message", auth_handlers=["AGENTIC"])
async def on_message(context: TurnContext, _state: TurnState):
    aau_auth_token = await AGENT_APP.auth.exchange_token(
                        context,
                        scopes=get_observability_authentication_scope(),
                        auth_handler_id="AGENTIC",
                    )
    # cache this auth token and return via token resolver

自動インストルメンテーション

自動インストルメンテーションは、エージェンティック フレームワーク (SDK) の既存のテレメトリ信号をトレース用に自動的にリッスンし、それらを Agent 365 監視サービスに転送します。 これにより、開発者は監視コードを手動で記述する必要がなくなり、セットアップが簡略化され、一貫したパフォーマンス追跡が保証されます。

自動インストルメンテーションは、複数の SDK とプラットフォームでサポートされています:

プラットフォーム サポートされている SDK / フレームワーク
.NET Semantic KernelOpenAIAgent Framework
Python Semantic KernelOpenAIAgent FrameworkLangChain
Node.js OpenAI

注意

自動インストルメンテーションのサポートは、プラットフォームと SDK の実装によって異なります。

セマンティック カーネル

自動インストルメンテーションにはバゲッジ ビルダーの使用が必要です。 BaggageBuilder を使用してエージェント ID とテナント ID を設定します。

パッケージをインストールする

pip install microsoft-agents-a365-observability-extensions-semantic-kernel

可観測性を構成する

from microsoft_agents_a365.observability.core.config import configure
from microsoft_agents_a365.observability.extensions.semantic_kernel import SemanticKernelInstrumentor

# Configure observability
configure(
    service_name="my-semantic-kernel-agent",
    service_namespace="ai.agents"
)

# Enable auto-instrumentation
instrumentor = SemanticKernelInstrumentor()
instrumentor.instrument()

# Your Semantic Kernel code is now automatically traced

OpenAI

自動インストルメンテーションにはバゲッジ ビルダーの使用が必要です。 BaggageBuilder を使用してエージェント ID とテナント ID を設定します。

パッケージをインストールします。

pip install microsoft-agents-a365-observability-extensions-openai

監視を構成します。

from microsoft_agents_a365.observability.core.config import configure
from microsoft_agents_a365.observability.extensions.openai_agents import OpenAIAgentsTraceInstrumentor

# Configure observability
configure(
    service_name="my-openai-agent",
    service_namespace="ai.agents"
)

# Enable auto-instrumentation
instrumentor = OpenAIAgentsTraceInstrumentor()
instrumentor.instrument()

# Your OpenAI Agents code is now automatically traced

エージェント フレームワーク

自動インストルメンテーションにはバゲッジ ビルダーの使用が必要です。 BaggageBuilder を使用してエージェント ID とテナント ID を設定します。

パッケージをインストールする

pip install microsoft-agents-a365-observability-extensions-agent-framework

可観測性を構成する

from microsoft_agents_a365.observability.core.config import configure
from microsoft_agents_a365.observability.extensions.agentframework.trace_instrumentor import (
    AgentFrameworkInstrumentor,
)

# Configure observability
configure(
    service_name="AgentFrameworkTracingWithAzureOpenAI",
    service_namespace="AgentFrameworkTesting",
)

# Enable auto-instrumentation
AgentFrameworkInstrumentor().instrument()

LangChain フレームワーク

自動インストルメンテーションにはバゲッジ ビルダーの使用が必要です。 BaggageBuilder を使用してエージェント ID とテナント ID を設定します。

パッケージをインストールします。

pip install microsoft-agents-a365-observability-extensions-langchain

可観測性を構成する

from microsoft_agents_a365.observability.core.config import configure
from microsoft_agents_a365.observability.extensions.langchain import CustomLangChainInstrumentor

# Configure observability
configure(
    service_name="my-langchain-agent",
    service_namespace="ai.agents"
)

# Enable auto-instrumentation
CustomLangChainInstrumentor()

# Your LangChain code is now automatically traced

手動インストルメンテーション

Agent 365 監視 SDK を使用して、エージェントの内部動作を理解できます。 SDK には、開始可能な 3 つのスコープが用意されています: InvokeAgentScopeExecuteToolScopeInferenceScope

エージェント呼び出し

このスコープは、エージェント プロセスの開始時に使用する必要があります。 エージェントの呼び出しスコープでは、現在呼び出されているエージェント、エージェント ユーザー データなどのプロパティをキャプチャします。

from microsoft_agents_a365.observability.core.invoke_agent_scope import InvokeAgentScope
from microsoft_agents_a365.observability.core.invoke_agent_details import InvokeAgentDetails
from microsoft_agents_a365.observability.core.tenant_details import TenantDetails
from microsoft_agents_a365.observability.core.request import Request

invoke_details = InvokeAgentDetails(
    details=agent_details,        # AgentDetails instance
    endpoint=my_endpoint,         # Optional endpoint (with hostname/port)
    session_id="session-42"
)
tenant_details = TenantDetails(tenant_id="tenant-123")
req = Request(content="User asks a question")

with InvokeAgentScope.start(invoke_details, tenant_details, req):
    # Perform agent invocation logic
    response = call_agent(...)

ツールの実行

次の例では、監視と監査の目的でテレメトリをキャプチャするために、監視追跡を使用してエージェントのツール実行をインストルメント化する方法を示します。

from microsoft_agents_a365.observability.core.execute_tool_scope import ExecuteToolScope
from microsoft_agents_a365.observability.core.tool_call_details import ToolCallDetails

tool_details = ToolCallDetails(
    tool_name="summarize",
    tool_type="function",
    tool_call_id="tc-001",
    arguments="{'text': '...'}",
    description="Summarize provided text",
    endpoint=None  # or endpoint object with hostname/port
)

with ExecuteToolScope.start(tool_details, agent_details, tenant_details):
    result = run_tool(tool_details)

推論

次の例では、監視追跡を使用して AI モデル推論呼び出しをインストルメント化して、トークンの使用状況、モデルの詳細、応答メタデータをキャプチャする方法を示します。

from microsoft_agents_a365.observability.core.inference_scope import InferenceScope
from microsoft_agents_a365.observability.core.inference_call_details import InferenceCallDetails
from microsoft_agents_a365.observability.core.request import Request

inference_details = InferenceCallDetails(
    operationName=SomeEnumOrValue("chat"),
    model="gpt-4o-mini",
    providerName="azure-openai",
    inputTokens=123,
    outputTokens=456,
    finishReasons=["stop"],
    responseId="resp-987"
)
req = Request(content="Explain quantum computing simply.")

with InferenceScope.start(inference_details, agent_details, tenant_details, req):
    completion = call_llm(...)

ローカルで検証する

観察可能性SDKとの統合が成功しているかを確認するために、エージェントが生成したコンソールログを確認してください。

ENABLE_A365_OBSERVABILITY_EXPORTER 環境変数を false に設定します。 これにより、コンソールにスパン (トレース) をエクスポートします。

サンプルログ

ログはプラットフォームによって少し見た目が異なるかもしれません。

Console log Invoke agent span

この例は、ローカル検証が有効化された際にコンソールのエクスポーターによって印刷される典型的なインボークエージェントのスパンを示しています。

    {
    "name": "invoke_agent Azure OpenAI Agent",
    "context": {
        "trace_id": "0x4bd8f606688c3f3347d69c1b6539c957",
        "span_id": "0x0766d68605234692",
        "trace_state": "[]"
    },
    "kind": "SpanKind.CLIENT",
    "parent_id": null,
    "start_time": "2025-11-24T16:16:54.017403Z",
    "end_time": "2025-11-24T16:17:09.373357Z",
    "status": {
        "status_code": "UNSET"
    },
    "attributes": {
        "operation.source": "SDK",
        "correlation.id": "aaaa0000-bb11-2222-33cc-444444dddddd",
        "gen_ai.conversation.item.link": "http://localhost:56150/_connector",
        "gen_ai.agent.upn": "Delivery Agent",
        "gen_ai.agent.user.id": "aaaaaaaa-bbbb-cccc-1111-222222222222",
        "gen_ai.caller.id": "bbbbbbbb-cccc-dddd-2222-333333333333",
        "gen_ai.caller.name": "Alex Wilber",
        "gen_ai.caller.upn": "Sample UPN",
        "gen_ai.channel.name": "msteams",
        "gen_ai.system": "az.ai.agent365",
        "gen_ai.operation.name": "invoke_agent",
        "gen_ai.agent.id": "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb",
        "gen_ai.agent.name": "Azure OpenAI Agent",
        "gen_ai.agent.description": "An AI agent powered by Azure OpenAI",
        "gen_ai.agent.applicationid": "00001111-aaaa-2222-bbbb-3333cccc4444",
        "gen_ai.conversation.id": "__PERSONAL_CHAT_ID__",
        "tenant.id": "aaaabbbb-0000-cccc-1111-dddd2222eeee",
        "session.id": "__PERSONAL_CHAT_ID__",
        "gen_ai.execution.type": "HumanToAgent",
        "gen_ai.input.messages": "[\"hi, what can you do\"]",
        "gen_ai.output.messages": "[\"Hi! I can assist you with a variety of tasks, including answering questions, providing information on a wide range of topics, helping with problem-solving, offering writing assistance, and more. Just let me know what you need help with!\"]"
    },
    "events": [],
    "links": [],
    "resource": {
        "attributes": {
            "telemetry.sdk.language": "python",
            "telemetry.sdk.name": "opentelemetry",
            "telemetry.sdk.version": "1.38.0",
            "service.namespace": "MyAgentTesting",
            "service.name": "MyAgentTracing"
        },
        "schema_url": ""
    }}

Console Log for execute tool

この例は、ローカル検証時にコンソールエクスポーターが出力する典型的な実行ツールのスパンを示しています。

{
    "name": "execute_tool get_weather",
    "context": {
        "trace_id": "0xa9a1be6323bd52476d6a28b8893c6aa8",
        "span_id": "0x1dec90d34ecc0823",
        "trace_state": "[]"
    },
    "kind": "SpanKind.INTERNAL",
    "parent_id": "0x2e727b4c133cbd50",
    "start_time": "2025-11-24T18:47:55.960305Z",
    "end_time": "2025-11-24T18:47:55.962306Z",
    "status": {
        "status_code": "UNSET"
    },
    "attributes": {
        "operation.source": "SDK",
        "correlation.id": "aaaa0000-bb11-2222-33cc-444444dddddd",
        "gen_ai.conversation.item.link": "http://localhost:56150/_connector",
        "gen_ai.agent.upn": "Delivery Agent",
        "gen_ai.agent.user.id": "aaaaaaaa-bbbb-cccc-1111-222222222222",
        "gen_ai.execution.type": "HumanToAgent",
        "gen_ai.channel.name": "msteams",
        "gen_ai.system": "az.ai.agent365",
        "gen_ai.operation.name": "execute_tool",
        "gen_ai.agent.id": "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb",
        "gen_ai.agent.name": "Azure OpenAI Agent",
        "gen_ai.agent.description": "An AI agent powered by Azure OpenAI",
        "gen_ai.agent.applicationid": "00001111-aaaa-2222-bbbb-3333cccc4444",
        "gen_ai.conversation.id": "__PERSONAL_CHAT_ID__",
        "tenant.id": "aaaabbbb-0000-cccc-1111-dddd2222eeee",
        "gen_ai.tool.name": "get_weather",
        "gen_ai.tool.arguments": "current location",
        "gen_ai.tool.type": "function",
        "gen_ai.tool.call.id": "bbbbbbbb-1111-2222-3333-cccccccccccc",
        "gen_ai.tool.description": "Executing get_weather tool"
    },
    "events": [],
    "links": [],
    "resource": {
        "attributes": {
            "telemetry.sdk.language": "python",
            "telemetry.sdk.name": "opentelemetry",
            "telemetry.sdk.version": "1.38.0",
            "service.namespace": "MyAgentTesting",
            "service.name": "MyAgentTracing"
        },
        "schema_url": ""
    }
}

コンソールログ推論スパン

この例は、ローカル検証に用いられるコンソールエクスポーターからの典型的な推論範囲の出力を示しています。

{
    "name": "Chat gpt-4o-mini",
    "context": {
        "trace_id": "0xceb86559a6f7c2c16a45ec6e0b201ae1",
        "span_id": "0x475beec8c1c4fa56",
        "trace_state": "[]"
    },
    "kind": "SpanKind.CLIENT",
    "parent_id": "0x959a854f18fa2c22",
    "start_time": "2025-11-24T18:04:07.061703Z",
    "end_time": "2025-11-24T18:04:09.506951Z",
    "status": {
        "status_code": "UNSET"
    },
    "attributes": {
        "operation.source": "SDK",
        "correlation.id": "aaaa0000-bb11-2222-33cc-444444dddddd",
        "gen_ai.conversation.item.link": "http://localhost:56150/_connector",
        "gen_ai.agent.upn": "Delivery Agent",
        "gen_ai.agent.user.id": "aaaaaaaa-bbbb-cccc-1111-222222222222",
        "gen_ai.execution.type": "HumanToAgent",
        "gen_ai.channel.name": "msteams",
        "gen_ai.system": "az.ai.agent365",
        "gen_ai.agent.id": "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb",
        "gen_ai.agent.name": "Azure OpenAI Agent",
        "gen_ai.agent.description": "An AI agent powered by Azure OpenAI",
        "gen_ai.agent.applicationid": "00001111-aaaa-2222-bbbb-3333cccc4444",
        "gen_ai.conversation.id": "__PERSONAL_CHAT_ID__",
        "tenant.id": "aaaabbbb-0000-cccc-1111-dddd2222eeee",
        "gen_ai.input.messages": "hi, what can you do",
        "gen_ai.operation.name": "Chat",
        "gen_ai.request.model": "gpt-4o-mini",
        "gen_ai.provider.name": "Azure OpenAI",
        "gen_ai.output.messages": "\"Hello! I can help answer questions, provide information, assist with problem-solving, offer writing suggestions, and more. Just let me know what you need!\"",
        "gen_ai.usage.input_tokens": "33",
        "gen_ai.usage.output_tokens": "32",
        "gen_ai.response.finish_reasons": "[\"stop\"]"
    },
    "events": [],
    "links": [],
    "resource": {
        "attributes": {
            "telemetry.sdk.language": "python",
            "telemetry.sdk.name": "opentelemetry",
            "telemetry.sdk.version": "1.38.0",
            "service.namespace": "MyAgentTesting",
            "service.name": "MyAgentTracing"
        },
        "schema_url": ""
    }
}

観測可能性の要件

IT管理者は、あなたがコードに設定したデータを使ってエージェントの活動を監視します。 不完全なデータとは、観測可能性の利点が十分に発揮されないことを意味します。 エージェントは、期待されるすべての利益を受けるために必要なデータを提供しなければなりません。 検証プロセスによって、このデータの存在が確認されます。

テレメトリーの中には、スコープやコンテキストの概念があります。 エージェントが行う各操作は異なるスコープ内に存在します。 データはBaggageScopeで作成された、またはマニュアル計測で説明されている個別のスコープ内に含めなければなりません。

実装を検証するには、インストゥルメンテーション用のコンソールログを生成するために ローカルでの検証 手順に従ってください。 次に、[Validate for required attributes](#validate-for-rewuired attributes)セクションを確認し、どの属性が必要でどれが任意かを特定しましょう。 検証に合格するためには、必要なすべての属性を設定しなければなりません。

これらのクラスに必要なプロパティとパラメータ値を確認してください:

  • BaggageBuilderクラスで設定したプロパティは、それぞれのスコープのプロパティによって設定または上書きされることがあります。

  • 以下の表のプロパティは InvokeAgentScope.startメソッドを使って設定します。

    データ プロパティ
    invoke_agent_details.details.agent_id AI エージェントの一意識別子
    invoke_agent_details.details.agent_name 人間が判読できる AI エージェントの名前
    invoke_agent_details.details.agent_auid エージェント ユーザー ID (AUID)
    invoke_agent_details.details.agent_upn エージェント ユーザー プリンシパル名 (UPN)
    invoke_agent_details.details.agent_blueprint_id エージェントのブループリント/アプリケーション ID
    invoke_agent_details.details.tenant_id エージェントのテナント ID
    invoke_agent_details.details.conversation_id 会話またはセッションの識別子
    invoke_agent_details.endpoint エージェント呼び出しのエンドポイント
    tenant_details.tenant_id テナントの一意識別子
    request.content 呼び出しのためにエージェントに送信されるペイロード内容
    request.execution_type リクエストの発信元を示す呼び出しタイプ(例: HumanToAgent または AgentToAgent)
    caller_details.caller_id 呼び出し元の一意識別子
    caller_details.caller_upn 呼び出し元のユーザー プリンシパル名 (UPN)
    caller_details.caller_user_id 呼び出し元のユーザー ID
    caller_details.tenant_id 呼び出し元のテナント ID
  • ExecuteToolScope.startメソッドを使って、以下のテーブルのプロパティを設定してください。

    データ プロパティ
    details.tool_name 実行されているツールの名前
    details.arguments ツールの引数/パラメーター
    details.tool_call_id ツール呼び出しの一意識別子
    details.tool_type 実行されているツールの種類
    details.endpoint 外部ツール呼び出しが行われた場合
    agent_details.agent_id AI エージェントの一意識別子
    agent_details.agent_name 人間が判読できる AI エージェントの名前
    agent_details.agent_auid エージェントユーザーID
    agent_details.agent_upn エージェント ユーザー プリンシパル名 (UPN)
    agent_details.agent_blueprint_id エージェントのブループリント/アプリケーション ID
    agent_details.tenant_id エージェントの入居者IDです。
    agent_details.conversation_id エージェント呼び出しの会話ID。
    tenant_details.tenant_id エージェントの入居者IDです。
  • 以下の表のプロパティは InferenceScope.startメソッドを使って設定します。

    データ プロパティ
    details.operationName 推論の操作名/型
    details.model モデル名/識別子
    details.providerName プロバイダー名
    agent_details.agent_id AI エージェントの一意識別子
    agent_details.agent_name 人間が判読できる AI エージェントの名前
    agent_details.agent_auid エージェント ユーザー ID (AUID)
    agent_details.agent_upn エージェント ユーザー プリンシパル名 (UPN)
    agent_details.agent_blueprint_id エージェントのブループリント/アプリケーション ID
    agent_details.tenant_id テナントの一意識別子
    agent_details.conversation_id 会話またはセッションの識別子
    tenant_details.tenant_id テナントの一意識別子
    request.content 推論のためにエージェントに送られたペイロード内容
    request.execution_type リクエストの発信元を示す呼び出しタイプ(例: HumanToAgent または AgentToAgent)
    request.source_metadata チャンネル情報を表現します

ストアパブリッシングのための検証

公開前に、必要なinvoke agent、実行ツール、推論スコープを実装し、エージェントのオブザーバビリティ統合をコンソールログで検証してください。 次に、エージェントのログを以下の属性リストと比較し、必要な属性がすべて揃っているか確認します。各スコープや手荷物ビルダーで属性を取得でき、オプションの属性も自由に追加できます。

ストア公開要件の詳細については、 ストア検証ガイドラインをご覧ください。

InvokeAgentScope attributes

以下のリストは、 InvokeAgentScope開始時に記録される必要およびオプションのテレメトリ属性をまとめたものです。

"attributes": {
        "correlation.id": "Optional",
        "gen_ai.agent.applicationid": "Required",
        "gen_ai.agent.description": "Optional",
        "gen_ai.agent.id": "Required",
        "gen_ai.agent.name": "Required",
        "gen_ai.agent.thought.process": "Optional",
        "gen_ai.agent.upn": "Required",
        "gen_ai.agent.user.id": "Required",
        "gen_ai.caller.agent.applicationid": "Required (if execution type is agent to agent)",
        "gen_ai.caller.agent.id": "Required (if execution type is agent to agent)",
        "gen_ai.caller.agent.name": "Required (if execution type is agent to agent)",
        "gen_ai.caller.client.ip": "Required",
        "gen_ai.caller.id": "Required",
        "gen_ai.caller.name": "Optional",
        "gen_ai.caller.upn": "Required",
        "gen_ai.channel.link": "Optional",
        "gen_ai.channel.name": "Required",
        "gen_ai.conversation.id": "Required",
        "gen_ai.conversation.item.link": "Optional",
        "gen_ai.execution.type": "Required",
        "gen_ai.input.messages": "Required",
        "gen_ai.operation.name": "Required (Set by the SDK)",
        "gen_ai.output.messages": "Required",
        "gen_ai.system": "Optional",
        "hiring.manager.id": "Optional",
        "operation.source": "Required (SDK sets a default value)",
        "server.address": "Required",
        "server.port": "Required",
        "session.id": "Optional",
        "session.description": "Optional",
        "tenant.id": "Required"
    },

ExecuteToolScope属性

以下のリストは、 ExecuteToolScope開始時に記録される必要およびオプションのテレメトリ属性をまとめたものです。

"attributes": {
        "correlation.id": "Optional",
        "gen_ai.agent.applicationid": "Required",
        "gen_ai.agent.description": "Optional",
        "gen_ai.agent.id": "Required",
        "gen_ai.agent.name": "Required",
        "gen_ai.agent.upn": "Required",
        "gen_ai.agent.user.id": "Required",
        "gen_ai.caller.client.ip": "Required",
        "gen_ai.channel.name": "Required",
        "gen_ai.conversation.id": "Required",
        "gen_ai.conversation.item.link": "Optional",
        "gen_ai.execution.type": "HumanToAgent",
        "gen_ai.operation.name": "Required (Set by the SDK)",
        "gen_ai.system": "Optional",
        "gen_ai.tool.arguments": "Required",
        "gen_ai.tool.call.id": "Required",
        "gen_ai.tool.description": "Optional",
        "gen_ai.tool.name": "Required",
        "gen_ai.tool.type": "Required",
        "operation.source": "Required (SDK sets a default value)",
        "server.address": "Required (if tool call is external)",
        "server.port": "Required (if tool call is external)",
        "session.id": "Optional",
        "session.description": "Optional",
        "tenant.id": "Required"
    },

InferenceScope属性

以下のリストは、 InferenceScope開始時に記録される必要およびオプションのテレメトリ属性をまとめたものです。

"attributes": {
        "correlation.id": "Optional",
        "gen_ai.agent.applicationid": "Required",
        "gen_ai.agent.description": "Optional",
        "gen_ai.agent.id": "Required",
        "gen_ai.agent.name": "Required",
        "gen_ai.agent.thought.process": "Optional",
        "gen_ai.agent.upn": "Required",
        "gen_ai.agent.user.id": "Required",
        "gen_ai.caller.client.ip": "Required",
        "gen_ai.channel.link": "Optional",
        "gen_ai.channel.name": "Required",
        "gen_ai.conversation.id": "Required",
        "gen_ai.conversation.item.link": "Optional",
        "gen_ai.execution.type": "Required",
        "gen_ai.input.messages": "Required",
        "gen_ai.operation.name": "Chat",
        "gen_ai.output.messages": "Required",
        "gen_ai.provider.name": "Required",
        "gen_ai.request.model": "Required",
        "gen_ai.response.finish_reasons": "Optional",
        "gen_ai.usage.input_tokens": "Optional",
        "gen_ai.usage.output_tokens": "Optional",
        "hiring.manager.id": "Optional",
        "operation.source": "Required (SDK sets a default value)",
        "session.description": "Optional",
        "session.id": "Optional",
        "tenant.id": "Required"
    }

監視でエージェントをテストする

エージェントに可観測性を実装した後、テレメトリが正しくキャプチャされているかテストしてください。 テスト ガイド に従って環境を設定し、主に 監視ログの表示 セクションに注目して、監視の実装が想定どおりに動作していることを検証します。