Skip to content

[Feature][ISSUE-V5-17] API Token (local key) dimension — logs & analytics #5

@Moonaria123

Description

@Moonaria123

Background

Users may use different local keys (Dashboard API Tokens) for different agents, but hit analysis and request logs lack an API Token dimension.

Source of truth (main repo): Smart-Router_ForAIAgentsdocs/ISSUE-LOG.mdISSUE-V5-17


User need

Stats and logs (hit analysis, request logs, export, overview, etc.) have no local-key dimension, so calls cannot be analyzed per API Token name.


Goals

  1. Proxy: After auth, persist api_token_id and displayable token name in emitLog / request_logs (consistent with encryption/redaction).
  2. Dashboard: Request log list/filter/export, hit analysis, overview support filter/aggregate by token name or ID.
  3. Data: Extend request_logs / Prisma; migrations and 90-day retention compatible; indexes and aggregation performance.

Related

  • ISSUE-V3-03V3-05 (Token UI), ApiToken model; can ship alongside ISSUE-V5-16 (modality fields)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions