1.0.2 • Published 6 months ago

@types/traceparent v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for traceparent 1.0
// Project: https://github.com/elastic/node-traceparent
// Definitions by: Manuel Guilbault <https://github.com/manuel-guilbault>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <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: Fri, 13 May 2022 15:01:36 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by Manuel Guilbault.

1.0.2

6 months ago

1.0.1

7 months ago

1.0.0

2 years ago