Langfuse JS/TS SDKs
    Preparing search index...

    Type Alias MaskFunction

    MaskFunction: (params: { data: any }) => any

    Function type for masking sensitive data in spans before export.

    Type declaration

      • (params: { data: any }): any
      • Parameters

        • params: { data: any }

          Object containing the data to be masked

          • data: any

            The data that should be masked

        Returns any

        The masked data (can be of any type)

    const maskFunction: MaskFunction = ({ data }) => {
    if (typeof data === 'string') {
    return data.replace(/password=\w+/g, 'password=***');
    }
    return data;
    };