Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidProjectID occurs if project identifier is invalid. ErrInvalidProjectID = errors.New("invalid project id") )
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(o *Options)
Option defines an recorder option.
func WithLogger ¶
WithLogger returns an Option that specifies a logger of the Recorder.
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options contains options for recorder.
type Recorder ¶
type Recorder struct {
// contains filtered or unexported fields
}
Recorder implements basictracer.SpanRecorder interface used to write traces to the GCE StackDriver.
func NewRecorder ¶
func NewRecorder(ctx context.Context, projectID string, c TraceClient, opts ...Option) (*Recorder, error)
NewRecorder creates new GCloud StackDriver recorder.
func (*Recorder) Close ¶ added in v0.3.0
Close flushes all the recorder traces and closes the client.
func (*Recorder) RecordSpan ¶
func (r *Recorder) RecordSpan(sp basictracer.RawSpan)
RecordSpan writes Span to the GCLoud StackDriver.
type TraceClient ¶ added in v0.3.0
type TraceClient interface { PatchTraces(context.Context, *pb.PatchTracesRequest, ...gax.CallOption) error Close() error }
TraceClient is the interface of the Google StackDriver Trace client.
Click to show internal directories.
Click to hide internal directories.