[SERVER-46843] Structured Logging does not log in ISO-8601 Section 5.6 format Created: 13/Mar/20  Updated: 29/Oct/23  Resolved: 16/Mar/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 4.3.4
Fix Version/s: 4.4.0-rc0, 4.7.0

Type: Bug Priority: Major - P3
Reporter: Jonathan Balsano Assignee: Henrik Edin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Documented
is documented by DOCS-13517 Investigate changes in SERVER-46843: ... Closed
Related
Backwards Compatibility: Minor Change
Operating System: ALL
Backport Requested:
v4.4
Sprint: Dev Tools 2020-03-23
Participants:

 Description   

I was running structured logs through the Java Driver and I think the timestamp format we’re currently using is incorrect, specifically for timezone offsets, according to the Extended JSON Spec. On 4.3.4 I’m getting timestamps like "2020-03-12T17:38:02.344-0400" which does not include a : in the offset -0400 however the extended JSON spec calls out specifically that it only supports timezones in the ISO-8601 “Internet Date/Time Format” which corresponds to section 5.6 of RFC-3339 where the only valid time-numoffset includes a :.

This ticket should track a solution that allows drivers following the extended JSON spec to parse structured logs as extended JSON objects according to spec. That might take the form of changing the timestamp string's format, adjusting the extended JSON spec, or another solution I can't see.



 Comments   
Comment by Githook User [ 16/Mar/20 ]

Author:

{'username': 'henrikedin', 'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com'}

Message: SERVER-46843 Format ISO-8601 date time zone offset according to RFC 3339 Section 5.6

(cherry picked from commit d187a3297df58c624d1e53f10959b3920ea218c4)
Branch: v4.4
https://github.com/mongodb/mongo/commit/491c5c43ba1e54a1b7191b90fbc32bbb1adb6d18

Comment by Githook User [ 16/Mar/20 ]

Author:

{'username': 'henrikedin', 'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com'}

Message: SERVER-46843 Format ISO-8601 date time zone offset according to RFC 3339 Section 5.6
Branch: master
https://github.com/mongodb/mongo/commit/d187a3297df58c624d1e53f10959b3920ea218c4

Generated at Thu Feb 08 05:12:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.