Documentation ¶
Index ¶
- func AttributesToMap(attributes pcommon.Map) column.IterableOrderedMap
- func InsertMetrics(ctx context.Context, db *sql.DB, ...) error
- func NewMetricsModel(tablesConfig MetricTablesConfigMapper) map[pmetric.MetricType]MetricsModel
- func NewMetricsTable(ctx context.Context, tablesConfig MetricTablesConfigMapper, ...) error
- func SetLogger(l *zap.Logger)
- type MetricTablesConfigMapper
- type MetricTypeConfig
- type MetricsMetaData
- type MetricsModel
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
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.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.