Neurological Phenomenon Multiplexer

    This package has been deprecated

    Author message:

    No longer supported, use @opentelemetry/id-generator-aws-xray instead

    TypeScript icon, indicating that this package has built-in type declarations

    0.13.1 • Public • Published

    AWS OpenTelemetry X-Ray IdGenerator README

    Gitter chat Apache License

    The OpenTelemetry IdGenerator for AWS X-Ray generates trace IDs with its first four bytes set to the start time of the trace followed by a unique identifier consisting of 12 bytes of randomly generated numbers. OpenTelemetry offers an extension point which allows the usage of this custom IdGenerator as opposed to the out-of-the-box random IdGenerator.


    npm install --save @aws/otel-aws-xray-id-generator


    In the global tracer configuration file, configure the following:

    const { NodeTracerProvider } = require('@opentelemetry/node');
    const { AWSXRayIdGenerator } = require('@aws/otel-aws-xray-id-generator');
    // ...
    module.exports = ("service_name_here") => {
       const tracerConfig = {
        idGenerator: new AWSXRayIdGenerator(),
        resources: resources
      const tracerProvider = new NodeTracerProvider(tracerConfig);
      // ...}

    For more details, see the Getting Started guide.

    Trace ID Details

    Example trace ID format: 58406520a006649127e371903a2de979

    A trace ID consists of two parts; the time stamp and the unique identifier.

    Time Stamp

    • the first 8 hexadecimal digits represent the time of the original request in Unix epoch time
    • for example, 10:00AM December 1st, 2016 PST in epoch time is 1480615200 seconds, or 58406520 in hexadecimal digits.

    Unique Identifier

    • the last 24 hexadecimal digits is an unique identifier for the trace

    Useful links


    Apache 2.0 - See LICENSE for more information.


    npm i @aws/otel-aws-xray-id-generator

    DownloadsWeekly Downloads






    Unpacked Size

    20.4 kB

    Total Files


    Last publish


    • allenyin96
    • alolita