Event fields
Events are sent to POST /v1/events in batches. Each event describes one HTTP operation or instrumented call.
Required
| SDK (Node) | SDK (Python) | Ingest JSON | Description |
|---|---|---|---|
endpoint | endpoint | endpoint | Route label, e.g. POST /v1/chat |
method | method | method | HTTP verb or OTEL |
statusCode | status_code | status_code | HTTP or synthetic status |
latencyMs | latency_ms | latency_ms | Duration in milliseconds |
Timestamps & size
| Field | Ingest JSON | Description |
|---|---|---|
timestamp | timestamp | Unix seconds (default: now) |
requestSizeBytes | request_size_bytes | Request body size |
responseSizeBytes | response_size_bytes | Response body size |
Provider & AI
| Field | Ingest JSON | Description |
|---|---|---|
provider | provider | e.g. openai, stripe |
providerCategory | provider_category | ai, payments, … |
modelName | model_name | LLM model id |
tokensInput | tokens_input | Input tokens |
tokensOutput | tokens_output | Output tokens |
totalTokens | total_tokens | Total (Node may set explicitly) |
streamingLatencyMs | streaming_latency_ms | Full stream time |
firstTokenLatencyMs | first_token_latency_ms | TTFT |
cacheHit | cache_hit | Prompt cache hit |
costUsd | cost_usd | Estimated USD |
Tracing
| Field | Ingest JSON | Description |
|---|---|---|
traceId | trace_id | 32 hex chars |
spanId | span_id | 16 hex chars |
parentSpanId | parent_span_id | Parent span |
sessionId | session_id | User session |
userId | user_id | User id |
serviceName | service_name | e.g. api, worker |
operationName | operation_name | Operation within service |
environment | environment | production, staging, … |
releaseVersion | release_version | Deploy / git SHA |
Errors & metadata
| Field | Ingest JSON | Description |
|---|---|---|
errorMessage | error_message | Error text for failures |
metadata | metadata | JSON object — no secrets |
retryCount | retry_count | Retry attempt |
isWebhook | is_webhook | Inbound webhook handler |
Path normalization
Middleware rewrites dynamic segments:
- UUIDs →
/:id - Numeric segments →
/:id
GET /users/42/orders/9 → GET /users/:id/orders/:id
Provider auto-detection
Hostnames and path hints map to supported providers. Override with explicit provider when needed.
PII & secrets
WARNING
Do not send passwords, API keys, card numbers, or raw emails in metadata.
