-
Notifications
You must be signed in to change notification settings - Fork 31
Description
Report
It seems like the api gateway logs date fields not in a correct ISO-8601 format. e.g. 2025-10-1T04:35:11.187 correct would be 2025-10-01T04:35:11.187Z. When we are trying to parse the message in a logging system we receive errors like this.
OpenSearchException[OpenSearch exception [type=mapper_parsing_exception, reason=failed to parse field [api_gw_timeGenerated] of type [date] in document with id 'f47b8f73-9e86-11f0-aa63-00505682085d'. Preview of field's value: '2025-10-1T05:24:42.248']]; nested: OpenSearchException[OpenSearch exception [type=illegal_argument_exception, reason=failed to parse date field [2025-10-1T05:24:42.248] with format [strict_date_optional_time||epoch_millis]]]; nested: OpenSearchException[OpenSearch exception [type=date_time_parse_exception, reason=Failed to parse with all enclosed parsers]];
Expected Behavior
Log all dates in a valid ISO-8601 format for best compatibility. e.g. 2025-10-01T04:35:11.187Z
Actual Behavior
2025-10-1T04:35:11.187
Dates seem to logged in a custom format. E.g. the day (1) is not zero padded.
Steps to Reproduce the Problem
Logs from self-hosted gateway
[Info] 2025-10-1T04:35:11.187 [GatewayLogs], correlationId: 3fa85f64-5717-4562-b3fc-2c963f66afa6, isRequestSuccess: true, totalTime: 70, category: "GatewayLogs", callerIpAddress: "192.168.45.12", timeGenerated: 2025-10-1T04:35:11.187, region: "eu-west-test01", correlationId: "3fa85f64-5717-4562-b3fc-2c963f66afa6", method: "GET", url: "https://api.example.com/v1/cis/query/get_services?nodeLabel=Service¶meterName=nr¶meterValue=12345", backendResponseCode: 200, responseCode: 200, responseSize: 23249, cache: "none", backendTime: 69, requestSize: 2649, apiId: "sample-api-v1", operationId: "performQueryWithQuery", productId: "delivery-apis", apimSubscriptionId: "test-subscription-001", clientProtocol: "HTTP/1.1", backendProtocol: "HTTP/1.1", apiRevision: "1", clientTlsVersion: "1.2", backendMethod: "GET", backendUrl: "http://internal-service.local:8080/api/v1/cis/query/get_services?nodeLabel=Service¶meterName=nr¶meterValue=12345"
Self-hosted Gateway Version
2.9.2
Deployment
Self-Managed (YAML/Helm)
Platform
Other
Kubernetes Version
Other
Anything else?
No response