mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-30 21:21:59 +08:00

* perf: introduce smart trace detail algorithm * fix: remove hardcoded levels and handle null levels * feat: add support for broken trees * feat: use spanLimit env variable * fix: handle missing root span * add root spanId and root name * use permanent table * add kind, events and tagmap support * fix query formation * increase context timeout to 600s * perf improvement * handle error * return tableName as response to query * support multiple queries tableName * perf: improve memory and latency * feat: add getSubTree custom func and smart trace detail algo to ee * fix: create new functions for ee * chore: refactor codebase * chore: refactor frontend code Co-authored-by: Ankit Nayan <ankit@signoz.io> Co-authored-by: Palash Gupta <palashgdev@gmail.com>
30 lines
702 B
Go
30 lines
702 B
Go
package db
|
|
|
|
import (
|
|
"github.com/ClickHouse/clickhouse-go/v2"
|
|
|
|
"github.com/jmoiron/sqlx"
|
|
|
|
basechr "go.signoz.io/signoz/pkg/query-service/app/clickhouseReader"
|
|
"go.signoz.io/signoz/pkg/query-service/interfaces"
|
|
)
|
|
|
|
type ClickhouseReader struct {
|
|
conn clickhouse.Conn
|
|
appdb *sqlx.DB
|
|
*basechr.ClickHouseReader
|
|
}
|
|
|
|
func NewDataConnector(localDB *sqlx.DB, promConfigPath string, lm interfaces.FeatureLookup) *ClickhouseReader {
|
|
ch := basechr.NewReader(localDB, promConfigPath, lm)
|
|
return &ClickhouseReader{
|
|
conn: ch.GetConn(),
|
|
appdb: localDB,
|
|
ClickHouseReader: ch,
|
|
}
|
|
}
|
|
|
|
func (r *ClickhouseReader) Start(readerReady chan bool) {
|
|
r.ClickHouseReader.Start(readerReady)
|
|
}
|