![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
@dazn/lambda-powertools-http-client
Advanced tools
HTTP client that supports forwarding correlation IDs (captured via @dazn/lambda-powertools-correlation-ids) and auto-records metrics
Readme
HTTP client that automatically forwards correlation IDs (captured via @dazn/lambda-powertools-correlation-ids
), and follows DAZN's convention around recording metrics around integration points.
Main features:
auto-forwards any correlation IDs captured with the @dazn/lambda-powertools-correlation-ids
package as HTTP headers
auto-record custom metrics using the @dazn/datadog-metrics
package, which defaults to async mode (i.e. writing to stdout
in DogStatsD format) but can be configured via the DATADOG_METRICS_MODE
environment variable
custom metrics include:
{hostName}.response.latency
[histogram
]: e.g. google.com.response.latency
{hostName}.response.{statusCode}
[count
]: e.g. google.com.response.200
metric names can be overriden with the metricName
option (see below for details)
all custom metrics include the tags awsRegion
, functionName
, functionVersion
, method
(e.g. POST
) and path
(e.g. /v1/signin
)
you can add additional tags by passing them in via the metricTags
option (see below for details)
supports timeout
Install from NPM: npm install @dazn/lambda-powertools-http-client
Basic usage looks like this:
const HTTP = require('@dazn/lambda-powertools-http-client')
const sayIt = async () => {
const httpRequest = {
uri: `https://example.com/dev/say`,
method: 'post',
body: { message: 'hello world' }
}
await HTTP(httpRequest)
}
It's essentially a function that accepts a request of type:
{
uri/url : string (either uri or url must be specified)
method : GET (default) | POST | PUT | HEAD | DELETE | PATCH
headers : object
qs : object
body : object
metricName [optional] : string // override the default metric name, e.g. 'adyenApi', which changes metrics to 'adyenapi.latency' and 'adyenapi.202'
metricTags [optional] : string [] // additional tags for metrics, e.g. ['request_type:submit', 'load_test']
timeout [optional] : int (millis)
}
FAQs
HTTP client that supports forwarding correlation IDs (captured via @dazn/lambda-powertools-correlation-ids) and auto-records metrics
The npm package @dazn/lambda-powertools-http-client receives a total of 297 weekly downloads. As such, @dazn/lambda-powertools-http-client popularity was classified as not popular.
We found that @dazn/lambda-powertools-http-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.