telemetry

package
v0.0.0-...-ca8de47 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Hook = zerolog.HookFunc(func(e *zerolog.Event, level zerolog.Level, message string) {
	if logHook == nil {
		return
	}

	logHook.Run(e, level, message)
})

temporary until otel gets log handling

Functions

func DatabaseConnect

func DatabaseConnect(ctx context.Context, driverName string, dataSourceName string) (*sqlx.DB, error)

DatabaseConnect applies telemetry to a database/sql driver

func GrpcDial

func GrpcDial(addr string, opts ...grpc.DialOption) (*grpc.ClientConn, error)

func HeadersToAttributes

func HeadersToAttributes(headers http.Header) []attribute.KeyValue

func Init

func Init(ctx context.Context, cfg config.Config, service string) (func(), error)

func InitLogs

func InitLogs(ctx context.Context, cfg config.Config, service string) (*logsSDK.LoggerProvider, error)

func InitMetric

func InitMetric(ctx context.Context, cfg config.Config, service string) (*metric.MeterProvider, error)

func InitTracer

func InitTracer(ctx context.Context, cfg config.Config, service string) (*trace.TracerProvider, error)

func NewGrpcServer

func NewGrpcServer(ctx context.Context, opts ...grpc.ServerOption) *grpc.Server

func NewRouter

func NewRouter() chi.Router

Types

This section is empty.

Jump to

Keyboard shortcuts

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