opentracing vs prom-client vs datadog-metrics vs newrelic vs elastic-apm-node vs loggly vs raygun vs sentry
Monitoring and Performance Tracking Libraries Comparison
1 Year
opentracingprom-clientdatadog-metricsnewrelicelastic-apm-nodelogglyraygunsentrySimilar Packages:
What's Monitoring and Performance Tracking Libraries?

These libraries are designed to help developers monitor application performance, track errors, and collect metrics in real-time. They provide insights into application behavior, allowing developers to identify bottlenecks, troubleshoot issues, and enhance user experience. Each library has unique features tailored to different monitoring needs, from error tracking to performance metrics and distributed tracing.

Package Weekly Downloads Trend
Github Stars Ranking
Stat Detail
Package
Downloads
Stars
Size
Issues
Publish
License
opentracing4,163,9291,091195 kB35-Apache-2.0
prom-client3,055,2783,211126 kB1188 months agoApache-2.0
datadog-metrics1,577,32114193.9 kB72 months agoMIT
newrelic929,6949762.23 MB617 days agoApache-2.0
elastic-apm-node362,874586928 kB329a month agoBSD-2-Clause
loggly59,021233-228 years agoMIT
raygun16,74831112 kB0a month ago-
sentry9,098---13 years ago-
Feature Comparison: opentracing vs prom-client vs datadog-metrics vs newrelic vs elastic-apm-node vs loggly vs raygun vs sentry

Error Tracking

  • opentracing:

    OpenTracing itself does not provide error tracking but can be integrated with other tools that do, allowing for a flexible approach to monitoring errors in distributed systems.

  • prom-client:

    Prom-client focuses on metrics collection rather than error tracking, making it less suitable for this purpose.

  • datadog-metrics:

    Datadog Metrics does not primarily focus on error tracking but can be integrated with other Datadog services for comprehensive monitoring.

  • newrelic:

    New Relic offers robust error tracking features, capturing exceptions and providing detailed insights into the stack trace and affected users, facilitating rapid debugging.

  • elastic-apm-node:

    Elastic APM provides error tracking capabilities, allowing developers to capture and analyze exceptions in real-time, linking them to specific transactions for better context.

  • loggly:

    Loggly excels in error tracking by aggregating logs from various sources and providing powerful search and filtering capabilities to identify issues quickly.

  • raygun:

    Raygun specializes in error tracking, providing detailed reports on crashes, including stack traces, user context, and affected sessions, making it easy to prioritize fixes.

  • sentry:

    Sentry is a leader in error tracking, providing real-time alerts, detailed error reports, and performance monitoring, making it easy to identify and resolve issues.

Performance Monitoring

  • opentracing:

    OpenTracing is a specification for distributed tracing and does not provide performance monitoring features directly but can be integrated with tools that do.

  • prom-client:

    Prom-client is designed for performance monitoring by collecting and exposing metrics in a Prometheus-compatible format, ideal for monitoring microservices.

  • datadog-metrics:

    Datadog Metrics provides extensive performance monitoring capabilities, including real-time dashboards and alerts for various metrics, helping teams maintain application health.

  • newrelic:

    New Relic is renowned for its performance monitoring capabilities, offering detailed transaction traces, slow query analysis, and infrastructure monitoring.

  • elastic-apm-node:

    Elastic APM offers deep performance monitoring, including transaction tracing and metrics collection, enabling developers to identify performance bottlenecks effectively.

  • loggly:

    Loggly is more focused on log management than performance monitoring, but it can provide insights into performance issues through log analysis.

  • raygun:

    Raygun provides performance monitoring features alongside error tracking, allowing developers to see how errors impact performance and user experience.

  • sentry:

    Sentry offers performance monitoring features that help track the performance of transactions and identify slow operations, providing insights into application performance.

Integration Capabilities

  • opentracing:

    OpenTracing is designed to be vendor-neutral, allowing integration with various tracing systems and tools, providing flexibility in monitoring solutions.

  • prom-client:

    Prom-client can be integrated with Prometheus and other monitoring tools, making it a versatile choice for metric collection in microservices.

  • datadog-metrics:

    Datadog Metrics integrates seamlessly with a wide range of services and platforms, including cloud providers, databases, and CI/CD tools, enhancing its monitoring capabilities.

  • newrelic:

    New Relic offers extensive integration options with cloud services, frameworks, and third-party tools, making it suitable for diverse environments.

  • elastic-apm-node:

    Elastic APM integrates well with the Elastic Stack, allowing users to leverage Elasticsearch for data storage and Kibana for visualization.

  • loggly:

    Loggly integrates easily with various logging libraries and services, making it simple to centralize logs from multiple sources for analysis.

  • raygun:

    Raygun integrates with various development and deployment tools, allowing teams to streamline error tracking and performance monitoring across their stack.

  • sentry:

    Sentry provides integrations with numerous frameworks, libraries, and services, making it easy to instrument applications for error tracking and performance monitoring.

User Experience Insights

  • opentracing:

    OpenTracing does not directly provide user experience insights but can be used in conjunction with tools that do, allowing for a comprehensive view of user interactions in distributed systems.

  • prom-client:

    Prom-client focuses on metrics and does not provide direct insights into user experience, but metrics can be used to infer user impact indirectly.

  • datadog-metrics:

    Datadog Metrics provides user experience insights through performance metrics and dashboards, helping teams understand how application performance affects users.

  • newrelic:

    New Relic provides user experience insights by tracking user interactions and application performance, helping teams optimize the user journey.

  • elastic-apm-node:

    Elastic APM offers insights into user experience by linking performance data with user interactions, helping developers understand the impact of performance on users.

  • loggly:

    Loggly provides insights into user experience through log analysis, allowing teams to correlate user actions with application performance issues.

  • raygun:

    Raygun provides detailed insights into user experience by tracking errors and performance issues that affect users, helping teams prioritize fixes based on user impact.

  • sentry:

    Sentry offers insights into user experience by linking errors and performance issues to specific user sessions, allowing teams to understand the impact of issues on users.

Setup and Configuration

  • opentracing:

    OpenTracing requires some initial setup to instrument applications, but it allows for flexibility in choosing the underlying tracing system.

  • prom-client:

    Prom-client has a straightforward setup process, requiring basic configuration to expose metrics in a Prometheus-compatible format, making it easy to integrate into existing applications.

  • datadog-metrics:

    Datadog Metrics requires a straightforward setup process, often involving minimal configuration to start collecting metrics, especially if using the Datadog agent.

  • newrelic:

    New Relic provides a user-friendly setup process, with comprehensive documentation and automated instrumentation options to get started quickly.

  • elastic-apm-node:

    Elastic APM has a relatively simple setup process, requiring configuration of the APM agent and integration with the Elastic Stack for full functionality.

  • loggly:

    Loggly offers an easy setup process, allowing users to start logging quickly with minimal configuration, ideal for teams looking for simplicity.

  • raygun:

    Raygun offers a simple setup process, with clear documentation to help developers instrument their applications for error tracking and performance monitoring.

  • sentry:

    Sentry provides an easy setup process, with SDKs available for various platforms and frameworks, allowing developers to quickly integrate error tracking into their applications.

How to Choose: opentracing vs prom-client vs datadog-metrics vs newrelic vs elastic-apm-node vs loggly vs raygun vs sentry
  • opentracing:

    Use OpenTracing if you need a vendor-neutral API for distributed tracing, allowing you to instrument your applications while maintaining flexibility in choosing your backend tracing system.

  • prom-client:

    Choose Prom-client if you are focused on collecting and exposing metrics in a Prometheus-compatible format, particularly useful for microservices architectures.

  • datadog-metrics:

    Choose Datadog Metrics if you need a comprehensive monitoring solution that integrates with various services and provides detailed dashboards and analytics for performance metrics.

  • newrelic:

    Pick New Relic for its robust application performance monitoring capabilities, including detailed transaction tracing and a wide range of integrations, ideal for enterprise-level applications.

  • elastic-apm-node:

    Select Elastic APM Node if you are already using the Elastic Stack (Elasticsearch, Logstash, Kibana) and want seamless integration for application performance monitoring and distributed tracing.

  • loggly:

    Opt for Loggly if you require a cloud-based log management solution that provides real-time log analysis and visualization, suitable for teams looking for simplicity and ease of use.

  • raygun:

    Select Raygun for its powerful error and crash reporting features, which provide detailed diagnostics and user impact analysis, ideal for teams focused on improving application reliability.

  • sentry:

    Opt for Sentry if you need comprehensive error tracking and performance monitoring, with features for real-time alerts and detailed context for debugging.

README for opentracing

Build Status Coverage Status NPM Published Version Node Version Join the chat at https://gitter.im/opentracing/opentracing-javascript

OpenTracing API for JavaScript

This library is a JavaScript implementation of Open Tracing API. It is intended for use both on the server and in the browser.

Required Reading

To fully understand this platform API, it's helpful to be familiar with the OpenTracing project and terminology more specifically.

Quick Start

Install the package using npm:

npm install --save opentracing

Example

The package contains an example using a naive MockTracer implementation. To run the example:

npm run example

The output should look something like:

Spans:
    parent_span - 1521ms
        tag 'custom':'tag value'
        tag 'alpha':'1000'
    child_span - 503ms
        tag 'alpha':'200'
        tag 'beta':'50'

Code snippet

In your JavaScript code, add instrumentation to the operations to be tracked. This is composed primarily of using "spans" around operations of interest and adding log statements to capture useful data relevant to those operations.

const http = require('http');
const opentracing = require('opentracing');

// NOTE: the default OpenTracing tracer does not record any tracing information.
// Replace this line with the tracer implementation of your choice.
const tracer = new opentracing.Tracer();

const span = tracer.startSpan('http_request');
const opts = {
    host : 'example.com',
    method: 'GET',
    port : '80',
    path: '/',
};
http.request(opts, res => {
    res.setEncoding('utf8');
    res.on('error', err => {
        // assuming no retries, mark the span as failed
        span.setTag(opentracing.Tags.ERROR, true);
        span.log({'event': 'error', 'error.object': err, 'message': err.message, 'stack': err.stack});
        span.finish();
    });
    res.on('data', chunk => {
        span.log({'event': 'data_received', 'chunk_length': chunk.length});
    });
    res.on('end', () => {
        span.log({'event': 'request_end'});
        span.finish();
    });
}).end();

As noted in the source snippet, the default behavior of the opentracing package is to act as a "no op" implementation. To capture and make the tracing data actionable, the tracer object should be initialized with the OpenTracing implementation of your choice as in the pseudo-code below:

const CustomTracer = require('tracing-implementation-of-your-choice');
const tracer = new CustomTracer();

Usage in the browser

The package contains two bundles built with webpack that can be included using a standard <script> tag. The library will be exposed under the global opentracing namespace:

  • dist/opentracing-browser.min.js - minified, no runtime checks
  • dist/opentracing-browser.js - debug version with runtime checks

Usage with TypeScript

Since the source is written in TypeScript, if you are using TypeScript, you can just npm install the package and it will work out of the box. This is especially useful for implementors who want to type check their implementation with the base interface.

Global tracer

The library also provides a global singleton tracer for convenience. This can be set and accessed via the following:

opentracing.initGlobalTracer(new CustomTracer());

const tracer = opentracing.globalTracer();

Note: globalTracer() returns a wrapper on the actual tracer object. This is done for the convenience of use as it ensures that the function will always return a non-null object. This can be helpful in cases where it is difficult or impossible to know precisely when initGlobalTracer is called (for example, when writing a utility library that does not control the initialization process). For more precise control, individual Tracer objects can be used instead of the global tracer.

API Documentation

There is a hosted copy of the current generated ESDoc API Documentation here.

Contributing & developer information

See the OpenTracing website for general information on contributing to OpenTracing.

The project is written in TypeScript and built using a npm scripts. Run:

  • npm run build creates the compiled, distributable JavaScript code in ./lib
  • npm run watch incrementally compiles on file changes
  • npm run webpack creates the bundles for the browser in ./dist
  • npm test runs the tests
  • npm run typedoc generates the documentation in ./typedoc

Note: The minimum supported Node version for development is >=6. Tests can however be run on any version that this project supports (>=0.10).

OpenTracing tracer implementations

This section is intended for developers wishing to implement their own tracers. Developers who simply wish to use OpenTracing can safely ignore this information.

Custom tracer implementation

Implementations can subclass opentracing.Tracer, opentracing.Span, and the other API classes to build an OpenTracing tracer and implement the underscore prefixed methods such as _addTag to pick up a bit of common code implemented in the base classes.

API compatibility testing

If mocha is being used for unit testing, test/api_compatibility can be used to test the custom tracer. The file exports a single function that expects as an argument a function that will return a new instance of the tracer.

const apiCompatibilityChecks = require('opentracing/lib/test/api_compatibility.js').default;
apiCompatibilityChecks(() => new CustomTracer());

LICENSE

Apache License 2.0

MockTracer

A minimal example tracer is provided in the src/mock_tracer directory of the source code.