thrift_rpc

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2017 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// ParentSpanGUIDKey is the tag key used to record the relationship
	// between child and parent spans.
	ParentSpanGUIDKey = "parent_span_guid"

	TracerPlatformValue = "go"
	TracerVersionValue  = "0.9.1"

	TracerPlatformKey        = "lightstep.tracer_platform"
	TracerPlatformVersionKey = "lightstep.tracer_platform_version"
	TracerVersionKey         = "lightstep.tracer_version"
	ComponentNameKey         = "lightstep.component_name"
	GUIDKey                  = "lightstep.guid" // <- runtime guid, not span guid
	HostnameKey              = "lightstep.hostname"
	CommandLineKey           = "lightstep.command_line"
)

Variables

This section is empty.

Functions

func FlushLightStepTracer

func FlushLightStepTracer(lsTracer ot.Tracer) error

func NewTracer

func NewTracer(opts Options) ot.Tracer

NewTracer returns a new Tracer that reports spans to a LightStep collector.

Types

type Endpoint

type Endpoint struct {
	Host      string `yaml:"host" usage:"host on which the endpoint is running"`
	Port      int    `yaml:"port" usage:"port on which the endpoint is listening"`
	Plaintext bool   `yaml:"plaintext" usage:"whether or not to encrypt data send to the endpoint"`
}

Endpoint describes a collection or web API host/port and whether or not to use plaintext communicatation.

type Options

type Options struct {
	// AccessToken is the unique API key for your LightStep project.  It is
	// available on your account page at https://app.lightstep.com/account
	AccessToken string `yaml:"access_token" usage:"access token for reporting to LightStep"`

	// Collector is the host, port, and plaintext option to use
	// for the collector.
	Collector Endpoint `yaml:"collector"`

	// Tags are arbitrary key-value pairs that apply to all spans generated by
	// this Tracer.
	Tags ot.Tags

	// LightStep is the host, port, and plaintext option to use
	// for the LightStep web API.
	LightStepAPI Endpoint `yaml:"lightstep_api"`

	// MaxBufferedSpans is the maximum number of spans that will be buffered
	// before sending them to a collector.
	MaxBufferedSpans int `yaml:"max_buffered_spans"`

	// ReportingPeriod is the maximum duration of time between sending spans
	// to a collector.  If zero, the default will be used.
	ReportingPeriod time.Duration `yaml:"reporting_period"`

	ReportTimeout time.Duration `yaml:"report_timeout"`

	// DropSpanLogs turns log events on all Spans into no-ops.
	DropSpanLogs bool `yaml:"drop_span_logs"`

	// Set Verbose to true to enable more text logging.
	Verbose bool

	// In place of Flags
	MaxLogMessageLen int

	// MaxLogsPerSpan limits the number of logs in a single span.
	MaxLogsPerSpan int `yaml:"max_logs_per_span"`
}

Options control how the LightStep Tracer behaves.

type Recorder

type Recorder struct {

	// AccessToken is the access token used for explicit trace
	// collection requests.
	AccessToken string
	// contains filtered or unexported fields
}

Recorder buffers spans and forwards them to a LightStep collector.

func NewRecorder

func NewRecorder(opts Options) *Recorder

func (*Recorder) Close added in v0.12.0

func (r *Recorder) Close() error

func (*Recorder) Disable

func (r *Recorder) Disable()

func (*Recorder) Flush

func (r *Recorder) Flush()

func (*Recorder) RecordSpan

func (r *Recorder) RecordSpan(raw basictracer.RawSpan)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL