UNPKG

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.

29 lines 1.62 kB
import { OTLPTraceExporter as OTLPProtoTraceExporter } from '@opentelemetry/exporter-trace-otlp-proto'; import { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base'; import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import { ExportResult } from '@opentelemetry/core'; import { LoggerProvider as APILoggerProvider } from '@opentelemetry/api-logs'; /** * This exporter extends the functionality of the OTLPProtoTraceExporter to allow spans to be exported * to the XRay OTLP endpoint https://xray.[AWSRegion].amazonaws.com/v1/traces. 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 class OTLPAwsSpanExporter extends OTLPProtoTraceExporter { private endpoint; private region; private authenticator; private lloHandler; private loggerProvider; constructor(endpoint: string, config?: OTLPExporterNodeConfigBase, loggerProvider?: APILoggerProvider); private ensureLloHandler; /** * Overrides the upstream implementation of export. All behaviors are the same except if the * endpoint is an XRay OTLP endpoint, we will sign the request with SigV4 in headers before * sending it to the endpoint. Otherwise, we will skip signing. */ export(items: ReadableSpan[], resultCallback: (result: ExportResult) => void): Promise<void>; } //# sourceMappingURL=otlp-aws-span-exporter.d.ts.map