Installation
npm install --save @types/traceparent
Summary
This package contains type definitions for traceparent (https://github.com/elastic/node-traceparent).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/traceparent.
index.d.ts
/// <reference types="node" />
interface TraceParentSettings {
transactionSampleRate: number;
}
declare class TraceParent {
constructor(buffer: Buffer);
static fromString(header: string): TraceParent;
static startOrResume(parent: null | undefined | TraceParent | string, settings: TraceParentSettings): TraceParent;
static readonly FLAGS: Readonly<{
recorded: 0b00000001;
}>;
readonly recorded: boolean;
readonly traceId: string;
readonly id: string;
readonly parentId: string | undefined;
readonly flags: string;
readonly version: string;
child(): TraceParent;
toString(): string;
ensureParentId(): string;
}
export = TraceParent;
Additional Details
- Last updated: Tue, 07 Nov 2023 15:11:36 GMT
- Dependencies: @types/node
Credits
These definitions were written by Manuel Guilbault.