Fixed a bug in Cross Application Tracing where the agent would sometimes attempt to set a header after headers had already been sent.
Replaced the logger with one that is handles file writes properly lowering overall resource usage.
This is a small change with a large impact.
fs.createWriteStreamreturns whether data was queued or not. If it is queued it is recommended to wait on a
drainevent but this isn't mandatory. Most loggers we've found ignore this event which leads to many writes getting buffered and a rapid increase in native heap size as well as lowering the process's ability to respond to requests.