Documentation ¶
Index ¶
- func NewMetricBatch() *metricBatch
- type LMMetricIngest
- func (metricIngest *LMMetricIngest) SendMetrics(ctx context.Context, rInput model.ResourceInput, dsInput model.DatasourceInput, ...) (*SendMetricResponse, error)
- func (metricIngest *LMMetricIngest) UpdateInstanceProperties(resIDs, insProps map[string]string, dsName, dsDisplayName, insName string, ...) (*UpdateInstancePropertiesResponse, error)
- func (metricIngest *LMMetricIngest) UpdateResourceProperties(resName string, resIDs, resProps map[string]string, patch bool) (*UpdateResourcePropertiesResponse, error)
- type LMMetricIngestResponse
- type Option
- func WithAuthentication(authParams utils.AuthParams) Option
- func WithEndpoint(endpoint string) Option
- func WithGzipCompression(gzip bool) Option
- func WithHTTPClient(client *http.Client) Option
- func WithMetricBatchingDisabled() Option
- func WithMetricBatchingInterval(batchingInterval time.Duration) Option
- func WithRateLimit(requestCount int) Option
- func WithUserAgent(userAgent string) Option
- type SendMetricResponse
- type SendMetricsOptionalParameters
- type UpdateInstancePropertiesResponse
- type UpdateResourcePropertiesResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMetricBatch ¶ added in v1.0.0
func NewMetricBatch() *metricBatch
Types ¶
type LMMetricIngest ¶
type LMMetricIngest struct {
// contains filtered or unexported fields
}
func NewLMMetricIngest ¶
func NewLMMetricIngest(ctx context.Context, opts ...Option) (*LMMetricIngest, error)
NewLMMetricIngest initializes LMMetricIngest
func (*LMMetricIngest) SendMetrics ¶
func (metricIngest *LMMetricIngest) SendMetrics(ctx context.Context, rInput model.ResourceInput, dsInput model.DatasourceInput, instInput model.InstanceInput, dpInput model.DataPointInput, o ...SendMetricsOptionalParameters) (*SendMetricResponse, error)
SendMetrics is the entry point for receiving metric data. It also validates the attributes of metrics before creating metric payload.
func (*LMMetricIngest) UpdateInstanceProperties ¶
func (metricIngest *LMMetricIngest) UpdateInstanceProperties(resIDs, insProps map[string]string, dsName, dsDisplayName, insName string, patch bool) (*UpdateInstancePropertiesResponse, error)
func (*LMMetricIngest) UpdateResourceProperties ¶
func (metricIngest *LMMetricIngest) UpdateResourceProperties(resName string, resIDs, resProps map[string]string, patch bool) (*UpdateResourcePropertiesResponse, error)
type LMMetricIngestResponse ¶ added in v1.0.0
type Option ¶ added in v0.2.0
type Option func(*LMMetricIngest) error
func WithAuthentication ¶ added in v0.3.0
func WithAuthentication(authParams utils.AuthParams) Option
WithAuthentication is used for passing authentication token if not set in environment variables.
func WithEndpoint ¶ added in v0.6.2
WithEndpoint is used to set Endpoint URL to export logs
func WithGzipCompression ¶ added in v0.4.0
WithGzipCompression can be used to enable/disable gzip compression of metric payload Note: By default, gzip compression is enabled.
func WithHTTPClient ¶ added in v0.6.2
WithHTTPClient is used to set HTTP client
func WithMetricBatchingDisabled ¶ added in v0.5.0
func WithMetricBatchingDisabled() Option
WithMetricBatchingDisabled is used for disabling metric batching.
func WithMetricBatchingInterval ¶ added in v0.5.0
WithMetricBatchingInterval is used for passing batch time interval.
func WithRateLimit ¶ added in v0.6.0
WithRateLimit is used to limit the metric request count per minute
func WithUserAgent ¶ added in v1.3.0
WithUserAgent sets the provided user agent
type SendMetricResponse ¶ added in v1.2.0
type SendMetricsOptionalParameters ¶ added in v1.0.0
type SendMetricsOptionalParameters struct { }
func NewSendMetricsOptionalParameters ¶ added in v1.0.0
func NewSendMetricsOptionalParameters() *SendMetricsOptionalParameters