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.
26 lines • 1.56 kB
TypeScript
import { Context } from '@opentelemetry/api';
import { ReadableSpan, Span, SpanProcessor } from '@opentelemetry/sdk-trace-base';
/**
* AttributePropagatingSpanProcessor handles the propagation of attributes from parent spans to
* child spans, specified in {@link attributesKeysToPropagate}. AttributePropagatingSpanProcessor
* also propagates configurable data from parent spans to child spans, as a new attribute specified
* by {@link propagationDataKey}. Propagated data can be configured via the {@link propagationDataExtractor}.
* Span data propagation only starts from local root server/consumer spans, but from there will
* be propagated to any descendant spans. If the span is a CONSUMER PROCESS with the parent also
* a CONSUMER, it will set attribute AWS_CONSUMER_PARENT_SPAN_KIND as CONSUMER to indicate that
* dependency metrics should not be generated for this span.
*/
export declare class AttributePropagatingSpanProcessor implements SpanProcessor {
private propagationDataExtractor;
private propagationDataKey;
private attributesKeysToPropagate;
static create(propagationDataExtractor: (span: ReadableSpan) => string, propagationDataKey: string, attributesKeysToPropagate: string[]): AttributePropagatingSpanProcessor;
private constructor();
onStart(span: Span, parentContext: Context): void;
private isConsumerKind;
private isServerKind;
onEnd(span: ReadableSpan): void;
shutdown(): Promise<void>;
forceFlush(): Promise<void>;
}
//# sourceMappingURL=attribute-propagating-span-processor.d.ts.map