@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.
33 lines • 1.67 kB
TypeScript
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';
/**
* 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 static readonly SERVICE_NAME;
private endpoint;
private region;
private defaultProvider;
private sha256;
private signatureV4;
private httpRequest;
private hasRequiredDependencies;
constructor(endpoint: string, config?: OTLPExporterNodeConfigBase);
/**
* 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>;
private removeSigV4Headers;
private initDependencies;
private static changeUrlConfig;
}
//# sourceMappingURL=otlp-aws-span-exporter.d.ts.map