Displaying MongoDB Atlas Metrics on Signoz Dashboard

TLDR Div is unable to display MongoDB Atlas query time data on Signoz Dashboard. Ankit and vishal-signoz suggest checking compatible versions and using different packages, but the issue remains unresolved.

Photo of Div
Div
Wed, 15 Mar 2023 06:23:52 UTC

Hi team, I am using MongoDB atlas for our DB hosting, I checked Signoz docs and the doc mentioned the steps in case the DB instance is running in our own server, is there any easy way to send Mongo query time taking data to Signoz dashboard if we use Atlas ?

Photo of Div
Div
Wed, 15 Mar 2023 06:25:57 UTC

currently its showing no data for mongo, whereas in 1 service where we use postgresql its displaying the data for that without any extra setup steps.

Photo of Div
Div
Wed, 15 Mar 2023 06:26:24 UTC

For mongo

Photo of Ankit
Ankit
Wed, 15 Mar 2023 06:27:20 UTC

so these `Database calls` are generated using traces from client libs used to connect to DB

Photo of Ankit
Ankit
Wed, 15 Mar 2023 06:28:15 UTC

and these are client latency, the latency reported by Atlas might be different as it only starts timing once Atlas receives the request

Photo of Ankit
Ankit
Wed, 15 Mar 2023 06:28:34 UTC

I have seen people see mongo metrics in the charts you show

Photo of Ankit
Ankit
Wed, 15 Mar 2023 06:29:00 UTC

which language and framework do you use? and what is the name of the mongo client package used?

Photo of Div
Div
Wed, 15 Mar 2023 06:32:06 UTC

Framework for service: NestJS (Express,Node) Programming Language : TS (Typescript) MongoClient ORM : Moongoose (@nestjs/mongoose”: “^9.0.3)

Photo of Div
Div
Wed, 15 Mar 2023 07:30:44 UTC

``` this.sdk = new opentelemetry.NodeSDK({ traceExporter, instrumentations: [ getNodeAutoInstrumentations(), new MongoDBInstrumentation({ enhancedDatabaseReporting: true, }), ], resource: new Resource({ [SemanticResourceAttributes.SERVICE_NAME]: `${config.get<string>( 'service.name', )}:${process.env.NODE_ENV}`, }), });``` here is the updated code where I just added ``` new MongoDBInstrumentation({ enhancedDatabaseReporting: true, })``` to instrument mongo data, but still not getting anything on the Signoz Dashboard

Photo of Ankit
Ankit
Wed, 15 Mar 2023 07:40:19 UTC

try this one

Photo of Div
Div
Wed, 15 Mar 2023 10:05:02 UTC

added this as well, but still no luck no data on the metrics

Photo of Div
Div
Wed, 15 Mar 2023 10:06:55 UTC

``` return this.messageRepo.withTransaction(async (session) => { const conversation = await this.conversationRepo.findByIdOrFail( conversationId, { session }, );``` in the code we are calling this on the API call, which is a mongoose code to query db

Photo of Ankit
Ankit
Wed, 15 Mar 2023 11:17:34 UTC

I have little clue after this. vishal-signoz did you ever get your hands with mongoose? Div check the supported version. Also, might be a good time to join otel slack or open an issue with

Photo of vishal-signoz
vishal-signoz
Wed, 15 Mar 2023 12:02:17 UTC

Div Please check compatible mongoose version. You don’t need to add `opentelemetry/instrumentation-mongoose` separately if you are using `opentelemetry/auto-instrumentations-node`

Photo of Div
Div
Wed, 15 Mar 2023 12:03:01 UTC

Thanks, I just added that as well for testing, mongoose was not working, will try the version issue

Photo of vishal-signoz
vishal-signoz
Wed, 15 Mar 2023 12:03:36 UTC

Which mongoose version are you using?

Photo of Div
Div
Wed, 15 Mar 2023 12:03:53 UTC

`"mongoose": "^5.12.7",`

Photo of vishal-signoz
vishal-signoz
Wed, 15 Mar 2023 12:05:35 UTC

And `mongodb` version?

Photo of vishal-signoz
vishal-signoz
Wed, 15 Mar 2023 12:06:53 UTC

And which `opentelemetry/auto-instrumentations-node` version are you using?

Photo of Div
Div
Wed, 15 Mar 2023 12:07:30 UTC

`mongoDB` I need to check, access issue with the instance where its running

Photo of Div
Div
Wed, 15 Mar 2023 12:07:56 UTC

``` "@opentelemetry/api": "^1.4.0", "@opentelemetry/auto-instrumentations-node": "^0.36.3", "@opentelemetry/exporter-trace-otlp-http": "^0.35.1", "@opentelemetry/resources": "^1.9.1", "@opentelemetry/sdk-node": "^0.35.1", "@opentelemetry/semantic-conventions": "^1.9.1"```