darkspark-aws-lambda-edge-plug

0.5.2 • Public • Published

AWS Lambda@Edge Plug for Darkspark

This library allows for the inclusion of Darkspark monitoring into a Node.js origin-response Lambda@Edge function.

Prerequisites

  • An AWS account
  • A CloudFront distribution managing content delivery for the service you wish to monitor
  • A Node.js Lambda@Edge function configured to trigger on origin-response

Usage

Add the package as a dependency to your Lambda's source directory with the following command:

npm install darkspark-aws-lambda-edge-plug

Once you have installed the package, you can import into your project like so:

const { useDarkspark } = require("darkspark-aws-lambda-edge-plug");

And then integrate it into your handler function by calling useDarkspark with the incoming event:

exports.handler = async function(event, context, callback) {
	await useDarkspark(event, "<your Darkspark API key>");

	// other lambda logic
	...

Package Sidebar

Install

npm i darkspark-aws-lambda-edge-plug

Homepage

darkspark.io

Weekly Downloads

0

Version

0.5.2

License

MIT

Unpacked Size

323 kB

Total Files

3

Last publish

Collaborators

  • contxt-ru
  • robbobby
  • neilgallcontxt
  • garydarnell