Documentation ¶
Index ¶
- type LMTraceIngest
- func (lti LMTraceIngest) BatchInterval() time.Duration
- func (lti *LMTraceIngest) CreateRequestBody() model.DataPayload
- func (lti *LMTraceIngest) ExportData(payloadList model.DataPayload, uri, method string) error
- func (lti *LMTraceIngest) SendTraces(ctx context.Context, traceData []byte) error
- func (lti *LMTraceIngest) URI() string
- type Option
- func WithAuthentication(authProvider model.AuthProvider) Option
- func WithEndpoint(endpoint string) Option
- func WithGzipCompression(gzip bool) Option
- func WithHTTPClient(client *http.Client) Option
- func WithRateLimit(requestCount int) Option
- func WithTraceBatchingDisabled() Option
- func WithTraceBatchingInterval(batchingInterval time.Duration) Option
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
WithEndpoint is used to set Endpoint URL to export traces
func WithGzipCompression ¶
WithGzipCompression can be used to enable/disable gzip compression of Trace payload Note: By default, gzip compression is enabled.
func WithHTTPClient ¶
WithHTTPClient is used to set HTTP client
func WithRateLimit ¶
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 ¶
WithTraceBatchingInterval is used for passing batch time interval.