Skip to main content
Track application requests in code and inspect them in the console. For console dashboards and investigation, see Observability.

Token Usage Tracking

The native Edgee SDK exposes response usage for tracking tokens and costs. The examples below assume an initialized edgee client; see your language’s SDK guide for setup.
Track usage by:
  • Model (GPT-5.2 vs Claude vs Gemini)
  • Project or application
  • Environment (production vs staging)
  • User or tenant (for multi-tenant apps)
  • Time period (daily, weekly, monthly)
Use token usage data with provider pricing to calculate costs. The Edgee dashboard automatically calculates costs based on real-time provider pricing.

Request Tags for Analytics

Tags allow you to categorize and label requests for filtering and grouping in your analytics dashboard. Add tags to track requests by environment, feature, user, team, or any custom dimension. Using tags in native SDKs:
Using tags with OpenAI/Anthropic SDKs via headers: If you’re using the OpenAI or Anthropic SDKs with Edgee, add tags via the x-edgee-tags header (comma-separated):
Common tagging strategies:
Environment taggingTag by environment: production, staging, development
Feature taggingTag by feature: chat, summarization, code-generation, rag-qa
User/tenant taggingTrack per-user or per-tenant usage: user-123, tenant-acme, customer-xyz
Team taggingOrganize by team: team-backend, team-frontend, team-data
Use tags consistently across your application to enable powerful filtering and cost attribution in your analytics dashboard. You can filter by multiple tags to drill down into specific segments (e.g., “production + chat-feature + team-backend”).

Compression Metrics

See exactly how much token compression is saving you on every request:

Reading the compression block

The native Edgee SDK exposes a compression block when compression details are returned. Do not assume every provider-compatible response includes this extension; use the console to inspect those requests.
Field reference: The usage.prompt_tokens field on the same response reflects the compressed count actually billed by the provider, not the original input.