# gavlyukovskiy/spring-boot-data-source-decorator

Spring Boot integration with p6spy, datasource-proxy, flexy-pool and spring-cloud-sleuth

Repository: https://github.com/gavlyukovskiy/spring-boot-data-source-decorator
Canonical: https://ross.abutalabs.com/products/spring-boot-data-source-decorator
Language: Java
License: Apache-2.0
License Family: permissive
Topics: spring-boot, spring-boot-starters, p6spy, flexy-pool, datasource-proxy, datasource, spring-cloud-sleuth, micrometer, connection-pool, jdbc, sql-queries
Last push: 2026-08-24T21:23:39+00:00

## Health v2 (maintenance only)
Score: 86/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 60, longevity 100
- inputs: {"age_days": 3424, "days_push": 9, "days_rel": 110, "gap_med": 125, "n_releases_24m": 6}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1059, forks 98 (observed 2026-08-28T04:03:25.424089+00:00)

## What it is
A Spring Boot auto-configuration library that transparently wraps JDBC DataSources with decorators like P6Spy, datasource-proxy, and FlexyPool. It enables SQL query logging, connection/statement interception, and connection pool metrics via simple starter dependencies and Spring properties.

## Use cases
- log all SQL queries executed by a Spring Boot application
- intercept JDBC Connection, Statement, and ResultSet method calls for debugging
- collect connection pool metrics with FlexyPool and Micrometer
- trace database queries with Spring Cloud Sleuth
- configure datasource proxies via application.properties without manual DataSource wrapping
- toggle query logging on and off per deployment with a property flag

## When to choose
- You use Spring Boot with HikariCP, DBCP2, or other pooled DataSources and want SQL logging or pool metrics without writing custom DataSource wrapper code
- You want declarative, property-based configuration of P6Spy or datasource-proxy
- You need to keep Spring Boot's @ConfigurationProperties datasource features intact while adding decorators

## When to avoid
- You are not using Spring Boot or the JVM/Java ecosystem
- You need a general-purpose JDBC proxy outside of Spring Boot auto-configuration
- You only need simple SQL logging and prefer a lightweight standalone solution like P6Spy directly

## Facets
- artifact type: library
- maturity: active
- function: logging, monitoring, tracing, middleware, database-driver, configuration-management
- domain: databases, developer-tools, monitoring, backend, web-development
- platform: jvm
- tags: spring-boot-starter, p6spy, datasource-proxy, flexy-pool, jdbc, sql-logging, connection-pool, auto-configuration, sql-tracing, query-interception, spring-boot, maven-central

## Member repositories
- gavlyukovskiy/spring-boot-data-source-decorator (main) score 86

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:25.424089+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:57:14.157758+00:00, confidence not recorded.
  - readme: https://github.com/gavlyukovskiy/spring-boot-data-source-decorator (fetched 2026-08-28T04:03:25.424089+00:00, sha 754ae83d4721)
- Data as of 2026-08-30T08:39:29.467469+00:00.
