traces

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LMTraceIngest

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

func NewLMTraceIngest

func NewLMTraceIngest(ctx context.Context, opts ...Option) (*LMTraceIngest, error)

NewLMTraceIngest initializes LMTraceIngest

func (LMTraceIngest) BatchInterval

func (lti LMTraceIngest) BatchInterval() time.Duration

BatchInterval returns the time interval for batching

func (*LMTraceIngest) CreateRequestBody

func (lti *LMTraceIngest) CreateRequestBody() model.DataPayload

func (*LMTraceIngest) ExportData

func (lti *LMTraceIngest) ExportData(payloadList model.DataPayload, uri, method string) error

ExportData exports trace to the LM platform

func (*LMTraceIngest) SendTraces

func (lti *LMTraceIngest) SendTraces(ctx context.Context, traceData []byte) error

SendTraces is the entry point for receiving trace data

func (*LMTraceIngest) URI

func (lti *LMTraceIngest) URI() string

URI returns the endpoint/uri of trace ingest API

type Option

type Option func(*LMTraceIngest) error

func WithAuthentication

func WithAuthentication(authProvider model.AuthProvider) Option

WithAuthentication is used for passing authentication token if not set in environment variables.

func WithEndpoint added in v0.6.1

func WithEndpoint(endpoint string) Option

WithEndpoint is used to set Endpoint URL to export traces

func WithGzipCompression

func WithGzipCompression(gzip bool) Option

WithGzipCompression can be used to enable/disable gzip compression of Trace payload Note: By default, gzip compression is enabled.

func WithHTTPClient

func WithHTTPClient(client *http.Client) Option

WithHTTPClient is used to set HTTP client

func WithRateLimit

func WithRateLimit(requestCount int) Option

WithRateLimit is used to limit the Trace request count per minute

func WithTraceBatchingDisabled

func WithTraceBatchingDisabled() Option

WithTraceBatchingDisabled is used for disabling Trace batching.

func WithTraceBatchingInterval

func WithTraceBatchingInterval(batchingInterval time.Duration) Option

WithTraceBatchingInterval is used for passing batch time interval.

Jump to

Keyboard shortcuts

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