@types/traceparent
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/traceparent

Weekly Downloads

2,161

Version

1.0.2

License

MIT

Unpacked Size

4.08 kB

Total Files

5

Last publish

Collaborators

  • types