internal

package
v0.116.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttributesToMap added in v0.116.0

func AttributesToMap(attributes pcommon.Map) column.IterableOrderedMap

func InsertMetrics

func InsertMetrics(ctx context.Context, db *sql.DB, metricsMap map[pmetric.MetricType]MetricsModel) error

InsertMetrics insert metric data into clickhouse concurrently

func NewMetricsModel

func NewMetricsModel(tablesConfig MetricTablesConfigMapper) map[pmetric.MetricType]MetricsModel

NewMetricsModel create a model for contain different metric data

func NewMetricsTable

func NewMetricsTable(ctx context.Context, tablesConfig MetricTablesConfigMapper, cluster, engine, ttlExpr string, db *sql.DB) error

NewMetricsTable create metric tables with an expiry time to storage metric telemetry data

func SetLogger

func SetLogger(l *zap.Logger)

SetLogger set a logger instance

Types

type MetricTablesConfigMapper added in v0.112.0

type MetricTablesConfigMapper map[pmetric.MetricType]MetricTypeConfig

type MetricTypeConfig added in v0.112.0

type MetricTypeConfig struct {
	Name string `mapstructure:"name"`
}

type MetricsMetaData

type MetricsMetaData struct {
	ResAttr    pcommon.Map
	ResURL     string
	ScopeURL   string
	ScopeInstr pcommon.InstrumentationScope
}

MetricsMetaData contain specific metric data

type MetricsModel

type MetricsModel interface {
	// Add used to bind MetricsMetaData to a specific metric then put them into a slice
	Add(resAttr pcommon.Map, resURL string, scopeInstr pcommon.InstrumentationScope, scopeURL string, metrics any, name string, description string, unit string) error
	// contains filtered or unexported methods
}

MetricsModel is used to group metric data and insert into clickhouse any type of metrics need implement it.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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