Allow to pass a callback to the initialize method to filter the logs to be sent.
Use case: to avoid a deluge of false positive errors and benign issues.
Example usage:
window.sumoLogicOpenTelemetryRum.initialize({
// ...
collectErrors: true,
filterLog: (log: LogRecord) => {
if (log.message.includes('foo')) {
return undefined; // returning undefined will filter out this log
}
log.message = 'Bar ' + log.message; // optional: can modify log
return log; // return modified log to be used
}
});
Allow to pass a callback to the
initialize
method to filter the logs to be sent. Use case: to avoid a deluge of false positive errors and benign issues.Example usage:
This can be called in
recordLog
: