All Projects → RisingStack → Opentracing Auto

RisingStack / Opentracing Auto

Licence: mit
Out of the box distributed tracing for Node.js applications with OpenTracing.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Opentracing Auto

Brave Opentracing
Bridge between OpenTracing and Brave
Stars: ✭ 64 (-41.82%)
Mutual labels:  instrumentation, distributed-tracing, opentracing
ruby-sensor
💎 Ruby Distributed Tracing & Metrics Sensor for Instana
Stars: ✭ 23 (-79.09%)
Mutual labels:  instrumentation, opentracing, distributed-tracing
Zipkin Go Opentracing
OpenTracing Bridge for Zipkin Go
Stars: ✭ 472 (+329.09%)
Mutual labels:  instrumentation, distributed-tracing, opentracing
go-sensor
🚀 Go Distributed Tracing & Metrics Sensor for Instana
Stars: ✭ 90 (-18.18%)
Mutual labels:  instrumentation, opentracing, distributed-tracing
Java Spring Cloud
Distributed tracing for Spring Boot, Cloud and other Spring projects
Stars: ✭ 326 (+196.36%)
Mutual labels:  instrumentation, opentracing
Haystack
Top level repository for Haystack, containing documentation and deployment scripts
Stars: ✭ 261 (+137.27%)
Mutual labels:  distributed-tracing, opentracing
Opentracing Php
OpenTracing API for PHP
Stars: ✭ 407 (+270%)
Mutual labels:  distributed-tracing, opentracing
Jaeger Client Node
Jaeger Bindings for OpenTracing API for Node.js
Stars: ✭ 485 (+340.91%)
Mutual labels:  distributed-tracing, opentracing
java-okhttp
OpenTracing Okhttp client instrumentation
Stars: ✭ 21 (-80.91%)
Mutual labels:  instrumentation, opentracing
Zipkin Go
Zipkin tracer library for go
Stars: ✭ 435 (+295.45%)
Mutual labels:  instrumentation, distributed-tracing
Inspectit
inspectIT is the leading Open Source APM (Application Performance Management) tool for analyzing your Java (EE) applications.
Stars: ✭ 513 (+366.36%)
Mutual labels:  instrumentation, opentracing
thundra-agent-nodejs
Thundra Lambda Node.js Agent
Stars: ✭ 31 (-71.82%)
Mutual labels:  instrumentation, distributed-tracing
post-kafka-opentracing
Post: Tracing Kafka Applications
Stars: ✭ 18 (-83.64%)
Mutual labels:  opentracing, distributed-tracing
Sqlhooks
Attach hooks to any database/sql driver
Stars: ✭ 397 (+260.91%)
Mutual labels:  instrumentation, opentracing
opentracing-utils
Convenient utilities for adding OpenTracing support in your python projects
Stars: ✭ 20 (-81.82%)
Mutual labels:  opentracing, distributed-tracing
Core
Package core is a service container that elegantly bootstrap and coordinate twelve-factor apps in Go.
Stars: ✭ 34 (-69.09%)
Mutual labels:  distributed-tracing, opentracing
Molten
php probe for zipkin and opentracing
Stars: ✭ 740 (+572.73%)
Mutual labels:  instrumentation, opentracing
Jaeger Client Go
Jaeger Bindings for Go OpenTracing API.
Stars: ✭ 1,035 (+840.91%)
Mutual labels:  distributed-tracing, opentracing
java-web-servlet-filter
OpenTracing Java Web Servlet Filter Instrumentation
Stars: ✭ 20 (-81.82%)
Mutual labels:  instrumentation, opentracing
zipkin-cpp-opentracing
OpenTracing Tracer implementation for Zipkin in C++
Stars: ✭ 46 (-58.18%)
Mutual labels:  instrumentation, opentracing

opentracing-auto

Build Status

Out of the box distributed tracing for Node.js applications with OpenTracing. Support multiple Tracers.

WARNING: experimental library, do not use in production yet

Technologies

Requirements

  • Node.js, >= v8

Getting started

npm install @risingstack/opentracing-auto
// must be in the first two lines of your application
const Instrument = require('@risingstack/opentracing-auto')
const { Tracer } = require('opentracing') // or any OpenTracing compatible tracer like jaeger-client
const tracer1 = new Tracer()
const tracer2 = new Tracer()

const instrument = new Instrument({
  tracers: [tracer1, tracer2]
})

// rest of your code
const express = require('express')
// ...

This package depends on require-in-the-middle and shimmer to monkeypatch tracing information onto the modules listed below. Therefore it is crucial that you require() supported modules after creating the tracing instrument.

If you are using node 8.5+'s experimental module support, you will need to manually hook supported modules:

import Instrument from '@risingstack/opentracing-auto';
import jaeger from 'jaeger-client';
import UDPSender from 'jaeger-client/dist/src/reporters/udp_sender';
import http from 'http';

const instrument = new Instrument({
  tracers: [
    new jaeger.Tracer(
      'my-service-name',
      new jaeger.RemoteReporter(new UDPSender.default({ host: 'my-jaeger-host' })),
      new jaeger.RateLimitingSampler(1),
      {}
    ),
  ],
});

instrument.hookModule(http, 'http');

API

new Instrument({ tracers: [tracer1, tracer2] })

Instrument modules.

  • tracers: Array of OpenTracing compatible tracers
    • required
  • httpTimings: Adds HTTP timings (DNS lookup, Connect, TLS, Time to first byte, Content transfer)
    • default: false

instrument.unpatch()

Unpatch instrumentations

Instrumentations

Example

The example require a running MongoDB and Jaeger.

To start Jaeger and visit it's dashboard:

docker run -d -p5775:5775/udp -p6831:6831/udp -p6832:6832/udp -p5778:5778 -p16686:16686 -p14268:14268 jaegertracing/all-in-one:latest && open http://localhost:16686
npm run example
curl http://localhost:3000
open http://localhost:16686

Jaeger Node.js tracing

HTTP timings

You can enable it with the httpTimings: true

HTTP timings

Debug

Start your application with the DEBUG=opentracing-auto* environment variable.

Feature ideas

  • More database instrumentation: Redis etc.
  • More messaging layer instrumentation: HTTP/2, GRPC, RabbitMQ, Kafka etc.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].