Documentation ¶
Index ¶
- func Close()
- func EncodeLogForTransfer(logRecords *logRecord, region region.Region, host string, ...) []*uclog.LogRecordArray
- func InitLoggerAndTransportsForSDK(config *Config, auth *ucjwt.Config, name service.Service)
- func InitLoggingSDK(auth *ucjwt.Config, rawLogs bool)
- type Config
- type LogServerTransportConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeLogForTransfer ¶
func EncodeLogForTransfer(logRecords *logRecord, region region.Region, host string, service service.Service) []*uclog.LogRecordArray
EncodeLogForTransfer aggregates log messages for more efficient the wire transfer to avoid hitting limits on number of Kinesis record per second and to improve the read performance For now we unify up to 1001 (maxLogRecordPerKinesisRecord) log messages/events into a single LogRecordArray to be sent as a single Kinesis record. Each Kinesis record is limited to 1MB so we are staying well under that. Each LogRecordArray has same service/region/host/tenant and then a set of log message/event contents
func InitLoggerAndTransportsForSDK ¶
InitLoggerAndTransportsForSDK sets up logging transports for SDK
func InitLoggingSDK ¶
InitLoggingSDK sets up logging transport for SDK
Types ¶
type Config ¶
type Config struct { LogServerTransportC LogServerTransportConfig `yaml:"serverlogger,omitempty" json:"serverlogger"` NoRequestIDs bool `yaml:"no_request_ids" json:"no_request_ids"` }
Config defines overall logging configuration
type LogServerTransportConfig ¶
type LogServerTransportConfig struct { uclog.TransportConfig `yaml:"transportconfig" json:"transportconfig"` TenantID uuid.UUID `yaml:"tenant_id" json:"tenant_id"` LogServiceURL string `yaml:"log_service_url" json:"log_service_url"` Service string `yaml:"service" json:"service"` SendRawData bool `yaml:"send_raw_data" json:"send_raw_data"` }
LogServerTransportConfig defines the configuration for transport sending events to our servers