spring-boot-data-source-decorator icon indicating copy to clipboard operation
spring-boot-data-source-decorator copied to clipboard

Add ability to configure more parameters for p6spy

Open gavlyukovskiy opened this issue 6 years ago • 7 comments
trafficstars

Currently there is a lot of parameters there is p6spy, but only few can be configured from application.properties/yml. Most popular are covered using spring-boot like properties, but it might be needed to configure raw properties.

gavlyukovskiy avatar Apr 11 '19 00:04 gavlyukovskiy

Hello,

I was looking for a way to filter away e-mail addresses and passhashes from the sql logging. Is there a way to specify a list of properties not to be logged?

Anydag avatar Oct 23 '19 14:10 Anydag

Hi @Anydag, how do you determine that specific value is an email or a passphrase? If you're using named parameters like :email or :password there is no way to tell JDBC driver those parameter names.

gavlyukovskiy avatar Oct 29 '19 21:10 gavlyukovskiy

@gavlyukovskiy , which all parameters of p6spy can be configured via application.properties in this?

devansh-dalal avatar Sep 03 '20 05:09 devansh-dalal

@devansh-dalal currently there are couple of properties you can you to configure p6spy - https://github.com/gavlyukovskiy/spring-boot-data-source-decorator#p6spy, not all of them are mapped directly to properties of p6spy. If you have something specific in mind I can help you

gavlyukovskiy avatar Sep 04 '20 20:09 gavlyukovskiy

sure, thanks a lot. @gavlyukovskiy . Do you thing we can aggregate all the configurable properties(including like decorator.datasource.enabled, decorator.datasource.sleuth.enabled etc) exposed by this autoconfigure somewhere(Maybe in READMEonly )?

devansh-dalal avatar Sep 05 '20 12:09 devansh-dalal

Hello Arthur!

Great, easy, no frills integration for p6spy into spring boot! Well done!

Can i suggest adding the 'sqlexpression' and 'filter' options as parameters? Right now I'm configuring them via spy.properties, but it would be very handy to have these also be included in the parameter list you've assembled.

Thank you!

wimdetroyer avatar Sep 30 '20 15:09 wimdetroyer

@wimdetroyer good suggestion, added decorator.datasource.p6spy.log-filter.pattern that maps to sqlexpression

gavlyukovskiy avatar Oct 05 '20 20:10 gavlyukovskiy