企业内 Copilot 智能体会话的监控与审计配置
介绍在企业中查看最近智能体会话、通过审计日志追踪智能体活动,以及启用 OpenTelemetry 将 Copilot 客户端遥测数据导出到兼容后端的方法,并说明如何在不采集提示与工具内容的前提下归属用户活动。
## [查看您的企业中当前和最近的代理会话](<https://docs.github.com/en/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-agents/monitor-agentic-activity#viewing-active-and-recent-agentic-sessions-in-your-enterprise>) 1. 导航到您的企业。 例如, 从 [企业](<https://github.com/settings/enterprises?ref_product=ghec&ref_type=engagement&ref_style=text>) 页面存档备份,存于互联网档案馆 GitHub.com. 2. 在页面的顶端,单击 **AI 控制器**. 3. 在“代理会话”栏目的页面顶端,您将看到您的企业中最近的三次代理会话。要查看上次24小时的所有代理会话,请单击 **全部查看**. 4. 要过滤代理会话,请单击列表顶端的搜索栏,然后按空格。从显示的下拉菜单中选择您的过滤标准。关于可用的过滤器列表,请参见 [代理会话可用的过滤器](<https://docs.github.com/en/copilot/reference/enterprise-administrators/agent-session-filters>). ## [通过审计日志跟踪贵企业的代理活动](<https://docs.github.com/en/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-agents/monitor-agentic-activity#tracking-agentic-activity-in-your-enterprise-through-the-audit-log>) 在GitHub或通过流到外部目的地的跟踪代理活动. ### [在GitHub的审计日志中查看代理活动](<https://docs.github.com/en/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-agents/monitor-agentic-activity#viewing-agentic-activity-in-the-audit-log-on-github>) 1. 导航到您的企业。 例如, 从 [企业](<https://github.com/settings/enterprises?ref_product=ghec&ref_type=engagement&ref_style=text>) 页面存档备份,存于互联网档案馆 GitHub.com. 2. 在页面的顶端,单击 **AI 控制器**. 3. 在页面底部,单击 **审计记录**. ### [从审计日志流出代理活动](<https://docs.github.com/en/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-agents/monitor-agentic-activity#streaming-agentic-activity-from-the-audit-log>) 说明 此功能在公开预览中。 它只提供给在GitHub.com或GitHub Enterprise Cloud上使用企业管理用户的企业。 允许对代理服务器会话事件进行流化,并配置来自您的企业审计日志设置的流化目的地,参见 [流转您企业的审计日志](<https://docs.github.com/en/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/streaming-the-audit-log-for-your-enterprise#enabling-audit-log-streaming-of-copilot-agent-session-events>). 您可以流到任何被支持的目的地,包括微软Agent 365,这使得您可以与微软Agent 365中的其他代理一起审查副驾驶代理活动. 除了流线,您还可以通过 REST API 检索 Copilot 使用数据. See. [REST API 副驾驶使用度量衡的终点](<https://docs.github.com/en/rest/copilot/copilot-usage-metrics#get-copilot-usage-records-for-an-enterprise>). ## [启用 OpenTelemetry](<https://docs.github.com/en/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-agents/monitor-agentic-activity#enabling-opentelemetry>) OpenTelemetry(OTel)是一个开源可观察性框架,它提供了收集遥测事件和度量衡的标准方法,并导出到兼容的可观察性工具. 当您启用 OTel 监控时, 您可以从用户的副驾驶客户端将数据发送到 OTel 兼容的后端。 这样您就可以分析代理会话, 并理解整个企业的代理用法 。 在不收集提示、响应或工具内容的情况下,将代理活动归属给用户。 `identity` 企业管理环境中的捕获类 : ```json { "telemetry": { "enabled": true, "endpoint": "https://otel-collector.example.com", "protocol": "http/protobuf", "capture": { "identity": true } } } ``` 此配置将认证的副驾驶账户名称、本地操作系统账户和机器名称添加到OTel数据中。每个抓取类默认为 `false`。当审计或调查需要及时、响应、工具或原始政策内容时,您可以独立启用额外课程。 在 VS 代码中,身份捕捉工作为本地和代理主机会话. 5个独立内容捕捉类需要代理主机; 本地代理机牵引使用遗留的 all-or-nothing `captureContent` 设置。 3⁄4 ̄ ̧漯B 附加的抓取类可以包括源代码,文件内容,提示,命令,工具结果,MCP标识符,以及工作空间或用户配置路径。只启用您使用大小写所需的类,并将数据发送给一个已核准的收集器。 关于完整的计划以及每个字段控制的数据,见 [企业管理设置](<https://docs.github.com/en/copilot/reference/enterprise-administrators/enterprise-managed-settings#telemetry>)。关于出口数据的更多信息,参见: [用于物剂监测的OpenTelemetry](<https://docs.github.com/en/copilot/concepts/enterprise/opentelemetry>).
查看原始来源