Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Commit 0d95624

Browse files
authored
This fixes Kibana flights sample dashboards, it also makes logs less noisy (#1462)
Kibana flights dashboards was broken as Carrier should be `keyword` not `text`. More systematical change is harder. Also logs end up being very noisy and confusing. End up cleaning them.
1 parent 493996b commit 0d95624

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

examples/kibana-sample-data/quesma/config/local-dev.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ processors:
5050
- my-clickhouse-data-source
5151
schemaOverrides:
5252
fields:
53+
"Carrier":
54+
type: keyword
5355
"DestLocation":
5456
type: geo_point
5557
"OriginLocation":
@@ -114,6 +116,8 @@ processors:
114116
- my-clickhouse-data-source
115117
schemaOverrides:
116118
fields:
119+
"Carrier":
120+
type: keyword
117121
"DestLocation":
118122
type: geo_point
119123
"OriginLocation":

platform/ab_testing/sender/coordinator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func (c *SenderCoordinator) receiveHealthStatusesLoop() {
118118
func (c *SenderCoordinator) Start() {
119119

120120
if !c.enabled {
121-
logger.InfoWithCtx(c.ctx).Msg("A/B Testing Controller is disabled")
121+
logger.DebugWithCtx(c.ctx).Msg("A/B Testing Controller is disabled")
122122
return
123123
}
124124

platform/clickhouse/connection.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,19 @@ func InitDBConnectionPool(c *config.QuesmaConfiguration) quesma_api.BackendConne
6262

6363
err := db.Ping()
6464
if err != nil {
65-
logger.Error().Err(err).Msg("Failed to ping database.")
6665
// These error message duplicates messages from end_user_errors.GuessClickhouseErrorType
6766
// Not sure if you want to keep them in sync or not. These two cases are different.
6867

6968
if strings.Contains(err.Error(), "tls: failed to verify certificate") {
70-
logger.Warn().Err(err).Msg("Failed to connect to database with TLS. Retrying TLS, but with disabled chain and host verification.")
69+
logger.Info().Err(err).Msg("Failed to connect to database with TLS. Retrying TLS, but with disabled chain and host verification.")
7170
_ = db.Close()
7271
db = initDBConnection(c, &tls.Config{InsecureSkipVerify: true})
7372
} else if strings.Contains(err.Error(), "tls: first record does not look like a TLS handshake") {
7473
_ = db.Close()
75-
logger.Warn().Err(err).Msg("Failed to connect to database with TLS. Trying without TLS at all.")
74+
logger.Info().Err(err).Msg("Failed to connect to database with TLS. Trying without TLS at all.")
7675
db = initDBConnection(c, nil)
76+
} else {
77+
logger.Info().Err(err).Msg("Failed to ping database and could not apply recovery.")
7778
}
7879
}
7980

platform/ingest/index_name_rewriter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ type indexNameRegexpRewriter struct {
3737
func NewIndexNameRewriter(cfg *config.QuesmaConfiguration) IndexNameRewriter {
3838

3939
if len(cfg.IndexNameRewriteRules) == 0 {
40-
logger.Info().Msgf("No index name rewrite rules configured, using no-op rewriter")
40+
logger.Debug().Msgf("No index name rewrite rules configured, using no-op rewriter")
4141
// if no rewrite rules are configured, return a no-op rewriter
4242
return &NoOpIndexNameRewriter{}
4343
}

platform/ingest/processor.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,6 @@ func (ip *IngestProcessor) processInsertQuery(ctx context.Context,
703703
} else {
704704
// Likely we want to remove below line
705705
createTableCmd = addOurFieldsToCreateTableQuery(createTableCmd, tableConfig, table)
706-
logger.InfoWithCtx(ctx).Msgf("created table '%s' with query: %s", tableName, createTableCmd)
707706
}
708707
}
709708
if table == nil {

0 commit comments

Comments
 (0)