UNPKG

@mwcp/kmore

Version:

midway component for knex, supports declarative transaction and OpenTelemetry

17 lines 907 B
import type { Attributes, Span, TraceService } from '@mwcp/otel'; import type { KmoreQueryBuilder, KmoreTransaction, TrxPropagateOptions } from 'kmore'; import type { CallerKey, RegisterTrxPropagateOptions, TrxCallerInfo } from './trx-status.types.js'; export declare function genCallerKey(className: string, funcName: string): CallerKey; export interface TrxTraceOptions { type: 'event' | 'tag'; appDir: string; traceSvc: TraceService; /** will rootSpan if undefined */ span: Span | undefined; trxPropagateOptions?: TrxPropagateOptions | RegisterTrxPropagateOptions; attr?: Attributes; } export declare function trxTrace(options: TrxTraceOptions): void; export declare function getSimpleCallers(limit?: number): TrxCallerInfo[]; export declare function linkBuilderWithTrx(builder: KmoreQueryBuilder, trx: KmoreTransaction): void; //# sourceMappingURL=trx-status.helper.d.ts.map