PromucFlow_constructor/app/server/appsmith-plugins/mysqlPlugin
sneha122 28c8c5ad82
chore: added logs for connection pool in mysql (#35255)
## Description

This PR adds logs around connection pool metrics in order to debug
memory leak issue https://github.com/appsmithorg/appsmith/issues/34028

Following metrics are logged for Get strcuture and Excute query calls:
- Acquired  - It indicates number of connections acquired from pool
- Idle - Number of connections sitting idle in the connection pool
- Allocated - Number of connections active / idle in the pool
- Pending - Number of connections pending to be acquired.

This information can help us understand if connections are not being
released from the pool leading to memory leak.

Fixes #35158  
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.Datasource"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10148654649>
> Commit: 2588f79ed0203bd6943408e421f37159dbdfbc48
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10148654649&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Datasource`
> Spec:
> <hr>Mon, 29 Jul 2024 17:38:32 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Enhanced logging capabilities for the MySqlPlugin connection pool
metrics, improving observability during database operations.

- **Bug Fixes**
- Improved monitoring tools to help identify potential memory leak
issues related to connection pool usage.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2024-07-30 16:11:02 +05:30
..
src chore: added logs for connection pool in mysql (#35255) 2024-07-30 16:11:02 +05:30
pom.xml chore: Applied Spotless formatter (#25173) 2023-07-07 00:43:11 +05:30