tracer

Dapper-style tracing in Go

  • 所有者: tracer/tracer
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

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/tracer
主编程语言Go
编程语言Go (语言数: 3)
平台
许可证MIT License
所有者活动
创建于2016-06-21 15:25:31
推送于2017-01-19 14:21:32
最后一次提交2016-09-17 11:21:07
发布数0
用户参与
星数176
关注者数11
派生数14
提交数143
已启用问题?
问题数22
打开的问题数13
拉请求数0
打开的拉请求数2
关闭的拉请求数4
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?