aws-observability / aws-otel-js

AWS Distro for OpenTelemetry JavaScript SDK
https://aws-otel.github.io/
Apache License 2.0
36 stars 22 forks source link
observability opensource opentelemetry opentelemetry-api opentelemetry-javascript

AWS Distro for OpenTelemetry JavaScript Language

Introduction

This repo hosts documentation and sample apps for the ADOT JavaScript library which provides the AWS service integrations for traces and metrics for the OpenTelemetry JavaScript library. The library can be configured to support trace applications with the AWS X-Ray service.

Check out the upstream project for documentation on the underlying features, APIs, and additional libraries. This repository only contains a small portion of components which will allow the OpenTelemetry JavaScript SDK to work with AWS X-Ray. The OpenTelemetry repository contains the rest. Note that ADOT is in preview for JavaScript metrics.

We provided an ID generator and propagator, which can be configured from the OpenTelemetry upstream API. The telemetry data generated can be exported in a variety of formats and can be configured via command lines or environment variables. The aim of this project is to be able to gather telemetry data from a JavaScript application, propagate the AWS X-Ray trace header, and export trace data to the AWS X-Ray backend using the AWS Distro for OpenTelemetry Collector.

Getting Started

Check out the getting started documentation.

Sample Application (DEPRECATED)

WARNING: The sample app in this repository is deprecated and is no longer maintained. Please use the new standardized sample apps.

Supported Runtimes

For the complete list of supported runtimes, please refer to the upstream documentation here

How it works

The OpenTelemetry JavaScript SDK provides entry points with methods used for configuring vendor-specific aspects through its API. This custom configuration allows us to generate trace IDs which are compliant with the X-Ray Trace ID format. In addition, we are also able to use a custom propagator which is passed into the tracer provider to conform to AWS X-Ray headers.

Useful links

For more information on OpenTelemetry, visit: https://opentelemetry.io/

Security issue notifications

If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our vulnerability reporting page. Please do not create a public github issue.

License

This project is licensed under the Apache-2.0 License.