gavlyukovskiy/spring-boot-data-source-decorator

Add ability to configure more parameters for p6spy

gavlyukovskiy opened this issue · 7 comments

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.

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?

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 , which all parameters of p6spy can be configured via application.properties in this?

@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

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 )?

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 good suggestion, added decorator.datasource.p6spy.log-filter.pattern that maps to sqlexpression