Search Results for

    Show / Hide Table of Contents

    Namespace AWS.Lambda.Powertools.Metrics

    Classes

    DimensionSet

    List of key-value pairs with Metric Dimensions

    JsonNamingPolicyDecorator

    Class JsonNamingPolicyDecorator Implements the JsonNamingPolicy

    Metadata

    Class Metadata.

    MetricDefinition

    Class MetricDefinition.

    MetricDirective

    Class MetricDirective.

    MetricResolutionJsonConverter

    Class MetricResolutionJsonConverter. Implements the JsonConverter<T>

    Metrics

    Class Metrics. Implements the IMetrics

    MetricsAspect

    MetricsAspect class is responsible for capturing ColdStart metric and flushing metrics on function exit. Scope.Global - means aspect will operate as singleton.

    MetricsAttribute

    Creates custom metrics asynchronously by logging metrics to standard output following Amazon CloudWatch Embedded Metric Format (EMF).

    Key features
    ---------------------

    • Aggregate up to 100 metrics using a single CloudWatch EMF object (large JSON blob)
    • Validate against common metric definitions mistakes (metric unit, values, max dimensions, max metrics, etc)
    • Metrics are created asynchronously by CloudWatch service, no custom stacks needed
    • Context manager to create a one off metric with a different dimension

    Environment variables
    ---------------------
    Variable nameDescription
    POWERTOOLS_SERVICE_NAMEstring, service name
    POWERTOOLS_METRICS_NAMESPACEstring, metric namespace

    Parameters
    -----------
    Parameter nameDescription
    Servicestring, service name is used for metric dimension
    Namespacestring, logical container where all metrics will be placed
    CaptureColdStartbool, captures cold start during Lambda execution, by default false
    RaiseOnEmptyMetricsbool, instructs metrics validation to throw exception if no metrics are provided, by default false

    MetricsBuilder

    Provides a builder for configuring metrics.

    MetricsContext

    Class MetricsContext. Implements the IDisposable

    MetricsOptions

    Configuration options for AWS Lambda Powertools Metrics.

    MetricsSerializationContext

    Source generator for Metrics types

    RootNode

    Class RootNode.

    SchemaValidationException

    Class SchemaValidationException. Implements the Exception

    UnixMillisecondDateTimeConverter

    Class UnixMillisecondDateTimeConverter. Implements the JsonConverter

    Interfaces

    IMetrics

    Interface for metrics operations.

    Enums

    MetricResolution

    Enum MetricResolution

    MetricUnit

    Enum MetricUnit

    In this article
    Back to top Powertools for AWS Lambda (.NET) API Documentation