Skip to content

Database Transactions Not Visible on Elastic APM When Using Connection Pooling #67

@ashwani-builds

Description

@ashwani-builds

Describe the bug
When using the dj_db_conn_pool.backends.postgresql package for connection pooling in our Django application, database transactions are no longer visible on Elastic APM. The Elastic APM configuration works correctly with the default Django database backend, but the issue arises after switching to the connection pooling backend.

django's backend
When switching back to Django's default backend (django.db.backends.postgresql), the problem does not occur. Database transactions are visible in Elastic APM as expected.

Environment

Python Version: 3.7
Django Version: 3.2.23
django-db-connection-pool Version: 1.2.5
Elastic APM Version: 6.23.0

Traceback
There is no traceback as the application runs without errors. The issue is related to missing database transaction traces in Elastic APM.

Optional: SQL and parameters
N/A (We have verified that the SQL queries work as expected; this is an issue with visibility in Elastic APM).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions