Our agent lets you define custom data redaction functions. Use them when you don't want sensitive data from your application getting captured in developer's frontend.
In the following example, there is a simple express server with /secret endpoint defined on line 18. It defines a sensitive variable called secret at line 19 which you do not want to be captured in tracepoints or logpoints.
You can specify the configuration parametercaptureFrameDataReductionCallback at line 4 which defines the custom callback function. ArgumentcaptureFrames is a list of frames captured. Easily redact the secret variable from the top frame as done in this example. Remember to return the captureFrames variable at the end of the callback function.