logtransports

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

Close is only a wrapper around uclog.Close in the SDK

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

func InitLoggerAndTransportsForSDK(config *Config, auth *ucjwt.Config, name service.Service)

InitLoggerAndTransportsForSDK sets up logging transports for SDK

func InitLoggingSDK

func InitLoggingSDK(auth *ucjwt.Config, rawLogs bool)

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

Jump to

Keyboard shortcuts

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