npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@elastic/opentelemetry-node

v0.3.0

Published

Elastic Distribution for OpenTelemetry Node.js

Downloads

120

Readme

Elastic Distribution for OpenTelemetry Node.js

This is the Elastic Distribution for OpenTelemetry Node.js (the "Distro"). It is a light wrapper around the OpenTelemetry Node SDK that makes it easier to get started using OpenTelemetry in your Node.js applications, especially if you are using Elastic Observability as your observability solution.

Current status

The current release is alpha, and not yet recommended for production use. We welcome your feedback! You can reach us either on the issue tracker or on Elastic's Discuss forum.

Some limitations / notes:

Usage

# 1. install
npm install --save @elastic/opentelemetry-node

# 2. configure via OTEL_ envvars, for example:
export OTEL_EXPORTER_OTLP_ENDPOINT=https://{your-otlp-endpoint.example.com}
export OTEL_EXPORTER_OTLP_HEADERS="Authorization={authorization-information}"
export OTEL_SERVICE_NAME=my-service

# 3. start
node -r @elastic/opentelemetry-node my-service.js

If using an Elastic Observability deployment to which to send telemetry data, the OTEL_EXPORTER_* settings will look something like:

export OTEL_EXPORTER_OTLP_ENDPOINT=https://{deployment-name}.apm.{cloud-region}.cloud.es.io
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer {deployment-secret-token}"

The Distro will automatically instrument popular modules (see supported instrumentations)) used by your service, and send trace, metrics, and logs telemetry data (using OTLP) to your configured observability backend.

The Distro can be configured via OTEL_* environment variables, per the OpenTelemetry Environment Variable spec.

See the Getting Started guide for more details.

Documentation

Why this distribution?

As mentioned above, this Distro is a wrapper around the OpenTelemetry Node SDK (@opentelemetry/sdk-node). So why the separate package? A few reasons:

  • With this separate package we hope to experiment with making it easier to get started with OpenTelemetry instrumentation in Node.js services. For example, @elastic/opentelemetry-node includes a number of OTel packages as dependencies, so the user only needs to install/update a single package -- at least for the default use case. This is similar to the OTel @opentelemetry/auto-instrumentations-node package.

  • Having a separate package will sometimes allow us to iterate more quickly with changes in SDK behavior. However, our plan is to upstream any improvements to the OpenTelemetry JS repositories.

  • Should it be necessary, having a separate package would allow us to more quickly release a fix for a particular issue required by a customer of ours.

  • Providing an eventual easy migration path for customers of our current non-OpenTelemetry-based Node.js APM agent to this SDK may be made easier by having our own package entry point.