Skip to content

Commit

Permalink
expand logging
Browse files Browse the repository at this point in the history
  • Loading branch information
fearful-symmetry committed Sep 28, 2023
1 parent 6312c8f commit cfe258a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions libbeat/esleg/eslegclient/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ func (conn *Connection) getVersion() error {
}

if versionData.Version.BuildFlavor == "serverless" {
conn.log.Info("build flavor of es is severless, marking connection as serverless")
conn.isServerless = true
} else if versionData.Version.BuildFlavor == "default" {
conn.isServerless = false
Expand Down
2 changes: 2 additions & 0 deletions libbeat/template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"sync"
"time"

"github.com/elastic/elastic-agent-libs/logp"
"github.com/elastic/elastic-agent-libs/mapstr"
"github.com/elastic/elastic-agent-libs/version"
"github.com/elastic/go-ucfg/yaml"
Expand Down Expand Up @@ -316,6 +317,7 @@ func buildIdxSettings(ver version.V, userSettings mapstr.M, isServerless bool) m

// deal with settings that aren't available on serverless
if isServerless {
logp.L().Infof("remote instance is severless, number_of_shards and max_docvalue_fields_search will be skipped in index template")
userSettings.Delete("number_of_shards")
} else {
indexSettings.Put("max_docvalue_fields_search", defaultMaxDocvalueFieldsSearch)
Expand Down

0 comments on commit cfe258a

Please sign in to comment.