0.5.26 • Published 7 months ago

@serverless/sdk v0.5.26

Weekly downloads
16
License
MIT
Repository
github
Last release
7 months ago

@serverless/sdk

Serverless Console SDK

Use case

Environment agnostic Serverless Console instrumentation functions for Node.js applications.

This library is safe to use without side-effects in any Node.js applications. It becomes effective once (one of the listed below) environment specific SDK is loaded on top.

Environment extensions

Installation

npm install @serverless/sdk

Usage

CJS:

const serverlessSdk = require('@serverless/sdk');

// ...
serverlessSdk.captureError(new Error('Unexpected'));

ESM:

import serverlessSdk from '@serverless/sdk';

// ...
serverlessSdk.captureError(new Error('Unexpected'));

Setup

1. Register with Serverless Console

2. Initialize and setup SDK specific to your enviroment

See Environment extensions

2.1 Configuration options

Common options supported by all environments:

SLS_ORG_ID (or options.orgId)

Required setting. Id of your organization in Serverless Console.

SLS_DISABLE_HTTP_MONITORING (or options.disableHttpMonitoring)

Disable tracing of HTTP and HTTPS requests. See HTTP instrumentation

SLS_DISABLE_REQUEST_RESPONSE_MONITORING (or options.disableRequestResponseMonitoring)

(Dev mode only) Disable monitoring requests and reponses (function, AWS SDK requests and HTTP(S) requests)

SLS_DISABLE_EXPRESS_MONITORING (or options.disableExpressMonitoring)

Disable automated express monitoring. See express app instrumentation

SLS_DISABLE_CAPTURED_EVENTS_STDOUT (or options.disableCapturedEventsStdout)

Disable writing captured events registered via .captureError and .captureWarning to stdout

Instrumentation

This package comes with instrumentation for following areas.

Note: instrumentation is enabled via environment specific SDK instance, relying just on @serverless/sdk doesn't enable any instrumentation)

API

0.5.21

9 months ago

0.5.22

9 months ago

0.5.25

9 months ago

0.5.26

7 months ago

0.5.23

9 months ago

0.5.24

9 months ago

0.5.18

12 months ago

0.5.19

12 months ago

0.5.16

12 months ago

0.5.17

12 months ago

0.5.20

11 months ago

0.5.10

1 year ago

0.5.11

1 year ago

0.5.14

1 year ago

0.5.15

1 year ago

0.5.12

1 year ago

0.5.13

1 year ago

0.5.4

1 year ago

0.5.6

1 year ago

0.5.5

1 year ago

0.5.8

1 year ago

0.5.7

1 year ago

0.5.9

1 year ago

0.5.3

1 year ago

0.4.4

1 year ago

0.5.0

1 year ago

0.5.2

1 year ago

0.4.3

1 year ago

0.5.1

1 year ago

0.4.2

1 year ago

0.1.0

1 year ago

0.3.0

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.4.1

1 year ago

0.2.3

1 year ago

0.4.0

1 year ago

0.3.1

1 year ago

0.2.2

1 year ago

0.2.4

1 year ago

0.0.24

6 years ago

0.0.23

6 years ago

0.0.22

6 years ago

0.0.21

6 years ago

0.0.20

6 years ago

0.0.19

6 years ago

0.0.18

6 years ago

0.0.17

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.1

6 years ago