metrics

package
v0.9.310 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: AGPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TRACER_NAME = "cedana/daemon"
	METER_NAME  = "cedana/daemon"
)
View Source
const (
	LOGGER_MAX_BATCH_SIZE = 100
	LOGGER_FLUSH_INTERVAL = 5 * time.Second
)
View Source
const METER_INTERVAL = 30 * time.Second

Variables

This section is empty.

Functions

func Init

func Init(ctx context.Context, wg *sync.WaitGroup, service, version string, extra ...attribute.KeyValue)

Init initializes OpenTelemetry tracing and metrics with SigNoz as the backend. Extra resource attributes (e.g. installed plugin versions, see ResourceAttributes) are attached to every log, trace and metric emitted.

func ResourceAttributes added in v0.9.309

func ResourceAttributes(m map[string]string) []attribute.KeyValue

ResourceAttributes converts a map of attribute key to value into OpenTelemetry resource attributes, suitable for passing to Init.

func StreamTracer

func StreamTracer(host *daemon.Host) grpc.StreamServerInterceptor

func UnaryTracer

func UnaryTracer(host *daemon.Host) grpc.UnaryServerInterceptor

Types

type Creds added in v0.9.260

type Creds struct {
	Endpoint string `json:"OTEL_EXPORTER_OTLP_ENDPOINT"`
	Headers  string `json:"OTEL_EXPORTER_OTLP_HEADERS"`
}

Creds holds OpenTelemetry exporter credentials

var Credentials *Creds

Jump to

Keyboard shortcuts

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