Trace

Trace

new Trace(optionsopt, parentopt)

Description:
  • AWS X-Ray trace support

    Only supports local daemon UDP port 2000, to test locally

    socat -U -v PIPE udp-recv:2000

Source:
Parameters:
Name Type Attributes Description
options object <optional>
parent Trqce <optional>
Example
var trace = new metrics.Trace({ _host: "127.0.0.1", annotations: { tag: app.onstance.tag, role: app.role } });
var sub1 = trace.start("subsegment1");
sub1.stop();
var sub2 = trace.start("subsegment2");
trace.stop(req);
trace.send();
trace.destroy();

Methods

(static) destroy()

Description:
  • destroy all traces and subsegments

Source:

(static) send()

Description:
  • Sends a segment to local daemon

Source:

(static) start(optionsopt)

Description:
  • Starts a new subsegment

Source:
Parameters:
Name Type Attributes Description
options object <optional>

(static) stop(reqopt)

Description:
  • Closes a segment or subsegment, for segments it sends it right away

Source:
Parameters:
Name Type Attributes Description
req IncomingRequest <optional>

(static) toString()

Source: