Skip to content

PL-135277: log auth token identifier in proxy#33

Open
elikoga wants to merge 2 commits into
mainfrom
PL-135277-token-usage-logging
Open

PL-135277: log auth token identifier in proxy#33
elikoga wants to merge 2 commits into
mainfrom
PL-135277-token-usage-logging

Conversation

@elikoga

@elikoga elikoga commented Jun 8, 2026

Copy link
Copy Markdown
Member

Log auth token identifier in the main proxy so we know what's going on.

  • Set request.state.token_id in verify_token/verify_admin_token ("admin-token" for static tokens, Aramaki token ID for customer tokens)
  • Add token_id to access log output (second field after IP)

@elikoga elikoga marked this pull request as draft June 8, 2026 12:20
@elikoga elikoga force-pushed the PL-135277-token-usage-logging branch 2 times, most recently from 45b83a4 to 55349e2 Compare June 8, 2026 12:26
- Set request.state.token_id in auth verify_token/verify_admin_token
  (full Aramaki client ID for customer tokens, "admin" for static tokens)
- Add token_id to access log output (second field after IP)
- Add token_id label to gateway_requests_total Prometheus metric
- Update tests to pass mock request to verify_token
@elikoga elikoga force-pushed the PL-135277-token-usage-logging branch 2 times, most recently from 603347c to 6a6afe3 Compare June 8, 2026 12:33
@elikoga elikoga marked this pull request as ready for review June 8, 2026 12:36
- Set request.state.token_id in auth verify_token/verify_admin_token
  ("admin-token" for static tokens, Aramaki client ID for customer tokens)
- Add token_id to access log output (second field after IP)
- Update tests to use shared mock_request_factory fixture
@elikoga elikoga force-pushed the PL-135277-token-usage-logging branch from 6a6afe3 to 1e295f2 Compare June 8, 2026 12:36
@elikoga elikoga changed the title PL-135277: log auth token identifier and token usage in main proxy PL-135277: log auth token identifier in proxy Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant