cloud

package module
v0.0.0-...-aef5e3d Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OtelMetrics2Prom

func OtelMetrics2Prom(appName string, vp *viper.Viper) (otelmetric.Meter, error)

not export to otel-collector, but export metrics to promethus http handler(/metrics)

func OtelMetricsAPI

func OtelMetricsAPI(meter otelmetric.Meter) (func(string, float64, *trace_error.Error), error)

func OtelTracingGrpc

func OtelTracingGrpc(appName string, vp *viper.Viper, attrs ...attribute.KeyValue) (
	shutdown func(context.Context) error, err error)

func PromMetricsAPI

func PromMetricsAPI() (func(string, float64, *trace_error.Error), error)

func SetupDBStatsOtel

func SetupDBStatsOtel(db *sql.DB, meter otelmetric.Meter) (err error)

func SetupDBStatsProm

func SetupDBStatsProm(db *sql.DB) (tickerDBConn *gotk.Ticker, err error)

func SetupOtelTracingFile

func SetupOtelTracingFile(ctx context.Context, fp, service string, attrs ...attribute.KeyValue) (
	closeOtel func(context.Context) error, err error)

Types

type HeaderInterceptor

type HeaderInterceptor struct {
	Headers map[string]string
}

func (*HeaderInterceptor) Stream

func (*HeaderInterceptor) Unary

type LogServer

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

func NewLogServer

func NewLogServer(logger *zap.Logger) *LogServer

func (*LogServer) Stream

func (inte *LogServer) Stream() grpc.StreamServerInterceptor

func (*LogServer) Unary

func (inte *LogServer) Unary() grpc.UnaryServerInterceptor

Jump to

Keyboard shortcuts

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