# APM transaction for Postgres only showing Begin and Commit statements, why I can't I see the statements in between?

**URL:** <https://discuss.elastic.co/t/apm-transaction-for-postgres-only-showing-begin-and-commit-statements-why-i-cant-i-see-the-statements-in-between/239201>\
**Category:** APM\
**Tags:** nodejs\
**Created:** [June 29, 2020, 11:22pm UTC](https://discuss.elastic.co/t/apm-transaction-for-postgres-only-showing-begin-and-commit-statements-why-i-cant-i-see-the-statements-in-between/239201 "2020-06-29T23:22:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bcollins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bcollins/32/71326_2.png) [@bcollins](https://discuss.elastic.co/u/bcollins)\
**Post date:** [June 29, 2020, 11:22pm UTC](https://discuss.elastic.co/t/apm-transaction-for-postgres-only-showing-begin-and-commit-statements-why-i-cant-i-see-the-statements-in-between/239201/1 "2020-06-29T23:22:54Z")

</div>

All of my transactions that include sql queries are only showing the begin and commit messages.... Is it supposed to display the actual commands that were executed in between?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/e/3e4dd11330425e136f44353d501aa7cae5f4f99b.png)

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [June 30, 2020, 7:11am UTC](https://discuss.elastic.co/t/apm-transaction-for-postgres-only-showing-begin-and-commit-statements-why-i-cant-i-see-the-statements-in-between/239201/2 "2020-06-30T07:11:43Z")

</div>

Hi and welcome to the forum 👋

Could you share which agent, which version, and which database driver you are using?

Thanks,  
Felix

---

<div class="post-metadata">

**Author:** ![bcollins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bcollins/32/71326_2.png) [@bcollins](https://discuss.elastic.co/u/bcollins)\
**Post date:** [June 30, 2020, 5:01pm UTC](https://discuss.elastic.co/t/apm-transaction-for-postgres-only-showing-begin-and-commit-statements-why-i-cant-i-see-the-statements-in-between/239201/3 "2020-06-30T17:01:31Z")

</div>

Thank you:)

I am using the apm-server:7.7.0 helm release, along with elasticsearch helm 7.7.0 and the apm agent in nodejs: "elastic-apm-node": "^3.6.1" with Postgres v11.6

---

<div class="post-metadata">

**Author:** ![fadjar340](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fadjar340/32/43610_2.png) [@fadjar340](https://discuss.elastic.co/u/fadjar340)\
**Post date:** [June 30, 2020, 5:17pm UTC](https://discuss.elastic.co/t/apm-transaction-for-postgres-only-showing-begin-and-commit-statements-why-i-cant-i-see-the-statements-in-between/239201/4 "2020-06-30T17:17:48Z")

</div>

Did you already add pg\_state\_activity and pg\_stat\_statement?

Perhaps you need to view this URL, that similar to use APM:

[https://docs.appdynamics.com/display/PRO45/Configure+PostgreSQL+Collectors](https://docs.appdynamics.com/display/PRO45/Configure+PostgreSQL+Collectors)

Regards,  
Fadjar Tandabawana

---

<div class="post-metadata">

**Author:** ![bcollins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bcollins/32/71326_2.png) [@bcollins](https://discuss.elastic.co/u/bcollins)\
**Post date:** [July 1, 2020, 4:20pm UTC](https://discuss.elastic.co/t/apm-transaction-for-postgres-only-showing-begin-and-commit-statements-why-i-cant-i-see-the-statements-in-between/239201/5 "2020-07-01T16:20:57Z")

</div>

Hmmm so my elastic and applications are running on Kubernetes but my database instance is running on AWS RDS, not sure I'd be able to add those to AWS RDS? Where would this collector be added for elastic apm deployed via helm to kubernetes?

---

<div class="post-metadata">

**Author:** ![fadjar340](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fadjar340/32/43610_2.png) [@fadjar340](https://discuss.elastic.co/u/fadjar340)\
**Post date:** [July 2, 2020, 3:18am UTC](https://discuss.elastic.co/t/apm-transaction-for-postgres-only-showing-begin-and-commit-statements-why-i-cant-i-see-the-statements-in-between/239201/6 "2020-07-02T03:18:03Z")

</div>

Please check this if you need to check the pg\_stat\_activity or pg\_stat\_statement:  
[https://pganalyze.com/docs/install/amazon\_rds/01\_configure\_rds\_instance](https://pganalyze.com/docs/install/amazon_rds/01_configure_rds_instance)

---

<div class="post-metadata">

**Author:** ![bcollins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bcollins/32/71326_2.png) [@bcollins](https://discuss.elastic.co/u/bcollins)\
**Post date:** [July 7, 2020, 1:51pm UTC](https://discuss.elastic.co/t/apm-transaction-for-postgres-only-showing-begin-and-commit-statements-why-i-cant-i-see-the-statements-in-between/239201/7 "2020-07-07T13:51:55Z")

</div>

Thanks. I have activated this on Postgres and the command `"SELECT * FROM pg_stat_statements LIMIT 1;"` returns successfully. However I am still not seeing the sql commands in my spans, just BEGIN and COMMIT.

---

<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:** [July 28, 2020, 9:51am UTC](https://discuss.elastic.co/t/apm-transaction-for-postgres-only-showing-begin-and-commit-statements-why-i-cant-i-see-the-statements-in-between/239201/8 "2020-07-28T09:51:57Z")

</div>

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