2.1.1 • Published 6 years ago

@zazcar/request v2.1.1

Weekly downloads
-
License
ISC
Repository
bitbucket
Last release
6 years ago

Zazcar - request

This is a small wrapper around the request-promise package, the objective is to do the quests and have some metrics on cloudwatch for later analysis

How to use

const zazcarRequest = require('@zazcar/request');

// options is similar to the one that you would use with requerst-promise
zazcarRequest.doRequest(options, 'Target api name', 'Your namespace', 'Optional custom path')
.then((result) => {
  // :)
})
.catch((error) => {
  // :(
});

What you get

For the Target api name you will get the aggregated data on:

  • latency(ms)
  • count - total amount of requests done with the target api
  • error4xx - requests that failed with a 4xx error
  • error5xx - requests that failed with a 5xx error
  • errorTimeout - request that timedout
  • errorCount - total amount of requests that failed (4xx, 5xx or other kind of errors)

You also get those metrics for each one of the endpoints that you call, lets say that you make a request to https://api.example.com/user/1 and https://api.example.com/user/

you will have the aggregated metrics given that you did set the same Target api name and namespace on the request.

you also have metrics that are arranged by the Integration name, method and Path

2.1.1

6 years ago

2.1.0

6 years ago

2.0.0

7 years ago

1.1.0

7 years ago

1.0.5

7 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago