Documentation ¶
Index ¶
Constants ¶
View Source
const (
TypeGeneral string = "general"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventStats ¶
type EventStats struct { Feature string `json:"feature_name"` Type string `json:"type_name"` ProjectID string `ch:"ProjectId" json:"project_id"` NamespaceID int64 `ch:"NamespaceId" json:"namespace_id"` AggTimeUnix time.Time `ch:"AggTimeUnix" json:"agg_time_unix"` Count uint64 `ch:"Count" json:"count"` }
type EventStatsGetFn ¶
type EventStatsGetFn func(context.Context, clickhouse.Conn) ([]EventStats, error)
type FeatureName ¶
type FeatureName string
const ( FeatureET FeatureName = "errortracking" FeatureMetrics FeatureName = "metrics" FeatureTraces FeatureName = "tracing" FeatureLogs FeatureName = "logging" )
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
func NewGenerator( db clickhouse.Conn, logger *zap.Logger, reg prometheus.Registerer, opts *GeneratorOpts, ) (*Generator, error)
type GeneratorOpts ¶
type GeneratorOpts struct {
SyncFrequencySeconds int
}
type ProjectAnalyticsData ¶
type ProjectAnalyticsDataTS ¶
type ProjectAnalyticsDataTS []ProjectAnalyticsData
func (ProjectAnalyticsDataTS) Len ¶
func (a ProjectAnalyticsDataTS) Len() int
func (ProjectAnalyticsDataTS) Less ¶
func (a ProjectAnalyticsDataTS) Less(i, j int) bool
func (ProjectAnalyticsDataTS) Swap ¶
func (a ProjectAnalyticsDataTS) Swap(i, j int)
type ProjectAnalyticsResponse ¶
type ProjectAnalyticsResponse struct { ProjectID string `json:"project_id"` NamespaceID int64 `json:"namespace_id"` Results ProjectAnalyticsDataTS `json:"results"` }
type Querier ¶
type Querier interface { Close() GetProjectAnalytics( context.Context, string, time.Time, time.Time, ) (interface{}, error) }
func NewQuerier ¶
func NewQuerier( clickHouseDSN string, clickHouseCloudDSN string, opts *clickhouse.Options, logger *zap.Logger, reg prometheus.Registerer, ) (Querier, error)
Click to show internal directories.
Click to hide internal directories.