[SERVER-80676] (SA) Extend the logging system to tag logs with their corresponding service name Created: 01/Sep/23  Updated: 16/Nov/23  Resolved: 03/Nov/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0

Type: Task Priority: Major - P3
Reporter: Antonio Fuschetto Assignee: James Bronsted
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-81358 (SA) Logging support for embedded rou... Closed
is depended on by COMPASS-7463 Investigate changes in SERVER-80676: ... Closed
Documented
is documented by DOCS-16502 Investigate changes in SERVER-80676: ... Closed
Related
related to SERVER-82769 Add LogServices to threads that don't... Backlog
Assigned Teams:
Service Arch
Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2023-10-16, Service Arch 2023-10-30, Service Arch 2023-11-13
Participants:
Linked BF Score: 172

 Description   

By embedding the router service into the MongoD binary, the process will combine logging information for both router and shard roles in the same file, i.e., mongod.log.

To discriminate log traces produced by routers and shards with the same content (e.g., Slow query), a new attribute should be added to the log traces to specify the role that produced it. For example:

{"t":{"$date":"2023-08-08T08:56:43.638+00:00"},"s":"I","c":"COMMAND",  "id":51803,"service":"router","ctx":"conn6","msg":"Slow query","attr":{...}} 



 Comments   
Comment by Githook User [ 03/Nov/23 ]

Author:

{'name': 'James Bronsted', 'email': 'james.bronsted@mongodb.com', 'username': 'jpbronsted'}

Message: SERVER-80676 tag logs with corresponding service name
Branch: master
https://github.com/mongodb/mongo/commit/2df646815dd22d2409379a0e69cd06cc01945e4a

Comment by Tyler Brock [ 09/Sep/23 ]

thank you!

Comment by Billy Donahue [ 08/Sep/23 ]

I just want to add that that early part of the log statement before is fixed-width fields so that log lines are not jagged when eyeballed. We also have to be mindful of column count, so "service":"router", is probably too wide. We are probably looking for something more like "svc":"r",.

Comment by Phoebe Du [ 08/Sep/23 ]

tyler.brock@mongodb.com the status was from the previous assigned-team - I put it back to needs scheduling so someone can pick it up later

Comment by Tyler Brock [ 08/Sep/23 ]

phoebe.du@mongodb.com this has a status of in progress but is assigned to the backlog user, is someone actually working on it?

Generated at Thu Feb 08 06:44:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.