Documentation ¶
Index ¶
- func GetTraceID(ctx context.Context) string
- func NewLoggerAdapter() (*zerolog.Logger, error)
- type HttpTelemetry
- func (t *HttpTelemetry) Error(ctx context.Context, msg string, args ...any)
- func (t *HttpTelemetry) ErrorSpan(span otelTrace.Span, err error) error
- func (t *HttpTelemetry) Log(ctx context.Context, msg string)
- func (t *HttpTelemetry) ShutdownLogger(ctx context.Context) error
- func (t *HttpTelemetry) ShutdownMeter(ctx context.Context) error
- func (t *HttpTelemetry) ShutdownTracer(ctx context.Context) error
- func (t *HttpTelemetry) Start(ctx context.Context, spanName string, opts ...otelTrace.SpanStartOption) (context.Context, otelTrace.Span)
- func (t *HttpTelemetry) StartRoot(ctx context.Context, request *http.Request, spanName string) (context.Context, otelTrace.Span)
- type Level
- type LogLevel
- type LogOutput
- type Telemeter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTraceID ¶
func NewLoggerAdapter ¶
NewLoggerAdapter NewLoggerAdapter
Types ¶
type HttpTelemetry ¶
type HttpTelemetry struct { Tracer otelTrace.Tracer Meter metric.Meter ShutdownTracerProvider func(context.Context) error ShutdownMeterProvider func(context.Context) error ShutdownLoggerProvider func(context.Context) error // contains filtered or unexported fields }
func NewHttpTelemetry ¶
func NewHttpTelemetry(cfg config.Config) (*HttpTelemetry, error)
func (*HttpTelemetry) Error ¶
func (t *HttpTelemetry) Error(ctx context.Context, msg string, args ...any)
func (*HttpTelemetry) ErrorSpan ¶
func (t *HttpTelemetry) ErrorSpan(span otelTrace.Span, err error) error
func (*HttpTelemetry) ShutdownLogger ¶
func (t *HttpTelemetry) ShutdownLogger(ctx context.Context) error
func (*HttpTelemetry) ShutdownMeter ¶
func (t *HttpTelemetry) ShutdownMeter(ctx context.Context) error
func (*HttpTelemetry) ShutdownTracer ¶
func (t *HttpTelemetry) ShutdownTracer(ctx context.Context) error
type Telemeter ¶
type Telemeter interface { StartRoot(ctx context.Context, request *http.Request, spanName string) (context.Context, otelTrace.Span) Start(ctx context.Context, spanName string, opts ...otelTrace.SpanStartOption) (context.Context, otelTrace.Span) ErrorSpan(span otelTrace.Span, err error) error ShutdownTracer(ctx context.Context) error ShutdownMeter(ctx context.Context) error ShutdownLogger(ctx context.Context) error Log(ctx context.Context, msg string) Error(ctx context.Context, msg string, args ...any) }
Click to show internal directories.
Click to hide internal directories.