# @types/traceparent

> TypeScript definitions for traceparent

Latest version **1.0.2** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/traceparent
pnpm add @types/traceparent
yarn add @types/traceparent
bun add @types/traceparent
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2023-11-07 |
| First published | 2022-05-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51433 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/traceparent
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/traceparent
- npm.io page: https://npm.io/package/@types/traceparent

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 1.0.2 (latest) — 2023-11-07
- 1.0.0 (ts3.9) — 2022-05-13
- 1.0.1 — 2023-10-18

## README

# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/traceparent/index.d.ts)
````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](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Manuel Guilbault](https://github.com/manuel-guilbault).

---
_Source: https://npm.io/package/@types/traceparent · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
