Hey folks, I’ve instrumented my API with SigNoz, and it’s working properly. Now, I want to instrume...
j
Hey folks, I’ve instrumented my API with SigNoz, and it’s working properly. Now, I want to instrument MongoDB database queries and errors as well, but I don’t want to add the MongoDB integration. Is there any way to achieve this through code instead?
h
Could you indicate what stack you're using? Assuming NodeJS w/ Mongo, OTel has instructions on manual instrumentation: https://opentelemetry.io/docs/languages/js/instrumentation/#create-spans My opinion is that's a lot of boilerplate, so for our stack I prefer nestjs-otel which provides simple decorators
@Span('myMethod')
. but that's still a lot of manual instrumentation even if it's one-liners. Could you elaborate on why the Mongo integration isn't appropriate for you? Most of auto-instrumentation is done via monkey-patch wrappers so the effort is extremely low and gives much more extensive coverage. You can always configure the libraries or collectors to ignore certain events if too noisy.
j
Thanks , I will try it. i am using Nestjs w/ Mongo