Documentation ¶
Index ¶
- func InsertMetrics(ctx context.Context, db *sql.DB, ...) error
- func NewMetricsModel(tableName string) map[pmetric.MetricType]MetricsModel
- func NewMetricsTable(ctx context.Context, tableName, cluster, engine, ttlExpr string, db *sql.DB) error
- func SetLogger(l *zap.Logger)
- type MetricsMetaData
- type MetricsModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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(tableName string) map[pmetric.MetricType]MetricsModel
NewMetricsModel create a model for contain different metric data
Types ¶
type MetricsMetaData ¶
type MetricsMetaData struct { ResAttr map[string]string 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 map[string]string, 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.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.