logging

package
v0.0.0-...-9dfb24e Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 4 Imported by: 0

README

Logger bridge for the observability package

References

  • Design - OpenTelemetry Go Logger API Design

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	otellog.Logger
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, log logger.Logger) *Logger

New - creates a new Logger.

func (*Logger) Emit

func (l *Logger) Emit(_ context.Context, record otellog.Record)

Emit stores the log record.

func (*Logger) Enabled

func (l *Logger) Enabled(ctx context.Context, record otellog.Record) bool

Enabled indicates whether a specific record should be stored.

type ScopeRecords

type ScopeRecords struct {
	// Name is the name of the instrumentation scope.
	Name string
	// Version is the version of the instrumentation scope.
	Version string
	// SchemaURL of the telemetry emitted by the scope.
	SchemaURL string

	// Records are the log records this instrumentation scope recorded.
	Records []otellog.Record
}

ScopeRecords represents the records for a single instrumentation scope.

Jump to

Keyboard shortcuts

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