traces

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTraceBatch added in v1.0.0

func NewTraceBatch() *traceBatch

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) SendTraces

SendTraces is the entry point for receiving trace data

type LMTraceIngestResponse added in v1.0.0

type LMTraceIngestResponse struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
}

type Option

type Option func(*LMTraceIngest) error

func WithAuthentication

func WithAuthentication(authProvider utils.AuthParams) Option

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

func WithCollectorID added in v1.3.0

func WithCollectorID(collectorID string) Option

WithCollectorID sets collectorID which will be passed in request header

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, spanCount int, spanCountPerRequest 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.

func WithUserAgent added in v1.3.0

func WithUserAgent(userAgent string) Option

WithUserAgent sets the provided user agent

type SendTraceResponse added in v1.2.0

type SendTraceResponse struct {
	StatusCode int    `json:"statusCode"`
	Success    bool   `json:"success"`
	Message    string `json:"message"`

	RetryAfter int `json:"retryAfter"`

	Error       error `json:"error"`
	MultiStatus []struct {
		Code  float64 `json:"code"`
		Error string  `json:"error"`
	} `json:"multiStatus"`
}

type SendTracesOptionalParameters added in v1.0.0

type SendTracesOptionalParameters struct {
}

func NewSendTracesOptionalParameters added in v1.0.0

func NewSendTracesOptionalParameters() *SendTracesOptionalParameters

Jump to

Keyboard shortcuts

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