Documentation ¶
Index ¶
- func OtelMetrics2Prom(appName string, vp *viper.Viper) (otelmetric.Meter, error)
- func OtelMetricsAPI(meter otelmetric.Meter) (func(string, float64, *trace_error.Error), error)
- func OtelMetricsGrpc(appName string, vp *viper.Viper, withRuntime bool) (otelmetric.Meter, func(context.Context) error, error)
- func OtelTracingGrpc(appName string, vp *viper.Viper, attrs ...attribute.KeyValue) (shutdown func(context.Context) error, err error)
- func PromMetricsAPI() (func(string, float64, *trace_error.Error), error)
- func SetupDBStatsOtel(db *sql.DB, meter otelmetric.Meter) (err error)
- func SetupDBStatsProm(db *sql.DB) (tickerDBConn *gotk.Ticker, err error)
- func SetupOtelTracingFile(ctx context.Context, fp, service string, attrs ...attribute.KeyValue) (closeOtel func(context.Context) error, err error)
- type HeaderInterceptor
- type LogServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OtelMetrics2Prom ¶
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 OtelMetricsGrpc ¶
func OtelTracingGrpc ¶
func PromMetricsAPI ¶
func PromMetricsAPI() (func(string, float64, *trace_error.Error), error)
func SetupDBStatsOtel ¶
func SetupDBStatsOtel(db *sql.DB, meter otelmetric.Meter) (err error)
Types ¶
type HeaderInterceptor ¶
func (*HeaderInterceptor) Stream ¶
func (inte *HeaderInterceptor) Stream() grpc.StreamClientInterceptor
func (*HeaderInterceptor) Unary ¶
func (inte *HeaderInterceptor) Unary() grpc.UnaryClientInterceptor
type LogServer ¶
type LogServer struct {
// contains filtered or unexported fields
}
func NewLogServer ¶
func (*LogServer) Stream ¶
func (inte *LogServer) Stream() grpc.StreamServerInterceptor
func (*LogServer) Unary ¶
func (inte *LogServer) Unary() grpc.UnaryServerInterceptor
Click to show internal directories.
Click to hide internal directories.