tracehub

package
v0.0.0-...-2572d14 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LoggerLevel log level
	AppLoggerLevel config.ValueT[string] = "logger/level"

	// ServerEndpoint server endpoint
	ServerEndpoint config.ValueT[string] = "server/endpoint"

	// ServerGracefulShutdown graceful shutdown period
	ServerGracefulShutdown config.ValueT[time.Duration] = "server/graceful-shutdown"

	// MetricsEnable enable api metrics
	MetricsEnable config.ValueT[bool] = "metrics/enable"

	// HealthcheckEnable enables|disables health check handler
	HealthcheckEnable config.ValueT[bool] = "healthcheck/enable"

	// StorageType selects storage DB backend
	StorageType config.ValueT[string] = "storage/type"

	// ClickHouseDSN URL to connect to ClickHouse DB
	ClickHouseDSN config.ValueT[string] = "storage/clickhouse/url"

	// ClickMaxRowsInBatch number of rows saved before flush
	ClickMaxRowsInBatch config.ValueT[int] = "storage/clickhouse/rows-for-flush"

	// ClickFlushTimeInterval maximum time interval between flushing stored rows
	ClickFlushTimeInterval config.ValueT[time.Duration] = "storage/clickhouse/flushing-interval"

	// ClickCheckTimeInterval time interval between checking new records in DB
	ClickCheckTimeInterval config.ValueT[time.Duration] = "storage/clickhouse/checking-interval"
)
View Source
const (
	// HandleMetrics -
	HandleMetrics = "metrics"

	// HandleHealthcheck -
	HandleHealthcheck = "healthcheck"

	// HandleDebug -
	HandleDebug = "debug"
)

Variables

View Source
var ConfigFile string

ConfigFile file with actual app config

Functions

func ServerSubject

func ServerSubject() observer.Subject

ServerSubject -

func SetupContext

func SetupContext()

SetupContext setup app ctx

func SetupLogger

func SetupLogger() error

SetupLogger setup app logger

func SetupMetrics

func SetupMetrics(ctx context.Context) error

SetupMetrics -

func SetupRegistry

func SetupRegistry() error

func SetupSubject

func SetupSubject()

SetupSubject -

func SetupTraceHubServer

func SetupTraceHubServer(ctx context.Context) (*server.APIServer, error)

Types

type ServerMetrics

type ServerMetrics struct {
	// contains filtered or unexported fields
}

func GetMetrics

func GetMetrics() *ServerMetrics

GetMetrics -

func (*ServerMetrics) ObserveDBWriteCounter

func (am *ServerMetrics) ObserveDBWriteCounter(cnt int)

ObserveTracesCounter -

func (*ServerMetrics) ObserveTracesCounter

func (am *ServerMetrics) ObserveTracesCounter()

ObserveTracesCounter -

type SubjectClosed

type SubjectClosed struct{ observer.EventType }

SubjectClosed -

Jump to

Keyboard shortcuts

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