Skip to content

Latest commit

 

History

History
632 lines (384 loc) · 34.5 KB

API.md

File metadata and controls

632 lines (384 loc) · 34.5 KB

API Reference

Structs

LumigoProps

Initializer

import { LumigoProps } from '@lumigo/cdk-constructs-v2'

const lumigoProps: LumigoProps = { ... }

Properties

Name Type Description
lumigoToken aws-cdk-lib.SecretValue A reference to a secret containing of the Lumigo token of the Lumigo project to be used with instrumented Lambda functions and ECS workloads.

lumigoTokenRequired
public readonly lumigoToken: SecretValue;
  • Type: aws-cdk-lib.SecretValue

A reference to a secret containing of the Lumigo token of the Lumigo project to be used with instrumented Lambda functions and ECS workloads.

Instructions on how to retrieve your Lumigo token are available in the Lumigo tokens documentation. For more information concerning how AWS CDK 2 handles secrets, consult the AWS SDK SecretValue documentation.


LumigoTraceProps

Initializer

import { LumigoTraceProps } from '@lumigo/cdk-constructs-v2'

const lumigoTraceProps: LumigoTraceProps = { ... }

Properties

Name Type Description
applyAutoTraceTag boolean Whether the Lumigo CDK constructs should automatically add the lumigo:auto-trace AWS tag with the version of the construct in use.
lambdaEnableW3CTraceContext boolean Whether the Lumigo Lambda tracers will add the W3C Trace Context traceparent and tracestate HTTP headers to outgoing HTTP/HTTPS requests. These headers are necessary to correctly correlate the HTTP requests from Lambda to workloads instrumented with the Lumigo OpenTelemetry distributions. The only real case in which this property should be set to false, is if there is some HTTP request issued by the Lambda function that is going towards an API with request signature that is affected negatively by the additional headers. If you encounter such an occurrence, please get in touch with Lumigo's support; we will issue an update to the Lumigo Lambda tracers to automatically not add W3C Trace Context to those APIs.
lambdaNodejsLayerVersion number Which version of the lumigo-node-tracer AWS Lambda layer to be used when instrumenting AWS Lambda functions using a supported Node.js runtime. Available layer versions depend on the AWS region your Lambda function is deployed in, see the lumigo-node-tracer versions list. The default value is the latest Node.js layer at the time of release of this version of the Lumigo CDK constructs: default Node.js versions.
lambdaPythonLayerVersion number Which version of the lumigo-python-tracer AWS Lambda layer to be used when instrumenting AWS Lambda functions using a supported Python runtime.
lumigoAutoTraceImage string Which container image to use to instrument ECS workloads.
lumigoTag string Which Lumigo tag to apply to your instrumented Lambda functions and ECS workloads.
traceEcs boolean Whether to automatically trace all the Java, Node.js and Python Lambda functions deployed on ECS by this construct using the respective Lumigo OpenTelemetry distributions.
traceLambda boolean Whether to automatically trace all the Node.js and Python Lambda functions in this construct using Lumigo Lambda auto-instrumentation.

applyAutoTraceTagOptional
public readonly applyAutoTraceTag: boolean;
  • Type: boolean
  • Default: true

Whether the Lumigo CDK constructs should automatically add the lumigo:auto-trace AWS tag with the version of the construct in use.


lambdaEnableW3CTraceContextOptional
public readonly lambdaEnableW3CTraceContext: boolean;
  • Type: boolean
  • Default: true

Whether the Lumigo Lambda tracers will add the W3C Trace Context traceparent and tracestate HTTP headers to outgoing HTTP/HTTPS requests. These headers are necessary to correctly correlate the HTTP requests from Lambda to workloads instrumented with the Lumigo OpenTelemetry distributions. The only real case in which this property should be set to false, is if there is some HTTP request issued by the Lambda function that is going towards an API with request signature that is affected negatively by the additional headers. If you encounter such an occurrence, please get in touch with Lumigo's support; we will issue an update to the Lumigo Lambda tracers to automatically not add W3C Trace Context to those APIs.


lambdaNodejsLayerVersionOptional
public readonly lambdaNodejsLayerVersion: number;
  • Type: number

Which version of the lumigo-node-tracer AWS Lambda layer to be used when instrumenting AWS Lambda functions using a supported Node.js runtime. Available layer versions depend on the AWS region your Lambda function is deployed in, see the lumigo-node-tracer versions list. The default value is the latest Node.js layer at the time of release of this version of the Lumigo CDK constructs: default Node.js versions.


lambdaPythonLayerVersionOptional
public readonly lambdaPythonLayerVersion: number;
  • Type: number

Which version of the lumigo-python-tracer AWS Lambda layer to be used when instrumenting AWS Lambda functions using a supported Python runtime.

Available layer versions depend on the AWS region your Lambda function is deployed in, see the lumigo-python-tracer versions list. The default value is the latest Python layer at the time of release of this version of the Lumigo CDK constructs: default Python versions.


lumigoAutoTraceImageOptional
public readonly lumigoAutoTraceImage: string;
  • Type: string

Which container image to use to instrument ECS workloads.

Use a valid, full image name of the lumigo/lumigo-autotrace image, e.g., public.ecr.aws/lumigo/lumigo-autotrace:v14.

This property is exposed to support two use-cases: pinning a specific tag of the lumigo/lumigo-autotrace image, or supporting use-cases where Amazon ECS will not be able to pull from the Amazon ECS Public Gallery registry. The available tags are listed on the lumigo/lumigo-autotrace Amazon ECR Public Gallery page. The default value is the latest tag at the time of release of this version of the Lumigo CDK constructs: default lumigo/lumigo-autotrace image


lumigoTagOptional
public readonly lumigoTag: string;
  • Type: string

Which Lumigo tag to apply to your instrumented Lambda functions and ECS workloads.

Lumigo Tags add dimension to your Lambda functions so that they can be identified, managed, organized, searched for, and filtered in Lumigo. For more information on Lumigo tags, refer to the Lumigo tokens documentation.


traceEcsOptional
public readonly traceEcs: boolean;
  • Type: boolean
  • Default: true

Whether to automatically trace all the Java, Node.js and Python Lambda functions deployed on ECS by this construct using the respective Lumigo OpenTelemetry distributions.


traceLambdaOptional
public readonly traceLambda: boolean;
  • Type: boolean
  • Default: true

Whether to automatically trace all the Node.js and Python Lambda functions in this construct using Lumigo Lambda auto-instrumentation.


TraceEcsScheduledTaskProps

Initializer

import { TraceEcsScheduledTaskProps } from '@lumigo/cdk-constructs-v2'

const traceEcsScheduledTaskProps: TraceEcsScheduledTaskProps = { ... }

Properties

Name Type Description
applyAutoTraceTag boolean Whether the Lumigo CDK constructs should automatically add the lumigo:auto-trace AWS tag with the version of the construct in use.
lumigoAutoTraceImage string Which container image to use to instrument ECS workloads.
lumigoTag string Which Lumigo tag to apply to your instrumented Lambda functions and ECS workloads.

applyAutoTraceTagOptional
public readonly applyAutoTraceTag: boolean;
  • Type: boolean
  • Default: true

Whether the Lumigo CDK constructs should automatically add the lumigo:auto-trace AWS tag with the version of the construct in use.


lumigoAutoTraceImageOptional
public readonly lumigoAutoTraceImage: string;
  • Type: string

Which container image to use to instrument ECS workloads.

Use a valid, full image name of the lumigo/lumigo-autotrace image, e.g., public.ecr.aws/lumigo/lumigo-autotrace:v14.

This property is exposed to support two use-cases: pinning a specific tag of the lumigo/lumigo-autotrace image, or supporting use-cases where Amazon ECS will not be able to pull from the Amazon ECS Public Gallery registry. The available tags are listed on the lumigo/lumigo-autotrace Amazon ECR Public Gallery page. The default value is the latest tag at the time of release of this version of the Lumigo CDK constructs: default lumigo/lumigo-autotrace image


lumigoTagOptional
public readonly lumigoTag: string;
  • Type: string

Which Lumigo tag to apply to your instrumented Lambda functions and ECS workloads.

Lumigo Tags add dimension to your Lambda functions so that they can be identified, managed, organized, searched for, and filtered in Lumigo. For more information on Lumigo tags, refer to the Lumigo tokens documentation.


TraceEcsServiceProps

Initializer

import { TraceEcsServiceProps } from '@lumigo/cdk-constructs-v2'

const traceEcsServiceProps: TraceEcsServiceProps = { ... }

Properties

Name Type Description
applyAutoTraceTag boolean Whether the Lumigo CDK constructs should automatically add the lumigo:auto-trace AWS tag with the version of the construct in use.
lumigoAutoTraceImage string Which container image to use to instrument ECS workloads.
lumigoTag string Which Lumigo tag to apply to your instrumented Lambda functions and ECS workloads.

applyAutoTraceTagOptional
public readonly applyAutoTraceTag: boolean;
  • Type: boolean
  • Default: true

Whether the Lumigo CDK constructs should automatically add the lumigo:auto-trace AWS tag with the version of the construct in use.


lumigoAutoTraceImageOptional
public readonly lumigoAutoTraceImage: string;
  • Type: string

Which container image to use to instrument ECS workloads.

Use a valid, full image name of the lumigo/lumigo-autotrace image, e.g., public.ecr.aws/lumigo/lumigo-autotrace:v14.

This property is exposed to support two use-cases: pinning a specific tag of the lumigo/lumigo-autotrace image, or supporting use-cases where Amazon ECS will not be able to pull from the Amazon ECS Public Gallery registry. The available tags are listed on the lumigo/lumigo-autotrace Amazon ECR Public Gallery page. The default value is the latest tag at the time of release of this version of the Lumigo CDK constructs: default lumigo/lumigo-autotrace image


lumigoTagOptional
public readonly lumigoTag: string;
  • Type: string

Which Lumigo tag to apply to your instrumented Lambda functions and ECS workloads.

Lumigo Tags add dimension to your Lambda functions so that they can be identified, managed, organized, searched for, and filtered in Lumigo. For more information on Lumigo tags, refer to the Lumigo tokens documentation.


TraceEcsTaskDefinitionProps

Initializer

import { TraceEcsTaskDefinitionProps } from '@lumigo/cdk-constructs-v2'

const traceEcsTaskDefinitionProps: TraceEcsTaskDefinitionProps = { ... }

Properties

Name Type Description
applyAutoTraceTag boolean Whether the Lumigo CDK constructs should automatically add the lumigo:auto-trace AWS tag with the version of the construct in use.
lumigoAutoTraceImage string Which container image to use to instrument ECS workloads.
lumigoTag string Which Lumigo tag to apply to your instrumented Lambda functions and ECS workloads.

applyAutoTraceTagOptional
public readonly applyAutoTraceTag: boolean;
  • Type: boolean
  • Default: true

Whether the Lumigo CDK constructs should automatically add the lumigo:auto-trace AWS tag with the version of the construct in use.


lumigoAutoTraceImageOptional
public readonly lumigoAutoTraceImage: string;
  • Type: string

Which container image to use to instrument ECS workloads.

Use a valid, full image name of the lumigo/lumigo-autotrace image, e.g., public.ecr.aws/lumigo/lumigo-autotrace:v14.

This property is exposed to support two use-cases: pinning a specific tag of the lumigo/lumigo-autotrace image, or supporting use-cases where Amazon ECS will not be able to pull from the Amazon ECS Public Gallery registry. The available tags are listed on the lumigo/lumigo-autotrace Amazon ECR Public Gallery page. The default value is the latest tag at the time of release of this version of the Lumigo CDK constructs: default lumigo/lumigo-autotrace image


lumigoTagOptional
public readonly lumigoTag: string;
  • Type: string

Which Lumigo tag to apply to your instrumented Lambda functions and ECS workloads.

Lumigo Tags add dimension to your Lambda functions so that they can be identified, managed, organized, searched for, and filtered in Lumigo. For more information on Lumigo tags, refer to the Lumigo tokens documentation.


TraceLambdaProps

Initializer

import { TraceLambdaProps } from '@lumigo/cdk-constructs-v2'

const traceLambdaProps: TraceLambdaProps = { ... }

Properties

Name Type Description
applyAutoTraceTag boolean Whether the Lumigo CDK constructs should automatically add the lumigo:auto-trace AWS tag with the version of the construct in use.
enableW3CTraceContext boolean Whether the Lumigo Lambda tracers will add the traceparent and tracestate W3C Trace Context headers to outgoing HTTP/HTTPS requests. These headers are necessary to correctly correlate the HTTP requests from Lambda to workloads instrumented with the Lumigo OpenTelemetry distributions. The only real case in which this property should be set to false, is if there is some HTTP request issued by the Lambda function that is going towards an API with request signature that is affected negatively by the additional headers. If you encounter such an occurrence, please get in touch with Lumigo's support; we will issue an update to the Lumigo Lambda tracers to automatically not add W3C Trace Context to those APIs.
layerVersion number Which version of the appropriate Lumigo layer to be used;
lumigoTag string Which Lumigo tag to apply to your instrumented Lambda functions and ECS workloads.

applyAutoTraceTagOptional
public readonly applyAutoTraceTag: boolean;
  • Type: boolean
  • Default: true

Whether the Lumigo CDK constructs should automatically add the lumigo:auto-trace AWS tag with the version of the construct in use.


enableW3CTraceContextOptional
public readonly enableW3CTraceContext: boolean;
  • Type: boolean
  • Default: true

Whether the Lumigo Lambda tracers will add the traceparent and tracestate W3C Trace Context headers to outgoing HTTP/HTTPS requests. These headers are necessary to correctly correlate the HTTP requests from Lambda to workloads instrumented with the Lumigo OpenTelemetry distributions. The only real case in which this property should be set to false, is if there is some HTTP request issued by the Lambda function that is going towards an API with request signature that is affected negatively by the additional headers. If you encounter such an occurrence, please get in touch with Lumigo's support; we will issue an update to the Lumigo Lambda tracers to automatically not add W3C Trace Context to those APIs.


layerVersionOptional
public readonly layerVersion: number;
  • Type: number

Which version of the appropriate Lumigo layer to be used;

layer versions change based on runtime and region. Layer versions: Node.js and Python. The default value is the latest layers at the time of release of this version of the Lumigo CDK constructs: default Node.js versions, default Python versions


lumigoTagOptional
public readonly lumigoTag: string;
  • Type: string

Which Lumigo tag to apply to your instrumented Lambda functions and ECS workloads.

Lumigo Tags add dimension to your Lambda functions so that they can be identified, managed, organized, searched for, and filtered in Lumigo. For more information on Lumigo tags, refer to the Lumigo tokens documentation.


Classes

Lumigo

The Lumigo class is the entry point for instrumenting workloads deployed via CDK constructs with Lumigo.

You usually would need only one instance of Lumigo per CDK application.

Initializers

import { Lumigo } from '@lumigo/cdk-constructs-v2'

new Lumigo(props: LumigoProps)
Name Type Description
props LumigoProps No description.

propsRequired

Methods

Name Description
asEcsExtension This method returns a wrapper that can be used in conjunction with the {@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.TaskDefinition.html#addwbrextensionextension|TaskDefinition.addExtension} method. The effect is the same as using the {@link Lumigo#traceEcsTaskDefinition} method on the TaskDefinition on which you would invoke TaskDefinition.addExtension.
traceEcsScheduledTask Apply Lumigo autotracing for Java, Node.js and Python applications deployed through the provided ECS ScheduledTask construct.
traceEcsService Apply Lumigo autotracing for Java, Node.js and Python applications deployed through the provided ECS Service construct.
traceEcsTaskDefinition Apply Lumigo autotracing for Java, Node.js and Python applications deployed through the provided TaskDefinition. If the ECS workload does not contain Java, Node.js or Python applications, no distributed-tracing data will be reported to Lumigo.
traceEverything No description.
traceLambda Apply Lumigo autotracing for the provided Lambda function if it uses a supported Node.js or Python runtime. If the runtime used by the provided function is not supported by Lumigo Lambda Auto-Tracing, a warning will be added to the CloudFormation template.
visit No description.

asEcsExtension
public asEcsExtension(): ITaskDefinitionExtension

This method returns a wrapper that can be used in conjunction with the {@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.TaskDefinition.html#addwbrextensionextension|TaskDefinition.addExtension} method. The effect is the same as using the {@link Lumigo#traceEcsTaskDefinition} method on the TaskDefinition on which you would invoke TaskDefinition.addExtension.

traceEcsScheduledTask
public traceEcsScheduledTask(scheduledTask: ScheduledEc2Task | ScheduledFargateTask, props?: TraceEcsScheduledTaskProps): void

Apply Lumigo autotracing for Java, Node.js and Python applications deployed through the provided ECS ScheduledTask construct.

scheduledTaskRequired
  • Type: aws-cdk-lib.aws_ecs_patterns.ScheduledEc2Task | aws-cdk-lib.aws_ecs_patterns.ScheduledFargateTask

propsOptional

traceEcsService
public traceEcsService(service: Ec2Service | FargateService | QueueProcessingEc2Service | QueueProcessingFargateService | NetworkLoadBalancedEc2Service | NetworkLoadBalancedFargateService | ApplicationLoadBalancedEc2Service | ApplicationLoadBalancedFargateService | ApplicationMultipleTargetGroupsEc2Service | ApplicationMultipleTargetGroupsFargateService | NetworkMultipleTargetGroupsEc2Service | NetworkMultipleTargetGroupsFargateService, props?: TraceEcsServiceProps): void

Apply Lumigo autotracing for Java, Node.js and Python applications deployed through the provided ECS Service construct.

serviceRequired
  • Type: aws-cdk-lib.aws_ecs.Ec2Service | aws-cdk-lib.aws_ecs.FargateService | aws-cdk-lib.aws_ecs_patterns.QueueProcessingEc2Service | aws-cdk-lib.aws_ecs_patterns.QueueProcessingFargateService | aws-cdk-lib.aws_ecs_patterns.NetworkLoadBalancedEc2Service | aws-cdk-lib.aws_ecs_patterns.NetworkLoadBalancedFargateService | aws-cdk-lib.aws_ecs_patterns.ApplicationLoadBalancedEc2Service | aws-cdk-lib.aws_ecs_patterns.ApplicationLoadBalancedFargateService | aws-cdk-lib.aws_ecs_patterns.ApplicationMultipleTargetGroupsEc2Service | aws-cdk-lib.aws_ecs_patterns.ApplicationMultipleTargetGroupsFargateService | aws-cdk-lib.aws_ecs_patterns.NetworkMultipleTargetGroupsEc2Service | aws-cdk-lib.aws_ecs_patterns.NetworkMultipleTargetGroupsFargateService

propsOptional

traceEcsTaskDefinition
public traceEcsTaskDefinition(taskDefinition: Ec2TaskDefinition | FargateTaskDefinition, props?: TraceEcsTaskDefinitionProps): void

Apply Lumigo autotracing for Java, Node.js and Python applications deployed through the provided TaskDefinition. If the ECS workload does not contain Java, Node.js or Python applications, no distributed-tracing data will be reported to Lumigo.

taskDefinitionRequired
  • Type: aws-cdk-lib.aws_ecs.Ec2TaskDefinition | aws-cdk-lib.aws_ecs.FargateTaskDefinition

propsOptional

traceEverything
public traceEverything(root: App | Stack, props?: LumigoTraceProps): void
rootRequired
  • Type: aws-cdk-lib.App | aws-cdk-lib.Stack

propsOptional

traceLambda
public traceLambda(lambda: Function | NodejsFunction | PythonFunction, props?: TraceLambdaProps): void

Apply Lumigo autotracing for the provided Lambda function if it uses a supported Node.js or Python runtime. If the runtime used by the provided function is not supported by Lumigo Lambda Auto-Tracing, a warning will be added to the CloudFormation template.

lambdaRequired
  • Type: aws-cdk-lib.aws_lambda.Function | aws-cdk-lib.aws_lambda_nodejs.NodejsFunction | @aws-cdk/aws-lambda-python-alpha.PythonFunction

propsOptional

visit
public visit(construct: IConstruct): void
constructRequired
  • Type: constructs.IConstruct

Properties

Name Type Description
props LumigoProps No description.

propsRequired
public readonly props: LumigoProps;