telemetry

package
v0.73.3 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceNameDefault = "graith-daemon"

	ProtocolGRPC         = "grpc"
	ProtocolHTTPProtobuf = "http/protobuf"
)

Variables

This section is empty.

Functions

func Tracer

func Tracer(name string, opts ...trace.TracerOption) trace.Tracer

Tracer returns a tracer from the current global provider. Callers should request tracers when needed rather than caching them across daemon restarts.

Types

type ResourceOptions

type ResourceOptions struct {
	ServiceName           string
	ServiceVersion        string
	Commit                string
	DaemonInstanceID      string
	Profile               string
	ProcessKind           string
	ProcessPID            int
	ProcessExecutableName string
}

type TracingOptions

type TracingOptions struct {
	Endpoint string
	Protocol string
	Insecure bool
	Timeout  time.Duration
	Headers  map[string]string
	Resource ResourceOptions
	Logger   *slog.Logger
}

TracingOptions are the daemon-supplied settings for optional OTLP trace export. Callers pass explicit endpoint/protocol values from Graith config; this package overrides OpenTelemetry environment-derived exporter settings with Graith's explicit config before starting an exporter.

type TracingRuntime

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

func StartTracing

func StartTracing(ctx context.Context, opts TracingOptions) (*TracingRuntime, error)

func (*TracingRuntime) Shutdown

func (rt *TracingRuntime) Shutdown(ctx context.Context) error

Jump to

Keyboard shortcuts

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