hasura / hasura/graphql-engine
is it possible to get `request_id` in postgres function session variables?
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
I'm trying to capture `x-request-id` in postgres trigger for debug and audit purpose. Looks like only header starts with `x-hasura-*` will expose to session variable `CURRENT_SETTING('hasura.user', 't')`.
Is it possible to get `x-request-id` in postgres function session variables?
https://hasura.io/docs/latest/graphql/core/deployment/logging.html#log-structure-and-metrics
Contributor guide
Research direction
Start with the linked logging documentation and the PostgreSQL trigger/session-variable context described in the issue. Trace how request headers are exposed through CURRENT_SETTING('hasura.user', 't') and determine whether x-request-id is included. Done means the supported behavior is established and the issue is resolved with corresponding documentation or implementation guidance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgres
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100