[DOCS-16502] Investigate changes in SERVER-80676: (SA) Extend the logging system to tag logs with their corresponding service name Created: 16/Nov/23  Updated: 08/Jan/24  Resolved: 18/Dec/23

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 7.2.0-rc0, Server_Docs_[20240108]

Type: Task Priority: Minor - P4
Reporter: Backlog - Core Eng Program Management Team Assignee: Caleb Thompson
Resolution: Done Votes: 0
Labels: feature
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-83749 Improve logService values Closed
Documented
documents SERVER-80676 (SA) Extend the logging system to tag... Closed
Participants:
Days since reply: 7 weeks, 5 days ago

 Description   
Original Downstream Change Summary

As a result of changes introduced here, logging messages produced by servers with the embeddedRouter feature flag set will contain a new top-level attribute between the "ctx" and "msg" fields named "svc". As such, any log ingestion that is sensitive to the format of log messages may need to be updated to account for the presence of this field.

Example of the same (truncated) log line before and after this change:

 

[js_test:config_settings_schema] s20043| {"t":
{"$date":"2023-11-01T14:49:14.124+00:00"}
,"s":"I", "c":"COMMAND", "id":51803, "ctx":"ClusterServerParameterRefresher","msg":"Slow query","attr" 
 
...
 
[js_test:config_settings_schema] s20043| {"t":
{"$date":"2023-11-01T15:00:05.151+00:00"}
,"s":"I", "c":"COMMAND", "id":51803, "svc":"r", "ctx":"ClusterServerParameterRefresher","msg":"Slow query","attr":

 

Description of Linked Ticket

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 Sarah Olson [ 15/Dec/23 ]

caleb.thompson@mongodb.com, can you please put story points into this ticket? And thanks a ton in advance!

Comment by Ashley Brown [ 15/Dec/23 ]

Hey caleb.thompson@mongodb.com, looks like the other ticket is now closed – does it make sense to circle back here?

Comment by Caleb Thompson [ 30/Nov/23 ]

Per James Bronsted: "After discussing with others involved with this effort, we realized there were some additional changes we wanted to make in regards to the original server ticket. That additional work is now being tracked in this ticket. Since we are specifically wanting to change the format of the log service field, would it be alright if we put the docs PR on hold until the new ticket is resolved?"

Comment by Caleb Thompson [ 30/Nov/23 ]

https://github.com/10gen/docs-mongodb-internal/pull/5422

Generated at Thu Feb 08 08:15:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.