How it works
Send ametadata object in the request body. It never reaches the provider — the gateway strips it before forwarding and stores it on the log entry:
Rules
Tracking users
Two separate mechanisms, like the industry-standard gateways:user(body field) — the standard OpenAI field. Forwarded to the provider unchanged, and used as the logged end-user ID when no other value is present.endUserId(token claim orx-gatelit-end-user-idheader) — Gatelit-only, never sent to the provider. Wins overuserwhen both are present.
Filtering logs
The dashboard logs page filters on metadata tags with operators. Multiple conditions can be chained — they are combined with AND:
Example chain:
environment equals production and feature contains summar — only requests carrying both tags match.
Notes:
containstreats%and_as wildcards (SQLILIKEsemantics)- Keys with special characters (dots, quotes, spaces) can only be used with
equals— the other operators address keys as a single path segment - Conditions that are only partially filled in (e.g.
equalswithout a value) are ignored until completed
Common patterns
SDK
The TypeScript SDK exposesmetadata and user on ChatOptions: