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.

63 lines 3.15 kB
import { Context } from '@opentelemetry/api'; import { ReadableSpan, Span } from '@opentelemetry/sdk-trace-base'; export declare type ForceFlushFunction = (options?: any) => Promise<void>; /** Utility class designed to support shared logic across AWS Span Processors. */ export declare class AwsSpanProcessingUtil { static UNKNOWN_SERVICE: string; static UNKNOWN_OPERATION: string; static UNKNOWN_REMOTE_SERVICE: string; static UNKNOWN_REMOTE_OPERATION: string; static INTERNAL_OPERATION: string; static LOCAL_ROOT: string; static SQS_RECEIVE_MESSAGE_SPAN_NAME: string; static AWS_SDK_INSTRUMENTATION_SCOPE_PREFIX: string; static CLOUD_RESOURCE_ID: string; static MAX_KEYWORD_LENGTH: number; static SQL_DIALECT_PATTERN: string; static GEN_AI_REQUEST_MODEL: string; static GEN_AI_SYSTEM: string; static GEN_AI_REQUEST_MAX_TOKENS: string; static GEN_AI_REQUEST_TEMPERATURE: string; static GEN_AI_REQUEST_TOP_P: string; static GEN_AI_RESPONSE_FINISH_REASONS: string; static GEN_AI_USAGE_INPUT_TOKENS: string; static GEN_AI_USAGE_OUTPUT_TOKENS: string; static getDialectKeywords(): string[]; /** * Ingress operation (i.e. operation for Server and Consumer spans) will be generated from * "http.method + http.target/with the first API path parameter" if the default span name equals * null, UnknownOperation or http.method value. */ static getIngressOperation(span: ReadableSpan): string; static getEgressOperation(span: ReadableSpan): string | undefined; /** * Extract the first part from API http target if it exists * * @param httpTarget http request target string value. Eg, /payment/1234 * @return the first part from the http target. Eg, /payment */ static extractAPIPathValue(httpTarget: string | undefined | null): string; static isKeyPresent(span: ReadableSpan, key: string): boolean; static isAwsSDKSpan(span: ReadableSpan): boolean; static shouldGenerateServiceMetricAttributes(span: ReadableSpan): boolean; static shouldGenerateDependencyMetricAttributes(span: ReadableSpan): boolean; static isConsumerProcessSpan(spanData: ReadableSpan): boolean; static shouldUseInternalOperation(span: ReadableSpan): boolean; static isLocalRoot(spanData: ReadableSpan): boolean; private static isSqsReceiveMessageConsumerSpan; private static isDependencyConsumerSpan; /** * When Span name is null, UnknownOperation or HttpMethod value, it will be treated as invalid * local operation value that needs to be further processed */ private static isValidOperation; /** * When span name is not meaningful(null, unknown or http_method value) as operation name for http * use cases. Will try to extract the operation name from http target string */ private static generateIngressOperation; static isDBSpan(span: ReadableSpan): boolean; static setIsLocalRootInformation(span: Span, parentContext: Context): void; static getResourceId(span: ReadableSpan): string | undefined; } //# sourceMappingURL=aws-span-processing-util.d.ts.map