@perform/lambda-powertools-pattern-basic

Basic template that configures a 1% smaple rate for debug logs

Moved to @dazn/lambda-powertools-pattern-basic - please migrate to the new package by Tuesday 20th August 2019 as this package will be made private.
Last updated a year ago by automation-drone .
MIT · Original npm · Tarball · package.json
$ cnpm install @perform/lambda-powertools-pattern-basic 
SYNC missed versions from official npm registry.

lambda-powertools-pattern-basic

A basic pattern that helps you follow our guidelines around logging and monitoring.

Main features:

  • configures Datadog metrics namespace using the function name if one is not specified already

  • configures Datadog default tags with awsRegion, functionName, functionVersion and environment

  • applies the @perform/lambda-powertools-middleware-correlation-ids middleware at a default 1% sample rate

  • applies the @perform/lambda-powertools-middleware-sample-logging middleware at a default 1% sample rate

  • applies the @perform/lambda-powertools-middleware-log-timeout middleware at default 10ms threshold (i.e. log an error message 10ms before an invocation actually times out)

  • allow override for the default 1% sample rate via a SAMPLE_DEBUG_LOG_RATE environment variable, to sample debug logs at 5% rate then set SAMPLE_DEBUG_LOG_RATE to 0.05

Getting Started

Install from NPM: npm install @perform/lambda-powertools-pattern-basic

API

const wrap = require('@perform/lambda-powertools-pattern-basic')

module.exports.handler = wrap(async (event, context) => {
  return 42
})

Current Tags

  • 1.8.0                                ...           latest (a year ago)

26 Versions

  • 1.8.0 [deprecated]           ...           a year ago
  • 1.7.0 [deprecated]           ...           a year ago
  • 1.5.0 [deprecated]           ...           a year ago
  • 1.4.2 [deprecated]           ...           a year ago
  • 1.4.0 [deprecated]           ...           a year ago
  • 1.3.0 [deprecated]           ...           a year ago
  • 1.2.0 [deprecated]           ...           2 years ago
  • 1.1.7 [deprecated]           ...           2 years ago
  • 1.1.6 [deprecated]           ...           2 years ago
  • 1.1.4 [deprecated]           ...           2 years ago
  • 1.1.3 [deprecated]           ...           2 years ago
  • 1.0.1 [deprecated]           ...           2 years ago
  • 1.0.0 [deprecated]           ...           2 years ago
  • 0.10.5 [deprecated]           ...           2 years ago
  • 0.10.4 [deprecated]           ...           2 years ago
  • 0.10.3 [deprecated]           ...           2 years ago
  • 0.10.2 [deprecated]           ...           2 years ago
  • 0.10.1 [deprecated]           ...           2 years ago
  • 0.10.0 [deprecated]           ...           2 years ago
  • 0.9.0 [deprecated]           ...           2 years ago
  • 0.8.0 [deprecated]           ...           2 years ago
  • 0.7.0 [deprecated]           ...           2 years ago
  • 0.6.4 [deprecated]           ...           2 years ago
  • 0.6.3 [deprecated]           ...           2 years ago
  • 0.6.2 [deprecated]           ...           2 years ago
  • 0.6.0 [deprecated]           ...           2 years ago
Maintainers (325)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |