Documentation
¶
Index ¶
- Constants
- Variables
- func ReplaceTables(query string, distributed bool) string
- func SelectIP(ips []netaddr.IP) *netaddr.IP
- func StackHash(s []string) uint64
- type ApplicationInstrumentation
- type ClickhouseClient
- type Collector
- func (c *Collector) Close()
- func (c *Collector) Config(w http.ResponseWriter, r *http.Request)
- func (c *Collector) IsClickhouseDistributed(project *db.Project) (bool, error)
- func (c *Collector) Logs(w http.ResponseWriter, r *http.Request)
- func (c *Collector) Metrics(w http.ResponseWriter, r *http.Request)
- func (c *Collector) MigrateClickhouseDatabase(ctx context.Context, project *db.Project) error
- func (c *Collector) Profiles(w http.ResponseWriter, r *http.Request)
- func (c *Collector) Traces(w http.ResponseWriter, r *http.Request)
- func (c *Collector) UpdateClickhouseClient(ctx context.Context, project *db.Project) error
- type Config
- type ConfigData
- type LogsBatch
- type ProfilesBatch
- type TracesBatch
Constants ¶
View Source
const (
ApiKeyHeader = "X-API-Key"
)
Variables ¶
View Source
var ( ErrProjectNotFound = errors.New("project not found") ErrClickhouseNotConfigured = errors.New("clickhouse integration is not configured") )
Functions ¶
func ReplaceTables ¶ added in v1.5.2
Types ¶
type ApplicationInstrumentation ¶ added in v1.9.0
type ApplicationInstrumentation struct {
Type model.ApplicationType `json:"type"`
Host string `json:"host"`
Port string `json:"port"`
Credentials model.Credentials `json:"credentials"`
Params map[string]string `json:"params"`
Instance string `json:"instance"`
}
type ClickhouseClient ¶ added in v1.8.3
type ClickhouseClient struct {
// contains filtered or unexported fields
}
func NewClickhouseClient ¶ added in v1.8.3
func NewClickhouseClient(ctx context.Context, cfg *db.IntegrationClickhouse) (*ClickhouseClient, error)
func (*ClickhouseClient) Close ¶ added in v1.8.3
func (c *ClickhouseClient) Close()
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
func New ¶
func New(cfg Config, database *db.DB, cache *cache.Cache, globalClickHouse *db.IntegrationClickhouse, globalPrometheus *db.IntegrationPrometheus) *Collector
func (*Collector) Config ¶ added in v1.3.0
func (c *Collector) Config(w http.ResponseWriter, r *http.Request)
func (*Collector) IsClickhouseDistributed ¶ added in v1.5.2
func (*Collector) MigrateClickhouseDatabase ¶ added in v1.7.3
type Config ¶ added in v1.8.9
type Config struct {
TracesTTL timeseries.Duration
LogsTTL timeseries.Duration
ProfilesTTL timeseries.Duration
}
type ConfigData ¶ added in v1.9.0
type ConfigData struct {
ApplicationInstrumentation []ApplicationInstrumentation `json:"application_instrumentation"`
AWSConfig *db.IntegrationAWS `json:"aws_config"`
}
type LogsBatch ¶
type LogsBatch struct {
Timestamp *chproto.ColDateTime64
TraceId *chproto.ColStr
SpanId *chproto.ColStr
TraceFlags *chproto.ColUInt32
SeverityText *chproto.ColLowCardinality[string]
SeverityNumber *chproto.ColInt32
ServiceName *chproto.ColLowCardinality[string]
ResourceAttributes *chproto.ColMap[string, string]
LogAttributes *chproto.ColMap[string, string]
Body *chproto.ColStr
// contains filtered or unexported fields
}
func NewLogsBatch ¶
func (*LogsBatch) Add ¶
func (b *LogsBatch) Add(req *v1.ExportLogsServiceRequest)
type ProfilesBatch ¶
type ProfilesBatch struct {
ServiceName *chproto.ColLowCardinality[string]
Type *chproto.ColLowCardinality[string]
Start *chproto.ColDateTime64
End *chproto.ColDateTime64
Labels *chproto.ColMap[string, string]
Value *chproto.ColInt64
StackHash *chproto.ColUInt64
Stack *chproto.ColArr[string]
// contains filtered or unexported fields
}
func NewProfilesBatch ¶
func (*ProfilesBatch) Close ¶
func (b *ProfilesBatch) Close()
type TracesBatch ¶
type TracesBatch struct {
Timestamp *chproto.ColDateTime64
TraceId *chproto.ColStr
SpanId *chproto.ColStr
ParentSpanId *chproto.ColStr
TraceState *chproto.ColStr
SpanName *chproto.ColLowCardinality[string]
SpanKind *chproto.ColLowCardinality[string]
ServiceName *chproto.ColLowCardinality[string]
ResourceAttributes *chproto.ColMap[string, string]
SpanAttributes *chproto.ColMap[string, string]
Duration *chproto.ColInt64
StatusCode *chproto.ColLowCardinality[string]
StatusMessage *chproto.ColStr
EventsTimestamp *chproto.ColArr[time.Time]
EventsName *chproto.ColArr[string]
EventsAttributes *chproto.ColArr[map[string]string]
LinksTraceId *chproto.ColArr[string]
LinksSpanId *chproto.ColArr[string]
LinksTraceState *chproto.ColArr[string]
LinksAttributes *chproto.ColArr[map[string]string]
// contains filtered or unexported fields
}
func NewTracesBatch ¶
func (*TracesBatch) Add ¶
func (b *TracesBatch) Add(req *v1.ExportTraceServiceRequest)
func (*TracesBatch) Close ¶
func (b *TracesBatch) Close()
Click to show internal directories.
Click to hide internal directories.