open-telemetry / opentelemetry-js-contrib

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

Reducing memory consumption #2412

Open tedyu opened 2 months ago

tedyu commented 2 months ago

We use the following versions for opentelemetry:

"@grpc/grpc-js": "1.10.9",
"@opentelemetry/api": "^1.8.0",
"@opentelemetry/core": "^1.23.0",
"@opentelemetry/exporter-metrics-otlp-grpc": "0.51.1",
"@opentelemetry/exporter-trace-otlp-grpc": "^0.50.0",
"@opentelemetry/instrumentation": "^0.50.0",
"@opentelemetry/instrumentation-aws-lambda": "^0.40.0",
"@opentelemetry/instrumentation-aws-sdk": "^0.40.0",
"@opentelemetry/instrumentation-dns": "^0.35.0",
"@opentelemetry/instrumentation-express": "^0.37.0",
"@opentelemetry/instrumentation-fastify": "^0.35.0",
"@opentelemetry/instrumentation-http": "^0.50.0",
"@opentelemetry/instrumentation-ioredis": "^0.39.0",
"@opentelemetry/instrumentation-mongodb": "^0.42.0",
"@opentelemetry/instrumentation-mongoose": "^0.37.0",
"@opentelemetry/instrumentation-net": "^0.35.0",
"@opentelemetry/instrumentation-pino": "^0.37.0",
"@opentelemetry/resource-detector-aws": "^1.4.1",
"@opentelemetry/resource-detector-container": "^0.3.8",
"@opentelemetry/resources": "1.24.1",
"@opentelemetry/sdk-metrics": "1.24.1",
"@opentelemetry/sdk-node": "^0.50.0",
"@opentelemetry/sdk-trace-base": "^1.23.0",
"@opentelemetry/sdk-trace-node": "^1.23.0",
"@opentelemetry/semantic-conventions": "1.24.1",

We noticed increase in memory consumption in production. I want to see if I should use newer releases for any of the above dependencies so that memory consumption is reduced.

Thanks

seemk commented 2 months ago

How large is the memory consumption difference? Is it with only tracing enabled or both metrics and tracing?