UNPKG

@azure/event-hubs

Version:
28 lines 1.36 kB
import { EventData } from "../eventData.js"; import { TracingContext } from "@azure/core-tracing"; import { AmqpAnnotatedMessage } from "@azure/core-amqp"; import { OperationOptions } from "../util/operationOptions.js"; import { MessagingOperationNames } from "./tracing.js"; /** * @internal */ export declare const TRACEPARENT_PROPERTY = "Diagnostic-Id"; /** * Populates the `EventData` with `SpanContext` info to support trace propagation. * Creates and returns a copy of the passed in `EventData` unless the `EventData` * has already been instrumented. * @param eventData - The `EventData` or `AmqpAnnotatedMessage` to instrument. * @param span - The `Span` containing the context to propagate tracing information. * @param operation - The type of the operation being performed. */ export declare function instrumentEventData(eventData: EventData | AmqpAnnotatedMessage, options: OperationOptions, entityPath: string, host: string, operation?: MessagingOperationNames): { event: EventData; spanContext: TracingContext | undefined; }; /** * Extracts the `SpanContext` from an `EventData` if the context exists. * @param eventData - An individual `EventData` object. * @internal */ export declare function extractSpanContextFromEventData(eventData: EventData): TracingContext | undefined; //# sourceMappingURL=instrumentEventData.d.ts.map