[SERVER-49965] Add apiVersion metrics to serverStatus and remove stale metrics Created: 28/Jul/20  Updated: 16/Jan/24  Resolved: 20/Aug/20

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.7.0

Type: Task Priority: Major - P3
Reporter: Pridhvi Vegesna (Inactive) Assignee: Xuerui Fa
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-49963 Store API parameters for serverStatus... Closed
is depended on by SERVER-49379 Metrics for Versioned API Closed
is depended on by SERVER-49966 Examine performance bottlenecking of ... Closed
Documented
is documented by DOCS-15016 Investigate changes in SERVER-49965: ... Closed
Problem/Incident
causes SERVER-57477 stdx::erase_if for stdx::unordered_map Closed
causes SERVER-57480 Invalid iterator access in api_versio... Closed
Related
Backwards Compatibility: Fully Compatible
Sprint: Repl 2020-08-24
Participants:

 Description   

Metrics schema in serverStatus.metrics:

"apiVersions": {
 
  "": ["default"],
 
  "appName1": ["default"],
 
  "appName2": ["1"],
 
  "appName3": ["default", "1"]
 
}

Timestamps that are older than 1 day should be removed.



 Comments   
Comment by Githook User [ 20/Aug/20 ]

Author:

{'name': 'XueruiFa', 'email': 'xuerui.fa@mongodb.com', 'username': 'XueruiFa'}

Message: SERVER-49965: Add apiVersion metrics to serverStatus and remove stale metrics
Branch: master
https://github.com/mongodb/mongo/commit/fbde2a22dab3eaf64c5aec542811be954faaf7e1

Comment by A. Jesse Jiryu Davis [ 19/Aug/20 ]

Right now we don't plan to log this info at the default log level. With mongod -vv you can see clients' whole commands, which will include the API parameters clients passed. At some unknown time we'll introduce API Version 2, and then clients' API versions will actually affect server behavior. We can decide then if we need more logging.

Comment by Xuerui Fa [ 19/Aug/20 ]

Currently, I don't believe it is logged. jesse would be the right person to decide where/how to log these parameters!

Comment by Bruce Lucas (Inactive) [ 19/Aug/20 ]

Thanks for the update about the schema. Note that these will not show up in FTDC because that only carries numeric data. That is probably for the better because there would be potential concerns about the number of different appNames.

WIll this information be logged at some point so that it is available for diagnosing issues?

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