Skip to content

Latest commit

 

History

History
496 lines (294 loc) · 15.9 KB

API.md

File metadata and controls

496 lines (294 loc) · 15.9 KB

API Reference

Constructs

DataDogSidecar

  • Implements: aws-cdk-lib.ITaggable

Initializers

import { DataDogSidecar } from '@pgarbe/cdk-datadog'

new DataDogSidecar(scope: Construct, id: string, taskDefinition: TaskDefinition, props: DataDogSideCarProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
taskDefinition aws-cdk-lib.aws_ecs.TaskDefinition No description.
props DataDogSideCarProps No description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

taskDefinitionRequired
  • Type: aws-cdk-lib.aws_ecs.TaskDefinition

propsRequired

Methods

Name Description
toString Returns a string representation of this construct.

toString
public toString(): string

Returns a string representation of this construct.

Static Functions

Name Description
isConstruct Checks if x is a construct.
addToTaskDefinition Creates a DataDog sidecar to an existing task definition.

isConstruct
import { DataDogSidecar } from '@pgarbe/cdk-datadog'

DataDogSidecar.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


addToTaskDefinition
import { DataDogSidecar } from '@pgarbe/cdk-datadog'

DataDogSidecar.addToTaskDefinition(taskDefinition: TaskDefinition, props: DataDogSideCarProps)

Creates a DataDog sidecar to an existing task definition.

taskDefinitionRequired
  • Type: aws-cdk-lib.aws_ecs.TaskDefinition

propsRequired

Properties

Name Type Description
node constructs.Node The tree node.
tags aws-cdk-lib.TagManager TagManager to set, remove and format tags.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


tagsRequired
public readonly tags: TagManager;
  • Type: aws-cdk-lib.TagManager

TagManager to set, remove and format tags.


Structs

DataDogCredentials

Initializer

import { DataDogCredentials } from '@pgarbe/cdk-datadog'

const dataDogCredentials: DataDogCredentials = { ... }

Properties

Name Type Description
datadogApiKey string No description.
datadogAppKey string No description.
datadogSite DataDogSite No description.

datadogApiKeyOptional
public readonly datadogApiKey: string;
  • Type: string

datadogAppKeyOptional
public readonly datadogAppKey: string;
  • Type: string

datadogSiteOptional
public readonly datadogSite: DataDogSite;

DataDogLambdaAspectProps

Initializer

import { DataDogLambdaAspectProps } from '@pgarbe/cdk-datadog'

const dataDogLambdaAspectProps: DataDogLambdaAspectProps = { ... }

Properties

Name Type Description
dataDogApiKey string | aws-cdk-lib.aws_ssm.IStringParameter Defines the DataDog API Key.
datadogSite DataDogSite Destination site for your metrics, traces, and logs.
logsInjection boolean Inject Datadog trace id into logs for correlation.
nodeVersion string Version of DataDog extension layer for Node runtime.
pythonVersion string Version of DataDog extension layer for Python runtime.
tracing boolean Initialize the Datadog tracer when set to true.

dataDogApiKeyRequired
public readonly dataDogApiKey: string | IStringParameter;
  • Type: string | aws-cdk-lib.aws_ssm.IStringParameter

Defines the DataDog API Key.

A string will be mapped to DD_API_KEY env variable in plain-text (NOT recommended) An SSM StringParamter (optional secure) is mapped to either DD_API_KEY_SECRET_ARN or DD_API_KEY_SSM_NAME.


datadogSiteOptional
public readonly datadogSite: DataDogSite;

Destination site for your metrics, traces, and logs.


logsInjectionOptional
public readonly logsInjection: boolean;
  • Type: boolean
  • Default: : true

Inject Datadog trace id into logs for correlation.


nodeVersionOptional
public readonly nodeVersion: string;
  • Type: string
  • Default: : 41

Version of DataDog extension layer for Node runtime.


pythonVersionOptional
public readonly pythonVersion: string;
  • Type: string
  • Default: : 26

Version of DataDog extension layer for Python runtime.


tracingOptional
public readonly tracing: boolean;
  • Type: boolean
  • Default: : false

Initialize the Datadog tracer when set to true.


DataDogSideCarProps

Initializer

import { DataDogSideCarProps } from '@pgarbe/cdk-datadog'

const dataDogSideCarProps: DataDogSideCarProps = { ... }

Properties

Name Type Description
datadogApiKey aws-cdk-lib.aws_ecs.Secret The secret that stores the Datadog API key.
apmEnabled boolean Enable trace collection with the Trace Agent.
datadogSite DataDogSite Destination site for your metrics, traces, and logs.
jmxFetchEnabled boolean Enable collection of JMX metrics by Java Tracing Agent.
logging aws-cdk-lib.aws_ecs.LogDriver The logging configuration for Datadog container.

datadogApiKeyRequired
public readonly datadogApiKey: Secret;
  • Type: aws-cdk-lib.aws_ecs.Secret

The secret that stores the Datadog API key.


apmEnabledOptional
public readonly apmEnabled: boolean;
  • Type: boolean

Enable trace collection with the Trace Agent.

Default: true


datadogSiteOptional
public readonly datadogSite: DataDogSite;

Destination site for your metrics, traces, and logs.

Default: DataDogSite.us


jmxFetchEnabledOptional
public readonly jmxFetchEnabled: boolean;
  • Type: boolean

Enable collection of JMX metrics by Java Tracing Agent.

Default: true


loggingOptional
public readonly logging: LogDriver;
  • Type: aws-cdk-lib.aws_ecs.LogDriver

The logging configuration for Datadog container.


Classes

DataDogLambda

  • Implements: aws-cdk-lib.IAspect

Adds DataDog layer to supported lambda functions.

Initializers

import { DataDogLambda } from '@pgarbe/cdk-datadog'

new DataDogLambda(props: DataDogLambdaAspectProps)
Name Type Description
props DataDogLambdaAspectProps No description.

propsRequired

Methods

Name Description
visit All aspects can visit an IConstruct.

visit
public visit(node: IConstruct): void

All aspects can visit an IConstruct.

nodeRequired
  • Type: constructs.IConstruct

Static Functions

Name Description
extendFuntions Adds DataDog layer to supported lambda functions.

extendFuntions
import { DataDogLambda } from '@pgarbe/cdk-datadog'

DataDogLambda.extendFuntions(scope: Construct, props: DataDogLambdaAspectProps)

Adds DataDog layer to supported lambda functions.

scopeRequired
  • Type: constructs.Construct

propsRequired

Enums

DataDogSite

Members

Name Description
EU No description.
US No description.

EU

US