epsagon-cdk
v0.3.0
Published
<div style="background-color:#Bac7d2;border-radius: 25px"> <p align="center"> <a href="https://epsagon.com" target="_blank" align="center"> <img src="https://cdn2.hubspot.net/hubfs/4636301/Positive%20RGB_Logo%20Horizontal%20-01.svg" width="300">
Downloads
117
Readme
Epsagon Tracing for CDKs
This package provides distributed tracing for Infrastructure as Code applications using Epsagon.
Contents
Installation
Epsagon CDK is available under a variety of languages.
TypeScript & JavaScript
$ npm i epsagon-cdk
Python
$ pip install epsagon-cdk
Usage
Configuration options available at Configurations
@aws-cdk
Initialize the Tracer right inside your function declaration.
Typescript
Replace @aws-cdk-lambda.Function
with epsagon-cdk.LambdaFunction
and add your Epsagon configuration directly to your function options.
import { LambdaFunction, LambdaSingletonFunction } from 'epsagon-cdk'
new LambdaFunction(this, '<FUNC-ID>', {
/* function options */
functionName: '<FUNC-NAME>',
runtime: lambda.Runtime.<RUNTIME>,
code: lambda.Code.fromAsset(path.join(__dirname, '/PATH/TO/FUNC/DIR')),
handler: '<HANDLER>',
/* epsagon tracing config */
token: '<EPSAGON-TOKEN>',
appName: '<EPSAGON-APP-NAME-STAGE>',
metadataOnly: <BOOL>,
debug: <BOOL>,
disable: <BOOL>,
});
LambdaFunction
adds Epsagon as a dependency during bundle-time, increasing package size by no more than 1MB.
lambda.Runtimes supported:
Runtime.PYTHON
Runtime.NODEJS
lambda.Codes supported:
Code.InlineCode
Code.AssetCode