# Make parameters of a SQL query visible as a config option

**URL:** <https://discuss.elastic.co/t/make-parameters-of-a-sql-query-visible-as-a-config-option/217025>\
**Category:** APM\
**Tags:** python\
**Created:** [January 29, 2020, 3:15pm UTC](https://discuss.elastic.co/t/make-parameters-of-a-sql-query-visible-as-a-config-option/217025 "2020-01-29T15:15:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rodrigo\_Jimenez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rodrigo_jimenez/32/34722_2.png) [@Rodrigo\_Jimenez](https://discuss.elastic.co/u/Rodrigo_Jimenez)\
**Post date:** [January 29, 2020, 3:15pm UTC](https://discuss.elastic.co/t/make-parameters-of-a-sql-query-visible-as-a-config-option/217025/1 "2020-01-29T15:15:04Z")

</div>

Hi!,  
We have been using the apm agent for django and it's really cool, but we found that for dev environments we would find the option of seeing the raw SQL query the ORM is doing very very useful.  
I know that these params are obfuscated by design as a security measure but I think it'd be great if you could add a flag to send these params in raw format.

An example would be:

```auto
SELECT (1) AS "a" FROM "table" INNER JOIN "table1" (etc..) **"user_id" = %s** LIMIT 1

```

There is a previous mention to this in : [How to print Query parameters also along with the query?](https://discuss.elastic.co/t/how-to-print-query-parameters-also-along-with-the-query/194016)

Thanks!  
Rodrigo.

**APM Server version** :  
Version 5

**APM Agent language and version** :  
Python - running in django

---

<div class="post-metadata">

**Author:** ![basepi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/basepi/32/53056_2.png) [@basepi](https://discuss.elastic.co/u/basepi)\
**Post date:** [January 29, 2020, 5:34pm UTC](https://discuss.elastic.co/t/make-parameters-of-a-sql-query-visible-as-a-config-option/217025/2 "2020-01-29T17:34:28Z")

</div>

I think this is a cool idea. Would you mind filing a feature request [here](https://github.com/elastic/apm-agent-python/issues)?

---

<div class="post-metadata">

**Author:** ![Rodrigo\_Jimenez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rodrigo_jimenez/32/34722_2.png) [@Rodrigo\_Jimenez](https://discuss.elastic.co/u/Rodrigo_Jimenez)\
**Post date:** [January 31, 2020, 8:06pm UTC](https://discuss.elastic.co/t/make-parameters-of-a-sql-query-visible-as-a-config-option/217025/3 "2020-01-31T20:06:20Z")

</div>

I never asked before. I hope it's ok: [https://github.com/elastic/apm-agent-python/issues/709](https://github.com/elastic/apm-agent-python/issues/709)

Thanks!!!

---

<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:** [February 21, 2020, 4:06pm UTC](https://discuss.elastic.co/t/make-parameters-of-a-sql-query-visible-as-a-config-option/217025/4 "2020-02-21T16:06:22Z")

</div>

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