MetricType

class aws_cdk.aws_lambda.MetricType(*values)

Bases: Enum

ExampleMetadata:

infused

Example:

import aws_cdk.aws_lambda_event_sources as eventsources
import aws_cdk.aws_dynamodb as dynamodb

# fn: lambda.Function

table = dynamodb.Table(self, "Table",
    partition_key=dynamodb.Attribute(
        name="id",
        type=dynamodb.AttributeType.STRING
    ),
    stream=dynamodb.StreamViewType.NEW_IMAGE
)

fn.add_event_source(eventsources.DynamoEventSource(table,
    starting_position=lambda_.StartingPosition.LATEST,
    metrics_config=lambda.MetricsConfig(
        metrics=[lambda_.MetricType.EVENT_COUNT]
    )
))

Attributes

ERROR_COUNT

Error Count metrics provide insights into invocation errors and failures in your event source mapping processing.

EVENT_COUNT

Event Count metrics provide insights into the processing behavior of your event source mapping, including the number of events successfully processed, filtered out, or dropped.

These metrics help you monitor the flow and status of events through your event source mapping.

KAFKA_METRICS

Kafka-specific metrics provide detailed insights into Kafka consumer behavior, including lag, throughput, and partition-specific metrics.