telemetry

package
v0.74.1 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectUniqueTenantIDs

func CollectUniqueTenantIDs[T any](items []T, extractFn func(T) string) []string

CollectUniqueTenantIDs extracts unique tenant IDs from a slice of items. The extractFn should return the tenant ID string for each item.

func GetCarrier

func GetCarrier(ctx context.Context) map[string]string

func InitMeter added in v0.73.101

func InitMeter(opts *TracerOpts) (func(context.Context) error, error)

func InitTracer

func InitTracer(opts *TracerOpts) (func(context.Context) error, error)

func NewSpan

func NewSpan(ctx context.Context, name string) (context.Context, trace.Span)

func NewSpanWithCarrier

func NewSpanWithCarrier(ctx context.Context, name string, carrier map[string]string) (context.Context, trace.Span)

func WithAttributes

func WithAttributes(span trace.Span, attrs ...AttributeKV)

Types

type AttributeKV

type AttributeKV struct {
	Key   AttributeKey
	Value any
}

AttributeKV is a wrapper for otel attributes KV

type AttributeKey

type AttributeKey string

type MetricsRecorder added in v0.73.101

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

MetricsRecorder provides a centralized way to record OTel metrics

func NewMetricsRecorder added in v0.73.101

func NewMetricsRecorder(ctx context.Context) (*MetricsRecorder, error)

NewMetricsRecorder creates a new metrics recorder with all instruments registered

func (*MetricsRecorder) RecordActiveSDKs added in v0.73.101

func (m *MetricsRecorder) RecordActiveSDKs(ctx context.Context, tenantId string, sdk SDKInfo, count int64)

RecordActiveSDKs records the number of active SDKs

func (*MetricsRecorder) RecordActiveSlots added in v0.73.101

func (m *MetricsRecorder) RecordActiveSlots(ctx context.Context, tenantId string, count int64)

RecordActiveSlots records the number of active worker slots

func (*MetricsRecorder) RecordActiveWorkers added in v0.73.101

func (m *MetricsRecorder) RecordActiveWorkers(ctx context.Context, tenantId string, count int64)

RecordActiveWorkers records the number of active workers

func (*MetricsRecorder) RecordDBBloat added in v0.73.101

func (m *MetricsRecorder) RecordDBBloat(ctx context.Context, count int64, healthStatus string)

RecordDBBloat records the number of bloated tables detected

func (*MetricsRecorder) RecordDBBloatPercent added in v0.73.101

func (m *MetricsRecorder) RecordDBBloatPercent(ctx context.Context, tableName string, deadPercent float64)

RecordDBBloatPercent records the dead tuple percentage for a specific table

func (*MetricsRecorder) RecordDBLastAutovacuumSecondsSince added in v0.73.101

func (m *MetricsRecorder) RecordDBLastAutovacuumSecondsSince(ctx context.Context, tableName string, seconds float64)

RecordDBLastAutovacuumSecondsSince records seconds since last autovacuum for a partitioned table

func (*MetricsRecorder) RecordDBLongRunningQueries added in v0.73.101

func (m *MetricsRecorder) RecordDBLongRunningQueries(ctx context.Context, count int64)

RecordDBLongRunningQueries records the number of long-running queries

func (*MetricsRecorder) RecordDBLongRunningVacuum added in v0.73.101

func (m *MetricsRecorder) RecordDBLongRunningVacuum(ctx context.Context, count int64, healthStatus string)

RecordDBLongRunningVacuum records the number of long-running vacuum operations

func (*MetricsRecorder) RecordDBQueryCacheHitRatio added in v0.73.101

func (m *MetricsRecorder) RecordDBQueryCacheHitRatio(ctx context.Context, tableName string, hitRatio float64)

RecordDBQueryCacheHitRatio records the query cache hit ratio for a table

func (*MetricsRecorder) RecordOLAPTempTableSizeDAG added in v0.73.101

func (m *MetricsRecorder) RecordOLAPTempTableSizeDAG(ctx context.Context, size int64)

RecordOLAPTempTableSizeDAG records the size of the OLAP DAG status updates temp table (instance-wide)

func (*MetricsRecorder) RecordOLAPTempTableSizeTask added in v0.73.101

func (m *MetricsRecorder) RecordOLAPTempTableSizeTask(ctx context.Context, size int64)

RecordOLAPTempTableSizeTask records the size of the OLAP task status updates temp table (instance-wide)

func (*MetricsRecorder) RecordYesterdayRunCount added in v0.73.101

func (m *MetricsRecorder) RecordYesterdayRunCount(ctx context.Context, status string, count int64)

RecordYesterdayRunCount records the number of workflow runs from yesterday (instance-wide)

type SDKInfo added in v0.73.101

type SDKInfo struct {
	OperatingSystem string
	Language        string
	LanguageVersion string
	SdkVersion      string
}

SDKInfo contains information about an SDK

type TracerOpts

type TracerOpts struct {
	ServiceName   string
	CollectorURL  string
	Insecure      bool
	TraceIdRatio  string
	CollectorAuth string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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