Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 522 Bytes

metrics.md

File metadata and controls

21 lines (17 loc) · 522 Bytes

Generating Application Metrics

Application metrics are generated and exposed via an event emitter interface. Whenever a request has been processed and it about to be returned to the customer, a data event will be emitted:

jsonApi.metrics.on("data", function(data) {
  // send data to your metrics stack
});

This is the data made available via this interface:

{
  route: "people/:id/parent",
  verb: "GET",
  httpCode: 200,
  error: "Optional error message",
  duration: 123
}