open-telemetry / opentelemetry-js-contrib

OpenTelemetry instrumentation for JavaScript modules
https://opentelemetry.io
Apache License 2.0
709 stars 531 forks source link

instrumentation-mongodb slowdown the db operation when concurrent operations are executed #2544

Open gopinathr143 opened 6 days ago

gopinathr143 commented 6 days ago

What version of OpenTelemetry are you using?

    "@opentelemetry/api": "^1.9.0",
    "@opentelemetry/core": "1.25.1",
    "@opentelemetry/exporter-trace-otlp-grpc": "0.52.1",
    "@opentelemetry/instrumentation": "0.52.1",
    "@opentelemetry/instrumentation-express": "^0.40.1",
    "@opentelemetry/instrumentation-http": "0.52.1",
    "@opentelemetry/instrumentation-ioredis": "0.42.0",
    "@opentelemetry/instrumentation-kafkajs": "0.1.0",
    "@opentelemetry/instrumentation-mongodb": "0.46.0",
    "@opentelemetry/instrumentation-redis-4": "0.40.0",
    "@opentelemetry/instrumentation-winston": "0.38.0",
    "@opentelemetry/propagator-b3": "1.25.1",
    "@opentelemetry/resources": "1.25.1",
    "@opentelemetry/sdk-trace-base": "1.25.1",
    "@opentelemetry/sdk-trace-node": "1.25.1",
    "@opentelemetry/semantic-conventions": "1.25.1",
    "@opentelemetry/winston-transport": "0.4.0",

What version of Node are you using?

v20.11.1

What did you do?

instrumentation-mongodb slowdown the db operation when concurrent operations are executed. We have 10 db operations used to execute concurrently with different collection. Few of mongo-instrumentation has been blocked for sometime and then executing the operations

What did you expect to see?

Concurrent call should be happen without any blockage

What did you see instead?

Additional context

dyladan commented 5 days ago

Can you please provide a reproducer to show what you're referring to? This is tough to track down without some way to test it