# Filtering certain SQL queries OR hiding parameters

**URL:** <https://discuss.elastic.co/t/filtering-certain-sql-queries-or-hiding-parameters/235532>\
**Category:** APM\
**Tags:** nodejs\
**Created:** [June 3, 2020, 11:22am UTC](https://discuss.elastic.co/t/filtering-certain-sql-queries-or-hiding-parameters/235532 "2020-06-03T11:22:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ofirz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ofirz/32/69631_2.png) [@ofirz](https://discuss.elastic.co/u/ofirz)\
**Post date:** [June 3, 2020, 11:22am UTC](https://discuss.elastic.co/t/filtering-certain-sql-queries-or-hiding-parameters/235532/1 "2020-06-03T11:22:49Z")

</div>

Hey everyone,

I'm using APM to track my services in Production. Some of these services handle sensitive data that I do not want to show in APM/Elastic. These queries are performed on a seperate DB. Is it possible for me to configure APM to somehow hide queries made to this DB or hide the parameters sent with these queries? I want to still be able to show full DB queries for non-sensitive data so I don't want to filter out calls to DB alltogether. Can this be configured in some way in APM?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![axw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axw/32/28197_2.png) [@axw](https://discuss.elastic.co/u/axw)\
**Post date:** [June 8, 2020, 2:59am UTC](https://discuss.elastic.co/t/filtering-certain-sql-queries-or-hiding-parameters/235532/2 "2020-06-08T02:59:41Z")

</div>

Hi @ofirz, welcome to the forum!

> Is it possible for me to configure APM to somehow hide queries made to this DB or hide the parameters sent with these queries? I want to still be able to show full DB queries for non-sensitive data so I don't want to filter out calls to DB alltogether. Can this be configured in some way in APM?

You could do this with an [ingest node pipeline](https://www.elastic.co/guide/en/apm/server/current/configuring-ingest-node.html), dropping the `span.db.statement` field conditional on the value of `span.db.instance`.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 28, 2020, 10:59pm UTC](https://discuss.elastic.co/t/filtering-certain-sql-queries-or-hiding-parameters/235532/3 "2020-06-28T22:59:53Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
