Git Product home page Git Product logo

Comments (6)

tpolecat avatar tpolecat commented on June 21, 2024 2

It's hard to know what to do here since it's often very useful to know the exact arguments when an error occurs. They are also reported in exceptions. An option would be to add something to Encoder to indicate that the arguments shouldn't be logged, like WHERE data = ${text.redacted} and then have the logging mechanisms use an encoder method that respects the redaction request.

from skunk.

mpilquist avatar mpilquist commented on June 21, 2024 2

@zcox That's likely due to an uncaught exception in a fiber, which cats-effect then logs. If we can find the offending fiber, we could fix via .voidError or something similar.

from skunk.

zcox avatar zcox commented on June 21, 2024 1

One thing that isn't quite clear from my description above, but which is included in the linked example repo, is that something inside Skunk (or a dep?) is printing exceptions that occur inside transactions directly to stderr/stdout. This doesn't happen when the exception occurs outside of an explicit transaction. We read through much Skunk code, and could not identify where this printing originates.

That said, exceptions (hopefully) occur rarely in production. Arguments are exposed to tracing on every database operation, successful or failed (modulo sampling). It would be great to be able to disable or configure that.

from skunk.

mpilquist avatar mpilquist commented on June 21, 2024

Adding a redacted method to Encoder seems like a good solution.

from skunk.

mpilquist avatar mpilquist commented on June 21, 2024

Exploring opt-in redaction in #900.

Note the primary key exception example comes from Postgres proper. Not sure best approach there -- we could opt-in regex based parsing of exception messages but not sure if that's a good idea.

from skunk.

mpilquist avatar mpilquist commented on June 21, 2024

Fixed in #900 which is available in Skunk 1.0 release candidates.

from skunk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.