Skip to content

Instantly share code, notes, and snippets.

@mohsen0
Forked from nitishakalwadi/hikari-pool.txt
Created April 1, 2021 14:07
Show Gist options
  • Save mohsen0/735b6aa934c6e6b5fd3d994fbbe123da to your computer and use it in GitHub Desktop.
Save mohsen0/735b6aa934c6e6b5fd3d994fbbe123da to your computer and use it in GitHub Desktop.
Spring Boot Hikari New Relic
1. Enable hikari mbean registry in application.properties
spring.datasource.hikari.register-mbeans=true
2. Add the new relic custom instrumentation yml file in the extensions directory where new relic agent is present
name: hikari-db
version: 1.0
enabled: true
jmx:
- object_name: com.zaxxer.hikari:type=Pool (SpringBootJPAHikariCP)
metrics:
- attributes: ActiveConnections, IdleConnections, ThreadsAwaitingConnection, TotalConnections
type: simple
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment