New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@zazcar/request

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zazcar/request

Make requests and log in aws cloudwatch metrics

  • 2.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

Keywords

FAQs

Package last updated on 26 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc