enhanced-adot-node-autoinstrumentation
Version:
This package provides Amazon Web Services distribution of the OpenTelemetry Node Instrumentation, which allows for auto-instrumentation of NodeJS applications.
28 lines • 1.55 kB
TypeScript
import { OTLPLogExporter as OTLPProtoLogExporter } from '@opentelemetry/exporter-logs-otlp-proto';
import { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base';
import { ReadableLogRecord } from '@opentelemetry/sdk-logs';
import { ExportResult } from '@opentelemetry/core';
/**
* This exporter extends the functionality of the OTLPProtoLogExporter to allow spans to be exported
* to the CloudWatch Logs OTLP endpoint https://logs.[AWSRegion].amazonaws.com/v1/logs. Utilizes the aws-sdk
* library to sign and directly inject SigV4 Authentication to the exported request's headers. <a
* href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-OTLPEndpoint.html">...</a>
*
* This only works with version >=16 Node.js environments.
*/
export declare const LARGE_LOG_HEADER = "x-aws-truncatable-fields";
export declare class OTLPAwsLogExporter extends OTLPProtoLogExporter {
private endpoint;
private region;
private authenticator;
private genAIFlag;
constructor(endpoint: string, config?: OTLPExporterNodeConfigBase);
/**
* Overrides the upstream implementation of export. All behaviors are the same except if the
* endpoint is the CloudWatch Logs OTLP endpoint, we will sign the request with SigV4 in headers before
* sending it to the endpoint. Otherwise, we will skip signing.
*/
export(items: ReadableLogRecord[], resultCallback: (result: ExportResult) => void): Promise<void>;
setGenAIFlag(): void;
}
//# sourceMappingURL=otlp-aws-log-exporter.d.ts.map