LogEntry
Defined in: src/policies/observability/request-log.ts:29
Structured log entry emitted for each request/response pair.
Properties
Section titled “Properties”clientIp
Section titled “clientIp”clientIp:
string
Defined in: src/policies/observability/request-log.ts:43
Client IP from CF-Connecting-IP or X-Forwarded-For.
durationMs
Section titled “durationMs”durationMs:
number
Defined in: src/policies/observability/request-log.ts:41
End-to-end request duration in milliseconds.
extra?
Section titled “extra?”
optionalextra:Record<string,unknown>
Defined in: src/policies/observability/request-log.ts:61
Custom fields from extractFields callback.
gatewayName
Section titled “gatewayName”gatewayName:
string
Defined in: src/policies/observability/request-log.ts:47
Gateway name from config.
method
Section titled “method”method:
string
Defined in: src/policies/observability/request-log.ts:35
HTTP method (e.g. "GET", "POST").
path:
string
Defined in: src/policies/observability/request-log.ts:37
URL pathname (without query string).
requestBody?
Section titled “requestBody?”
optionalrequestBody:unknown
Defined in: src/policies/observability/request-log.ts:57
Captured request body (when logRequestBody is enabled).
requestId
Section titled “requestId”requestId:
string
Defined in: src/policies/observability/request-log.ts:33
Unique request ID for distributed tracing.
responseBody?
Section titled “responseBody?”
optionalresponseBody:unknown
Defined in: src/policies/observability/request-log.ts:59
Captured response body (when logResponseBody is enabled).
routePath
Section titled “routePath”routePath:
string
Defined in: src/policies/observability/request-log.ts:49
Matched route path pattern.
spanId?
Section titled “spanId?”
optionalspanId:string
Defined in: src/policies/observability/request-log.ts:55
W3C Trace Context — 16-hex span ID for this gateway request.
statusCode
Section titled “statusCode”statusCode:
number
Defined in: src/policies/observability/request-log.ts:39
HTTP response status code.
timestamp
Section titled “timestamp”timestamp:
string
Defined in: src/policies/observability/request-log.ts:31
ISO 8601 timestamp when the log was emitted.
traceId?
Section titled “traceId?”
optionaltraceId:string
Defined in: src/policies/observability/request-log.ts:53
W3C Trace Context — 32-hex trace ID.
upstream
Section titled “upstream”upstream:
string
Defined in: src/policies/observability/request-log.ts:51
Upstream identifier (reserved for future enrichment).
userAgent
Section titled “userAgent”userAgent:
string
Defined in: src/policies/observability/request-log.ts:45
Client User-Agent header value.