Skip to content
v2.274.0

MetricType Enum ​

Example ​

ts
import * as eventsources from 'aws-cdk-lib/aws-lambda-event-sources';
import * as dynamodb from 'aws-cdk-lib/aws-dynamodb';

declare const fn: lambda.Function;
const table = new dynamodb.Table(this, 'Table', {
  partitionKey: {
    name: 'id',
    type: dynamodb.AttributeType.STRING,
  },
  stream: dynamodb.StreamViewType.NEW_IMAGE,
});

fn.addEventSource(new eventsources.DynamoEventSource(table, {
  startingPosition: lambda.StartingPosition.LATEST,
  metricsConfig: {
    metrics: [lambda.MetricType.EVENT_COUNT],
  }
}));

Members ​

MemberDescription
EVENT_COUNTEvent Count metrics provide insights into the processing behavior of your event source mapping, including the number of events successfully processed, filtered out, or dropped.
ERROR_COUNTError Count metrics provide insights into invocation errors and failures in your event source mapping processing.
KAFKA_METRICSKafka-specific metrics provide detailed insights into Kafka consumer behavior, including lag, throughput, and partition-specific metrics.

Referenced by ​