telemetry

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: May 27, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SlogJSON = log.SlogJSON

SlogJSON JSON marshals any value into a slog.Attr.

Functions

func ContextWithLogger added in v0.0.7

func ContextWithLogger(ctx context.Context, logger *slog.Logger) context.Context

ContextWithLogger is very similar to `log.ContextWithLogger` except that it uses an otelslog log handler by default.

func LoggerFromContext added in v0.0.7

func LoggerFromContext(ctx context.Context) *slog.Logger

LoggerFromContext is very similar to `log.LoggerFromContext` except that it uses an otelslog log handler by default.

func NewLogger added in v0.0.7

func NewLogger() *slog.Logger

NewLogger is very similar to `log.NewLogger` except that it includes an otelslog handler.

func OtelJSON

func OtelJSON(key string, value any) attribute.KeyValue

OtelJSON JSON marshals any value into an otel attribute.KeyValue

func StartTelemetry

func StartTelemetry() func()

StartTelemetry starts OpenTelemetry if PULUMI_MID_OTLP_ENDPOINT is set and returns a shutdown function. If PULUMI_MID_OTLP_ENDPOINT is not set it will do nothing and return an no-op function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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