UNPKG

@aws/aws-distro-opentelemetry-node-autoinstrumentation

Version:

This package provides Amazon Web Services distribution of the OpenTelemetry Node Instrumentation, which allows for auto-instrumentation of NodeJS applications.

41 lines 1.95 kB
import { AggregationSelector, AggregationTemporalitySelector } from '@opentelemetry/sdk-metrics'; import type { LogEvent } from '@aws-sdk/client-cloudwatch-logs'; import { EMFExporterBase } from './emf-exporter-base'; /** * OpenTelemetry metrics exporter for CloudWatch EMF format to console output. * * This exporter converts OTel metrics into CloudWatch EMF logs and writes them * to standard output instead of sending to CloudWatch Logs. This is useful for * debugging, testing, or when you want to process EMF logs with other tools. * * https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Embedded_Metric_Format_Specification.html */ export declare class ConsoleEMFExporter extends EMFExporterBase { /** * Constructor for the Console EMF exporter. * * @param namespace CloudWatch namespace for metrics (defaults to "default") * @param aggregationTemporalitySelector Optional Aggregation temporality selector based on metric instrument types. * @param aggregationSelector Optional Aggregation selector based on metric instrument types */ constructor(namespace?: string, aggregationTemporalitySelector?: AggregationTemporalitySelector, aggregationSelector?: AggregationSelector); /** * This method writes the EMF log message to stdout, making it easy to * capture and redirect the output for processing or debugging purposes. * * @param logEvent The log event containing the message to send * @returns {Promise<void>} */ protected sendLogEvent(logEvent: Required<LogEvent>): Promise<void>; /** * Force flush any pending metrics. * For this exporter, there is nothing to forceFlush. */ forceFlush(): Promise<void>; /** * Shutdown the exporter. * For this exporter, there is nothing to clean-up in order to shutdown. */ shutdown(): Promise<void>; } //# sourceMappingURL=console-emf-exporter.d.ts.map