Skip to content

Fix ServerMonitor thread name JAVA-6135#1861

Merged
strogiyotec merged 3 commits intomongodb:mainfrom
raipc:monitor-thread-name-fix
Mar 17, 2026
Merged

Fix ServerMonitor thread name JAVA-6135#1861
strogiyotec merged 3 commits intomongodb:mainfrom
raipc:monitor-thread-name-fix

Conversation

@raipc
Copy link
Contributor

@raipc raipc commented Jan 13, 2026

Current thread name is verbose and breaks integration with monitoring tools which prohibit = in label values.

Old name example: cluster-ClusterId{value='67664b095dd867448cefc455', description='null'}-db.example.com:27017
New name: cluster-67664b095dd867448cefc455-db.example.com:27017

@raipc raipc requested a review from a team as a code owner January 13, 2026 15:22
@raipc raipc requested a review from strogiyotec January 13, 2026 15:22
@raipc raipc force-pushed the monitor-thread-name-fix branch from eee760d to 2430acf Compare January 14, 2026 16:16
@raipc raipc force-pushed the monitor-thread-name-fix branch from 690110d to bf13f7e Compare January 28, 2026 13:04
@raipc raipc force-pushed the monitor-thread-name-fix branch from bf13f7e to 4aa0777 Compare February 13, 2026 03:39
@raipc raipc force-pushed the monitor-thread-name-fix branch from 4aa0777 to 63a6d20 Compare February 23, 2026 11:51
Current thread name is verbose and breaks integration with monitoring tools which prohibit `=` in label values
@raipc raipc force-pushed the monitor-thread-name-fix branch from 63a6d20 to 02203ac Compare March 4, 2026 16:43
@stIncMale
Copy link
Member

breaks integration with monitoring tools which prohibit = in label values

@raipc, could you please provide more detains about the above, and clarify what you mean by "label values"?

@raipc
Copy link
Contributor Author

raipc commented Mar 5, 2026

could you please provide more detains about the above, and clarify what you mean by "label values"?

When this thread name is collected via JMX and fed into monitoring systems as a label or tag value (e.g. in metrics like {name=jvm.thread.cpu_time.ns, thread=...}), the characters {, }, ', =, , cause issues:

Graphite — uses . as hierarchy separator and does not allow {}; the metric path gets corrupted
InfluxDB — , and = are reserved in line protocol; they require escaping and even then the result is barely readable
Datadog Agent — aggressively normalizes tag values by replacing all special characters with _, so the original structure is lost silently
Micrometer → Graphite/StatsD registry — mangles the value beyond recognition

@strogiyotec
Copy link
Contributor

@raipc thanks for suggestion , as graphite treats . as a hierarchy

series
    A named set of datapoints. A series is identified by a unique name, which is composed of elements separated by periods (.) which are used to display the collection of series into a hierarchical tree. A series storing system load average on a server called apache02 in datacenter metro_east might be named as metro_east.servers.apache02.system.load_average

let me check with the team if server address (dot separated) adds any value , maybe it could be removed so that we can keep cluster-{clusterid)}

@strogiyotec strogiyotec changed the title Fix ServerMonitor thread name Fix ServerMonitor thread name JAVA-6135 Mar 17, 2026
Copy link
Contributor

@strogiyotec strogiyotec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for finding this out

@strogiyotec strogiyotec merged commit e22c589 into mongodb:main Mar 17, 2026
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants