Skip to content

aibridge: proxy observability #1185

@dannykopping

Description

@dannykopping

RFC

Acceptance criteria:

  • Requests are logged with appropriate labels
    • Action (proxied to aibridged, passthrough)
      • Passthrough should be debug, proxied info
    • Domain
    • Decrypted (domain was allowlisted)
    • Method
    • Path (not query string params)
    • Provider (if proxied to aibridged)
    • Request ID
  • Metrics are present
    • coder_aibridge_proxy_requests_total{proxied=true/false} (counter)
    • coder_aibridge_proxy_errors_total{type=auth/cert/other} (counter)
    • coder_aibridge_proxy_cert_cache_requests_total{hit=true/false} (counter)
    • coder_aibridge_proxy_cert_cache_size (gauge)
    • coder_aibridge_proxy_ttfb_seconds (histogram, "ttfb" = time to first byte; measures the time it takes to read & decrypt request, gives operators insight into proxy performance)
  • Has tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions