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
ContextWithLogger is very similar to `log.ContextWithLogger` except that it uses an otelslog log handler by default.
func LoggerFromContext ¶ added in v0.0.7
LoggerFromContext is very similar to `log.LoggerFromContext` except that it uses an otelslog log handler by default.
Types ¶
type TelemetryStuff ¶ added in v0.0.8
type TelemetryStuff struct {
Context context.Context
Logger *slog.Logger
CpuprofileFile *os.File
MemprofileFile *os.File
OtlpExporter *otlptrace.Exporter
}
func StartTelemetry ¶
func StartTelemetry(ctx context.Context) *TelemetryStuff
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.
func (*TelemetryStuff) Shutdown ¶ added in v0.0.8
func (ts *TelemetryStuff) Shutdown()
Click to show internal directories.
Click to hide internal directories.