Search and commands

↑ ↓ to select · Enter to open · Esc to close

Type to search packages.

observ

v1.47.0
go.opentelemetry.io/otel/sdk/log/internal/observ

Documentation

pkg.go.dev ↗

Table of contents

↓ to select · Enter to jump· Shift+Enter for source

19 matches

Top ↑

Package observ provides observability instrumentation for the OTel Logs SDK.

Constants

SchemaURL

const (
	// SchemaURL is the schema URL of the instrumentation.
	SchemaURL = semconv.SchemaURL
)

ScopeName

const (
	// ScopeName is the name of the instrumentation scope.
	ScopeName = "go.opentelemetry.io/otel/sdk/log/internal/observ"
)

Variables

ErrQueueFull

var ErrQueueFull = otelconv.SDKProcessorLogProcessed{}.AttrErrorType("queue_full")

ErrQueueFull is the attribute value for the "queue_full" error type.

Functions

BLPComponentName

func BLPComponentName(id int64) attribute.KeyValue

BLPComponentName returns the component name attribute for a BatchLogProcessor with the given ID.

GetSLPComponentName

func GetSLPComponentName(id int64) attribute.KeyValue

GetSLPComponentName returns the component name attribute for a SimpleLogProcessor with the given ID.

NextSimpleProcessorID

func NextSimpleProcessorID() int64

NextSimpleProcessorID returns the next unique ID for a simple processor.

SetSimpleProcessorID

func SetSimpleProcessorID(v int64) int64

SetSimpleProcessorID sets the exporter ID counter to v and returns the previous value.

This function is useful for testing purposes, allowing you to reset the counter. It should not be used in production code.

Types

BLP

type BLP struct {
	// contains filtered or unexported fields
}

BLP is the instrumentation for an OTel SDK BatchLogProcessor.

NewBLP

func NewBLP(id int64, qLen func() int64, qMax int64) (*BLP, error)

NewBLP creates new instrumentation for a BatchLogProcessor. It returns nil if observability is not enabled.

BLP.Processed

func (b *BLP) Processed(ctx context.Context, n int64)

Processed records n log records as having finished processing successfully.

BLP.ProcessedQueueFull

func (b *BLP) ProcessedQueueFull(ctx context.Context, n int64)

ProcessedQueueFull records n log records as having finished processing with a queue-full error.

BLP.Shutdown

func (b *BLP) Shutdown() error

Shutdown unregisters the callbacks registered by NewBLP.

SLP

type SLP struct {
	// contains filtered or unexported fields
}

SLP is the instrumentation for an OTel SDK SimpleLogProcessor.

NewSLP

func NewSLP(id int64) (*SLP, error)

NewSLP returns instrumentation for an OTel SDK SimpleLogProcessor with the provided ID.

If the experimental observability is disabled, nil is returned.

SLP.LogProcessed

func (slp *SLP) LogProcessed(ctx context.Context)

LogProcessed records that a log record has been submitted to the exporter by the SimpleLogProcessor. Per the semantic conventions, this count is recorded at submission time and MUST NOT be affected by the export outcome.

Dependency graph