mirror of
https://github.com/gravitational/teleport.git
synced 2026-09-21 14:35:22 +08:00
This change adds tracking for AI-generated session summaries so we can monitor feature usage and token costs. Two new events are introduced: - `SessionSummaryAccessEvent` tracks when users view AI summaries and which session types and resources are accessed. - `SessionSummaryCreateEvent` tracks when summaries are generated, including input and output token counts for cost and capacity planning. Events are aggregated in 15-minute windows by session type (SSH, Kubernetes, database, desktop) and resource name. User access data is added to `UserActivityReport` via a new `SessionSummariesAccessedRecord`. AI generation metrics are reported in a new `IdentitySecuritySummariesGeneratedReport`, which tracks token usage per resource. All resource names are anonymized with HMAC-SHA-256 before submission. Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>