open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
3.03k stars 2.34k forks source link

[receiver/mongodbatlas] Add mongodb_atlas.cluster.name on metrics resource #21154

Closed dehaansa closed 1 year ago

dehaansa commented 1 year ago

Component(s)

receiver/mongodbatlas

Is your feature request related to a problem? Please describe.

Cluster Name is a very useful attribute to have when identifying issues using MongoDB Atlas metrics.

Describe the solution you'd like

As noted in the client in code, the API does not draw the connection for you from Process (mongod/mongos) to Cluster, but the connection can be easily drawn by using the Cluster's MongoURI and the Process's UserAlias.

"mongo_uri": "mongodb://host1.mongodb.net:27017,host2.mongodb.net:27017,host3.mongodb.net:27017"

"user_alias": "host1.mongodb.net"

Describe alternatives you've considered

There does not appear to be a way in the Atlas API to connect these objects and appropriately label the metrics emitted without using the mentioned connection.

Additional context

No response

github-actions[bot] commented 1 year ago

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

dehaansa commented 1 year ago

I will make this default-disabled, like the user_alias addition in #18881

atoulme commented 1 year ago

Closing as fixed, thanks!