lightstep

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a trace client for LightStep.

func NewClient

func NewClient(conf Config) *Client

NewClient returns initialized *Client.

func (*Client) Close added in v0.1.1

func (*Client) Close()

Close is dummy method.

func (*Client) Flush added in v0.1.1

func (*Client) Flush()

Flush is dummy method.

func (*Client) NewTrace

func (c *Client) NewTrace(ctx context.Context) (platform.Trace, error)

NewTrace creates LightStep trace.Trace with sampling policy.

type Config

type Config struct {
	// required
	AccessToken string

	// optional
	ServiceName        string
	ReportTimeout      time.Duration
	ReportingPeriod    time.Duration
	MinReportingPeriod time.Duration
	ReconnectPeriod    time.Duration

	MaxBufferedSpans          int
	MaxLogKeyLen              int
	MaxLogValueLen            int
	MaxLogsPerSpan            int
	DropSpanLogs              bool
	MetaEventReportingEnabled bool

	UseGRPC                     bool
	DialOptions                 []grpc.DialOption
	GRPCMaxCallSendMsgSizeBytes int

	Collector    lightstep.Endpoint
	LightStepAPI lightstep.Endpoint
	Recorder     lightstep.SpanRecorder
	ConnFactory  lightstep.ConnectorFactory
}

Config contains token and settings for LightStep.

func (Config) ToOption

func (c Config) ToOption() lightstep.Options

ToOption converts Config to lightstep-tracer-go.Options.

type Span

type Span struct {
	opentracing.Span
}

Span is wrapper struct of opentracing.Span.

func (*Span) CanGetSummary

func (s *Span) CanGetSummary() bool

CanGetSummary determines Span can call GetSummary().

func (*Span) Finish

func (s *Span) Finish()

Finish sends trace data to LightStep asynchronously.

func (*Span) FinishWait

func (s *Span) FinishWait()

FinishWait sends trace data to LightStep asynchronously. (dummy method for lightstep)

func (*Span) GetSummary

func (s *Span) GetSummary() []string

GetSummary is dummy method.

func (*Span) NewChild

func (s *Span) NewChild(name string) platform.Span

NewChild creates child span data from this Span.

func (*Span) OutputSummary

func (s *Span) OutputSummary()

OutputSummary is dummy method.

func (*Span) SetEnvironment

func (s *Span) SetEnvironment(env string) platform.Span

SetEnvironment sets environment data into span.

func (*Span) SetError

func (s *Span) SetError(err error) platform.Span

SetError se ts error data into span.

func (*Span) SetLabel

func (s *Span) SetLabel(key, value string) platform.Span

SetLabel sets label data into span.

func (*Span) SetResponse

func (s *Span) SetResponse(status int) platform.Span

SetResponse sets HTTP response status into span.

func (*Span) SetSQL

func (s *Span) SetSQL(sql string) platform.Span

SetSQL sets SQL query data into span.

func (*Span) SetServiceName

func (s *Span) SetServiceName(name string) platform.Span

SetServiceName sets service name into span.

func (*Span) SetUser

func (s *Span) SetUser(user string) platform.Span

SetUser sets user's id or name data into span.

func (*Span) SetVersion

func (s *Span) SetVersion(ver string) platform.Span

SetVersion sets version data into span.

func (*Span) TraceID

func (s *Span) TraceID() string

TraceID is dummy method.

type Trace

type Trace struct {
	// contains filtered or unexported fields
}

Trace is a dummy struct for LightStep tracing.

func (*Trace) NewSpan

func (t *Trace) NewSpan(name string) platform.Span

NewSpan returns initialized span data with name.

func (*Trace) NewSpanFromRequest

func (t *Trace) NewSpanFromRequest(r *http.Request) platform.Span

NewSpanFromRequest returns initialized span data with *http.Request.

Jump to

Keyboard shortcuts

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