-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Networking & Observability
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Each mongod and mongos has one global MetricTreeSet via globalMetricTreeSet(), which returns a reference to a process-wide StaticImmortal<MetricTreeSet>.
- MetricTreeSet/MetricTree do not own a lock that serializes every mutator and reader on those trees.
- The global trees are populated by MetricBuilder/ CustomMetricBuilder at file scope (startup). It does not enforce init-only registration.
SERVER-123237 is making MetricsService::create* support registering OTEL metrics to the global MetricTreeSet for serverStatus reporting. Without adding a read/write mutex or some synchronization, OTEL metric creation would only be safe during initialization.
The goal of this task is to add a `frozen` flag that will make metric addition assert if done after server initialization. All Otel metrics need to be added proactively during server initialization, before freezing.
- is depended on by
-
SERVER-123784 Pre-register getCommandRegistry metrics and look them up later
-
- In Progress
-
- is related to
-
SERVER-123237 Make MetricsService register metrics on globalMetricTreeSet if ServerStatusOptions is specified
-
- Closed
-
- related to
-
SERVER-123787 Pre-register metrics for getSingletonMetricPtrWithinCmd
-
- Open
-
-
SERVER-123785 Pre-register initializeClusterRole metrics then look them up
-
- In Progress
-
-
SERVER-119071 Display OTel metrics as nested BSON in server status
-
- Closed
-