Documentation ¶
Index ¶
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
func NewMetricsTable ¶
NewMetricsTable create metric tables with an expiry time to storage metric telemetry 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(metrics any, metaData *MetricsMetaData, 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.
Click to show internal directories.
Click to hide internal directories.