telemetry

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: MPL-2.0 Imports: 23 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 the telemetry client.

func New

func New(ctx context.Context, options ...Option) *Client

func (*Client) HasError

func (c *Client) HasError() error

func (*Client) NewRandomId

func (c *Client) NewRandomId() bool

NewRandomId returns true if we created a new random id in this session

func (*Client) RecordError

func (c *Client) RecordError(span otrace.Span, err error, opts ...otrace.EventOption)

RecordError should be called on a span to mark it as errored. Error values are not included unless debug mode is on.

func (*Client) Shutdown

func (c *Client) Shutdown(ctx context.Context)

func (*Client) Tracer

func (c *Client) Tracer() otrace.Tracer

type Option

type Option func(*Client)

func WithDebug

func WithDebug() Option

func WithDisabled

func WithDisabled() Option

func WithEndpoint

func WithEndpoint(endpoint string, insecure bool) Option

func WithExporter

func WithExporter(w io.WriteCloser) Option

func WithFS

func WithFS(fs afero.Fs) Option

func WithLogger

func WithLogger(logger hclog.Logger) Option

func WithResource

func WithResource(res *resource.Resource) Option

func WithVersionInfo

func WithVersionInfo(version, commit, buildDate string) Option

Jump to

Keyboard shortcuts

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