Git Product home page Git Product logo

tracer's Introduction

Tracer โ€“ Zipping through time

Tracer is a distributed tracing system, designed after Dapper. The instrumentation is compatible with the OpenTracing specification.

Status

Tracer is currently in alpha state. It is in a working state, but very much unfinished, hardly tested and will contain bugs. You're welcome to test it, though!

Quickstart

The following steps will install Tracer, the Tracer UI and set up PostgreSQL to be used as a storage backend.

The following software is required:

  • Go 1.6 or later for building Tracer
  • PostgreSQL 9.5 or later for the storage engine

Installation

go get github.com/tracer/tracer/cmd/tracer
go get github.com/tracer/tracer-ui/cmd/tracer-ui

Configuration

Create a PostgreSQL user and schema for Tracer and import the file $GOPATH/src/github.com/tracer/tracer/storage/postgres/schema.sql. The example configuration uses the username and password tracer and the database postgres, but you're free to edit the config.

Now you can start Tracer and its UI:

cp $GOPATH/src/github.com/tracer/tracer/cmd/tracer/example.conf .
# possibly edit example.conf
$GOPATH/bin/tracer -c example.conf &
$GOPATH/bin/tracer-ui -t $GOPATH/src/github.com/tracer/tracer-ui/zipkin-ui &

To insert a basic demo trace, run

go run $GOPATH/src/github.com/tracer/tracer/cmd/demo/demo.go

To view the UI, point your browser at http://localhost:9997/.

If you want to add instrumentation to your own code, check out OpenTracing and opentracing-go for the API. To instantiate a Tracer instance that logs to the server you just started, write something like this:

import "github.com/tracer/tracer"

...

storage, err := tracer.NewGRPC("localhost:9999", &tracer.GRPCOptions{
	QueueSize:     1024,
   	FlushInterval: 1 * time.Second,
}, grpc.WithInsecure())
if err != nil {
	log.Fatal(err)
}
t := tracer.NewTracer("frontend", storage, tracer.RandomID{})

This will create a tracer t that sends traces via gRPC to your server.

For more information on Tracer's instrumentation API check godoc.org.

tracer's People

Contributors

dominikh avatar amandacameron avatar lstoll avatar

Watchers

 avatar Nick Allgood avatar Alex Hanselka avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.