contract

package
v0.0.0-...-9665562 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector interface {
	IncrementCounter(name string, value int, labels map[string]string)
	RecordGauge(name string, value float64, labels map[string]string)
	ObserveHistogram(name string, value float64, labels map[string]string)
}

type Logger

type Logger interface {
	Debug(args ...interface{})
	Debugf(msg string, args ...interface{})
	Info(args ...interface{})
	Infof(msg string, args ...interface{})
	Infow(msg string, keysAndValues ...interface{})
	Warn(args ...interface{})
	Warnf(msg string, args ...interface{})
	Error(args ...interface{})
	Errorf(msg string, args ...interface{})
	Errorw(msg string, keysAndValues ...interface{})
	DPanic(args ...interface{})
	DPanicf(msg string, args ...interface{})
	Fatal(args ...interface{})
	Fatalf(msg string, args ...interface{})
}

type Span

type Span interface {
	End(enableStackTrace ...bool)
	SetAttributes(attrs map[string]interface{})
	SetAttribute(key, value string)
	AddEvent(name string, attrs ...map[string]interface{})
	SetName(name string)
	SetStatus(code uint32, description string)
	RecordError(err error, attrs ...map[string]interface{})
}

type Tracer

type Tracer interface {
	// Configure initializes the tracer with the necessary settings.
	Configure() error

	// Span creates and starts a new span with the given name and attributes.
	Span(ctx context.Context, name string) (context.Context, Span)

	// Shutdown gracefully shuts down the tracer provider and flushes spans.
	Shutdown(ctx context.Context) error
}

Tracer defines the methods required for tracing operations.

Jump to

Keyboard shortcuts

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