Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

AWS X-Ray ID generator for OpenTelemetry

  • 0.12.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
269
increased by62.05%
Maintainers
2
Weekly downloads
 
Created
Source

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.

Installation

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

Usage

In the global tracer configuration file, configure the following:

const { NodeTracerProvider } = require('@opentelemetry/node');
const { AwsXRayIdGenerator } = require('@aws-observability/propagator-aws-xray');
// ...

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

License

Apache 2.0 - See LICENSE for more information.

Keywords

FAQs

Package last updated on 21 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc