You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Co-authored-by: amrithss <89491847+amrithss@users.noreply.github.com>
Co-authored-by: Jenni C <97056108+dihydroJenoxide@users.noreply.github.com>
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
Copy file name to clipboardExpand all lines: content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/streaming-the-audit-log-for-your-enterprise.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,8 @@ Streaming audit log data has these benefits:
26
26
***Data continuity**. If you pause a stream, it retains a buffer for seven days, so there is no data loss for the first week. If the stream remains paused for more than seven days, it will resume from a point one week prior to the current time. If paused for three weeks or more, the stream won't retain any data and will start anew from the current timestamp.{% endif %}
27
27
***Data retention**. Keep your exported audit logs and Git events data as long as you need to.
28
28
29
+
You can also stream agent session activity from {% data variables.product.prodname_copilot %} to the same destination you use for other enterprise audit events. This is currently in {% data variables.release-phases.public_preview %}. See [AUTOTITLE](/enterprise-cloud@latest/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-agents/monitor-agentic-activity#tracking-agentic-activity-in-your-enterprise-through-the-audit-log) in the {% data variables.product.prodname_ghe_cloud %} documentation.
30
+
29
31
You can set up{% ifversion pause-audit-log-stream %}, pause,{% endif %} or delete a stream at any time. The stream exports audit and Git events data for all of the organizations in your enterprise, for activity from the time the stream is enabled onwards.
30
32
31
33
All streamed audit logs are sent as compressed JSON files. The filename format is in`YYYY/MM/HH/MM/<uuid>.json.gz`.
@@ -57,6 +59,7 @@ To set up the audit log stream, follow the instructions for your provider:
@@ -265,6 +268,20 @@ To set up streaming to Google Cloud Storage, create a service account in Google
265
268
1. To verify that {% data variables.product.prodname_dotcom %} can connect and write to the Google Cloud Storage bucket, click **Check endpoint**.
266
269
{% data reusables.enterprise.verify-audit-log-streaming-endpoint %}
267
270
271
+
### Setting up streaming to Microsoft Purview
272
+
273
+
{% data reusables.copilot.agent-session-streaming-availability-note %}
274
+
275
+
Microsoft Purview only supports streaming {% data variables.product.prodname_copilot_short %} agent session events. For more information on Microsoft Purview, see [Learn about the Microsoft Purview portal](https://learn.microsoft.com/en-us/purview/purview-portal) in the Microsoft documentation.
276
+
277
+
To set up streaming to Microsoft Purview, configure streaming in {% data variables.product.github %}, then authorize access through Microsoft Entra.
278
+
279
+
1. Configure streaming in {% data variables.product.github %}. See [Enabling audit log streaming of {% data variables.product.prodname_copilot_short %} agent session events](#enabling-audit-log-streaming-of-copilot-agent-session-events) below.
280
+
{% data reusables.enterprise.navigate-to-log-streaming-tab %}
281
+
1. Select the **Configure stream** dropdown and click **Microsoft Purview**.
282
+
1. Click **Authorize with Entra**.
283
+
1. When you're redirected to Microsoft Entra, add the {% data variables.product.github %} app and authorize it for your tenant.
284
+
268
285
### Setting up streaming to Splunk
269
286
270
287
To stream audit logs to Splunk's HTTP Event Collector (HEC) endpoint, make sure that the endpoint is configured to accept HTTPS connections. See [Set up and use HTTP Event Collector in Splunk Web](https://docs.splunk.com/Documentation/Splunk/latest/Data/UsetheHTTPEventCollector) in the Splunk documentation.
@@ -328,3 +345,20 @@ To restart streaming, click **Resume stream**.
328
345
1. Click **Save**.
329
346
330
347
{% endif %}
348
+
349
+
{% ifversion ghec %}
350
+
351
+
## Enabling audit log streaming of {% data variables.product.prodname_copilot_short %} agent session events
352
+
353
+
{% data reusables.copilot.agent-session-streaming-availability-note %}
354
+
355
+
{% data reusables.enterprise-accounts.access-enterprise %}
356
+
1. At the top of the page, click AI Controls
357
+
1. Under "Copilot", select **Enabled everywhere** for "Copilot Usage Records Streaming"
358
+
1. Configure a streaming destination. See [Setting up audit log streaming](#setting-up-audit-log-streaming).
359
+
360
+
You can also retrieve {% data variables.product.prodname_copilot_short %} usage data through the REST API by selecting **Enabled everywhere** for "Copilot Usage Records API". See [AUTOTITLE](/rest/copilot/copilot-usage-metrics#get-copilot-usage-records-for-an-enterprise).
361
+
362
+
For help interpreting the audit log events for agentic activity, see [AUTOTITLE](/copilot/reference/agentic-audit-log-events#streaming-audit-log-events).
Copy file name to clipboardExpand all lines: content/copilot/concepts/agents/enterprise-management.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,8 @@ An agent session encompasses an entire interaction with {% data variables.copilo
44
44
45
45
Enterprise administrators can use AI Controls to view active and recent agent sessions, track audit log events, and search agentic activity in your enterprise using filters. See [AUTOTITLE](/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-agents/monitor-agentic-activity) and [AUTOTITLE](/copilot/reference/agent-session-filters).
46
46
47
+
For long-term retention and analysis, you can stream enterprise audit log data to supported destinations. For more information, see [AUTOTITLE](/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/streaming-the-audit-log-for-your-enterprise) and [AUTOTITLE](/copilot/reference/agentic-audit-log-events).
48
+
47
49
For billing information on agent sessions, see [AUTOTITLE](/billing/concepts/product-billing/github-copilot-premium-requests#usage-by-copilot-cloud-agent).
Copy file name to clipboardExpand all lines: content/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-agents/monitor-agentic-activity.md
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,8 +19,18 @@ category:
19
19
20
20
## Tracking agentic activity in your enterprise through the audit log
21
21
22
+
Track agentic activity on {% data variables.product.github %} or through streaming to an external destination.
23
+
24
+
### Viewing agentic activity in the audit log on {% data variables.product.github %}
25
+
22
26
{% data reusables.enterprise-accounts.access-enterprise %}
23
27
{% data reusables.enterprise-accounts.ai-controls-tab %}
24
-
1. To see a list of agentic activity in your enterprise over the last 180 days, at the bottom of the page, click {% octicon "log" aria-hidden="true" aria-label="log" %} **Audit logs**.
28
+
1. At the bottom of the page, click {% octicon "log" aria-hidden="true" aria-label="log" %} **Audit logs**.
29
+
30
+
### Streaming agentic activity from the audit log
31
+
32
+
{% data reusables.copilot.agent-session-streaming-availability-note %}
33
+
34
+
To enable streaming for {% data variables.product.prodname_copilot_short %} agent session events and configure a streaming destination from your enterprise audit log settings, see [AUTOTITLE](/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).
25
35
26
-
For help interpreting the audit log events for agentic activity, see [AUTOTITLE](/copilot/reference/agentic-audit-log-events).
36
+
In addition to streaming, you can also retrieve Copilot usage data through the REST API. See [AUTOTITLE](/rest/copilot/copilot-usage-metrics#get-copilot-usage-records-for-an-enterprise).
Copy file name to clipboardExpand all lines: content/copilot/reference/agentic-audit-log-events.md
+23-1Lines changed: 23 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,33 @@ category:
10
10
- Learn about Copilot
11
11
---
12
12
13
-
You can apply the `actor:Copilot` filter to your enterprise audit log to view agentic activity over the last 180 days. The following key fields can help you interpret agentic events:
13
+
You can apply the `actor:Copilot` filter to your enterprise audit log to view agentic activity over the last 180 days.
14
+
15
+
The following key fields can help you interpret agentic events:
14
16
15
17
| Field | Description | Example value |
16
18
| --- | --- | --- |
17
19
|`action`| The action performed by the agent, such as creating a pull request. |`pull_request.create`|
18
20
|`actor_is_agent`| Indicates whether the actor is an AI agent. This will always be `true` for agentic audit log events. |`true`|
19
21
|`agent_session_id`| A unique identifier linking to the specific agent session that generated the event. This field only appears when the event is the result of an agent session. |`012345a6-b7c8-9012-de3f-45gh678i9012`|
20
22
|`user`| The person who initiated the agentic event. |`octocat`|
23
+
24
+
## Streaming audit log events
25
+
26
+
{% data reusables.copilot.agent-session-streaming-availability-note %}
27
+
28
+
The table below shows the fields that are included in each streamed {% data variables.product.prodname_copilot_short %} API usage record.
29
+
30
+
Each streamed record is a JSON object with the following properties:
31
+
32
+
| Field | Type | Description |
33
+
| --- | --- | --- |
34
+
|`type`|`string`| The record type (`request` or `response`). |
35
+
|`user_id`|`integer`| The ID of the user who made the request. |
36
+
|`enterprise_id`|`integer`| The ID of the enterprise. |
37
+
|`endpoint`|`string`| The {% data variables.product.prodname_copilot_short %} API endpoint the usage record interacted with. |
38
+
|`body`|`string`| The request or response body (JSON-encoded string). |
39
+
|`@timestamp`|`integer`| Milliseconds since Unix epoch. |
40
+
|`truncated`|`boolean`|`true` when the `body` field has been trimmed to fit within the 1 MB document size limit. Omitted (treated as `false`) when the body is delivered in full. |
41
+
|`event_id`|`string`| Unique event identifier for this streamed usage record. |
42
+
|`github_request_id`|`string`| {% data variables.product.github %} request identifier associated with the {% data variables.product.prodname_copilot_short %} usage event. |
>[!NOTE] This feature is in {% data variables.release-phases.public_preview %} and is available for enterprises that use {% data variables.product.prodname_emus %} and for enterprises that use {% data variables.product.prodname_ghe_cloud %} with data residency.
0 commit comments