Dd-trace-js: Blocklist for mongodb

Created on 19 Jan 2020  路  6Comments  路  Source: DataDog/dd-trace-js

Hi, I get quite many requests from mongodb that I don't really want to be analyzed as they happen very often and can easily make it up to 1M of spans/month. I tried to find a way to block (filter out) particularly this kind of command but didn't find anything.
image

Is there a way to have something similar to http.blacklist configuration option, but for commands to mongodb?

community feature-request integrations

Most helpful comment

These answers are money guys! Thanks so much! I think that many people like us using the MEAN stack are annoyed of these irrelevant spans showing up in APM.

All 6 comments

We had success setting this environment variable:

DD_APM_IGNORE_RESOURCES="ismaster admin\.\$cmd"

That's on the Docker agent, but I suspect it'd work with other iterations as well.

Wow, thanks @EricZaporzan! It seems working for me, even though we're using DD on Heroku (without Docker) and there are no official docs about this env variable for Heroku agent.

If somebody from the DD team reads this, it would be nice to have this env variable mentioned here: https://docs.datadoghq.com/agent/basic_agent_usage/heroku/. Thanks.

Yes, documentation in this area could be a lot clearer. It seems like any of the variables enumerated in this file should be fair game for any of the iterations of the agent. https://github.com/DataDog/datadog-agent/blob/master/pkg/trace/config/env.go

Glad it worked!

Glad you were able to get it to work! I'll leave the issue open since there would also be value to have this configuration directly in the tracer as well.

For the documentation, in general all environment variables are the same regardless of the how it's deployed. We should probably move the list to a single place instead of duplicating subsets.

Thanks, @rochdev 馃檹 It would definitely help developers to find a way to filter out something redundant like those ismaster admin.cmd queries in my case.

These answers are money guys! Thanks so much! I think that many people like us using the MEAN stack are annoyed of these irrelevant spans showing up in APM.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stephenh picture stephenh  路  4Comments

Cretezy picture Cretezy  路  5Comments

pauldraper picture pauldraper  路  6Comments

zen0wu picture zen0wu  路  5Comments

nickpresta picture nickpresta  路  5Comments