Metlo for NodeJS can further be customized to add more context to collected traces or to enable/disable functionality.
host : Location of the Metlo instance
key : API key used for collecting to Metlo
backendPort : Backend port used by Metlo.
collectorPort : Collector port used to capture traces. Defaults to 8081
logLevel : The log level Metlo should log at. Can be
trace
info
debug
warn
error
getUser : A function that takes in a request/response or context and returns the user for that request. By default, Metlo collects no information about user of a request.
rejectResponse : Response to return when Metlo is set to block malicious requests.
maxBodyCaptureSize : Max size of request/response bodies that Metlo should capture. Defaults to 5 KB
disableBlocking : Used to disable request blocking by Metlo.
In addition, Metlo accepts two environment variables
METLO_DISABLE_BLOCKING : If provided a truthy value (true, 1, yes), then will disable request blocking by Metlo. Defaults to false.
METLO_ENABLE : If left unset or provided a truthy value (true, 1, yes), then will enable Metlo. Conversely, providing a value other than that listed above would disable Metlo. Defaults to true