Documentation ¶
Index ¶
- func NewLMCore(ctx context.Context, params Params, opts ...Option) (*lmCore, error)
- type AuthProvider
- type LogIngesterClient
- type LogIngesterSetting
- type LogNotifier
- type Option
- func WithAuthProvider(authProvider AuthProvider) Option
- func WithBlocking() Option
- func WithClientBatchingDisabled() Option
- func WithClientBatchingInterval(batchingInterval time.Duration) Option
- func WithLogLevel(level zapcore.Level) Option
- func WithMetadata(metadataTags map[string]string) Option
- func WithNopLogIngesterClient() Option
- type Params
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthProvider ¶
AuthProvider is used by the lmotel collector for providing auth token from derived in collector
type LogIngesterClient ¶
type LogIngesterClient interface {
SendLogs(ctx context.Context, logMessage string, resourceidMap, metadata map[string]string) error
}
LogIngesterClient represents interface for Log Ingest client
type LogIngesterSetting ¶
type LogIngesterSetting struct {
// contains filtered or unexported fields
}
LogIngesterSetting holds the properties required for configuring the LMLogIngest instance
type LogNotifier ¶
type LogNotifier struct { LogIngesterClient // contains filtered or unexported fields }
LogNotifier holds the log ingester config
type Option ¶
type Option func(*lmCore) error
func WithAuthProvider ¶
func WithAuthProvider(authProvider AuthProvider) Option
WithAuthProvider is used by the lmotel collector for passing the auth provider
func WithBlocking ¶
func WithBlocking() Option
WithBlocking blocks for the calls to the send log operation
func WithClientBatchingDisabled ¶
func WithClientBatchingDisabled() Option
WithClientBatchingDisabled disables the batching of logs
func WithClientBatchingInterval ¶
WithClientBatchingInterval configures the batching interval
func WithLogLevel ¶
WithLogLevel configures the log level such that only log messages with given level or above that level will be sent to the Logicmonitor platform
func WithMetadata ¶
WithMetadata configures the metadata tags for the log messages
func WithNopLogIngesterClient ¶
func WithNopLogIngesterClient() Option
WithNopLogIngesterClient will use no-op log ingester which will not send any logs. Can be used for testing