Skip to content

Commit

Permalink
feat: bump apm-data and go-docappender to stable version (#12604)
Browse files Browse the repository at this point in the history
* feat: bump apm-data and go-docappender to stable version

* fix: cap minimum flush bytes to 24kb to fix test failure

* test: improve test assertions

* build: regenerate notice
  • Loading branch information
kruskall authored Feb 7, 2024
1 parent 7f3764a commit 0062c13
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 17 deletions.
12 changes: 6 additions & 6 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -362,11 +362,11 @@ these terms.

--------------------------------------------------------------------------------
Dependency : github.com/elastic/apm-data
Version: v0.1.1-0.20240207135100-668fa4836cc3
Version: v1.0.0
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/elastic/apm-data@v0.1.1-0.20240207135100-668fa4836cc3/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/elastic/apm-data@v1.0.0/LICENSE:

Apache License
Version 2.0, January 2004
Expand Down Expand Up @@ -1462,11 +1462,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected]/LIC

--------------------------------------------------------------------------------
Dependency : github.com/elastic/go-docappender
Version: v0.2.1-0.20231207080152-44217001fa53
Version: v1.0.0
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/elastic/go-docappender@v0.2.1-0.20231207080152-44217001fa53/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/elastic/go-docappender@v1.0.0/LICENSE:

Apache License
Version 2.0, January 2004
Expand Down Expand Up @@ -16376,11 +16376,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

--------------------------------------------------------------------------------
Dependency : go.elastic.co/apm/module/apmzap/v2
Version: v2.4.7
Version: v2.4.8
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmzap/[email protected].7/LICENSE:
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmzap/[email protected].8/LICENSE:

Apache License
Version 2.0, January 2004
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ require (
github.com/dgraph-io/badger/v2 v2.2007.4
github.com/dustin/go-humanize v1.0.1
github.com/elastic/apm-aggregation v0.0.0-20230815024520-e75a37d9ddd6
github.com/elastic/apm-data v0.1.1-0.20240207135100-668fa4836cc3
github.com/elastic/apm-data v1.0.0
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20240207112521-625ba402b8db
github.com/elastic/elastic-agent-client/v7 v7.8.0
github.com/elastic/elastic-agent-libs v0.7.5
github.com/elastic/elastic-agent-system-metrics v0.9.1
github.com/elastic/gmux v0.3.1
github.com/elastic/go-docappender v0.2.1-0.20231207080152-44217001fa53
github.com/elastic/go-docappender v1.0.0
github.com/elastic/go-elasticsearch/v8 v8.12.0
github.com/elastic/go-sysinfo v1.12.0
github.com/elastic/go-ucfg v0.8.6
Expand Down Expand Up @@ -146,7 +146,7 @@ require (
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect
go.elastic.co/apm/module/apmzap/v2 v2.4.7 // indirect
go.elastic.co/apm/module/apmzap/v2 v2.4.8 // indirect
go.elastic.co/ecszap v1.0.2 // indirect
go.opentelemetry.io/collector/semconv v0.93.0 // indirect
go.opentelemetry.io/otel/sdk v1.23.0 // indirect
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFP
github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM=
github.com/elastic/apm-aggregation v0.0.0-20230815024520-e75a37d9ddd6 h1:Js+C3HEE0a5BDFmhEmJV/Uo4uzj/paHjd7yl6+KYguw=
github.com/elastic/apm-aggregation v0.0.0-20230815024520-e75a37d9ddd6/go.mod h1:ba3gaJCuhxXN/O5AuiI56xxd6DukQdVOK0NfpzBntNo=
github.com/elastic/apm-data v0.1.1-0.20240207135100-668fa4836cc3 h1:2xDWspjzDCjMgrHEvuzh5owLBv6gZd4z8LwnC0nSl18=
github.com/elastic/apm-data v0.1.1-0.20240207135100-668fa4836cc3/go.mod h1:QUZMN5IFWhqbNfSUQxvd7Tuj7tx/6NoVJpFLAXd8ScY=
github.com/elastic/apm-data v1.0.0 h1:23JEBSOq9bIKcocghV38so2mFZzdlFgst0Re+ApxuFo=
github.com/elastic/apm-data v1.0.0/go.mod h1:QUZMN5IFWhqbNfSUQxvd7Tuj7tx/6NoVJpFLAXd8ScY=
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20240207112521-625ba402b8db h1:nSZmeF2n4rWgZeviaErdQuTKephNbKRdVqjjkGOkbBs=
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20240207112521-625ba402b8db/go.mod h1:zqd/weIZvWV856AAltUc0eho6iAEKHx2TC4EXjoWQGE=
github.com/elastic/elastic-agent-autodiscover v0.6.7 h1:+KVjltN0rPsBrU8b156gV4lOTBgG/vt0efFCFARrf3g=
Expand All @@ -150,8 +150,8 @@ github.com/elastic/elastic-transport-go/v8 v8.4.0 h1:EKYiH8CHd33BmMna2Bos1rDNMM8
github.com/elastic/elastic-transport-go/v8 v8.4.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk=
github.com/elastic/gmux v0.3.1 h1:ghT+5Y9jW5udQTBrhDeMOtQVdRBwk9Y2h1o+4Rb7mhE=
github.com/elastic/gmux v0.3.1/go.mod h1:IBFLojLnACU9tsUnoSavOaMdhq63/HOH/Aeiiha36jA=
github.com/elastic/go-docappender v0.2.1-0.20231207080152-44217001fa53 h1:3jOfdobdHlfwC4yeTpljD6Ul+IWmhHHGHoUtn/Cb/UY=
github.com/elastic/go-docappender v0.2.1-0.20231207080152-44217001fa53/go.mod h1:v+pGb4IkluqgnVN4Qu3o9a2WC1jve91NCu19oKNK/tM=
github.com/elastic/go-docappender v1.0.0 h1:fXCOd5MEx+4qHIJjJqdtXODC2UNj0sxpO2K84N+/E7Y=
github.com/elastic/go-docappender v1.0.0/go.mod h1:escVC67Qgu2xTKP92H30/tNW0F+VWty5JfkLzew3URI=
github.com/elastic/go-elasticsearch/v8 v8.12.0 h1:krkiCf4peJa7bZwGegy01b5xWWaYpik78wvisTeRO1U=
github.com/elastic/go-elasticsearch/v8 v8.12.0/go.mod h1:wSzJYrrKPZQ8qPuqAqc6KMR4HrBfHnZORvyL+FMFqq0=
github.com/elastic/go-lumber v0.1.2-0.20220819171948-335fde24ea0f h1:TsPpU5EAwlt7YZoupKlxZ093qTZYdGou3EhfTF1U0B4=
Expand Down Expand Up @@ -533,8 +533,8 @@ go.elastic.co/apm/module/apmhttp/v2 v2.4.8 h1:C1piLq4wcFHFB7jpFW1WPEyEl6zbRpf9SA
go.elastic.co/apm/module/apmhttp/v2 v2.4.8/go.mod h1:FzO5ptAs5oKB3xE1/hpxMA0a7mLIycp2RZdBtp4+uTA=
go.elastic.co/apm/module/apmotel/v2 v2.4.8 h1:XprKEoUFjcDFwWrmS56Go7D7Ndxa8uy+DVA4k1tItnY=
go.elastic.co/apm/module/apmotel/v2 v2.4.8/go.mod h1:NA3k4fTqsQhhZBlMOGJy8ol20tJKLafEDWAr5ELNpTg=
go.elastic.co/apm/module/apmzap/v2 v2.4.7 h1:j96pvon+IhbFpzV4IflXwxOKD+l5rApyyN2ycarJG6Y=
go.elastic.co/apm/module/apmzap/v2 v2.4.7/go.mod h1:bi0A6hYYwModJI70LJDB8IHqw7291Ub16LRdEXNcOcU=
go.elastic.co/apm/module/apmzap/v2 v2.4.8 h1:bU1ESD6Pm2cx1Nmlos0YRQQrdQoFynbYP3imTfIxee4=
go.elastic.co/apm/module/apmzap/v2 v2.4.8/go.mod h1:+pWYgTIT9utt48DVOiBesXQZ3rOVERsE1cS+q0wUafo=
go.elastic.co/apm/v2 v2.4.8 h1:3RuqxDjhgumT1BYxJGnVPdGY12lCzF+KGyvtSTynCYo=
go.elastic.co/apm/v2 v2.4.8/go.mod h1:+CiBUdrrAGnGCL9TNx7tQz3BrfYV23L8Ljvotoc87so=
go.elastic.co/ecszap v1.0.2 h1:iW5OGx8IiokiUzx/shD4AJCPFMC9uUtr7ycaiEIU++I=
Expand Down
5 changes: 5 additions & 0 deletions internal/beater/beater.go
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,11 @@ func (s *Runner) newFinalBatchProcessor(
}
flushBytes = int(b)
}
minFlush := 24 * 1024
if esConfig.CompressionLevel != 0 && flushBytes < minFlush {
s.logger.Warnf("flush_bytes config value is too small (%d) and might be ignored by the indexer, increasing value to %d", flushBytes, minFlush)
flushBytes = minFlush
}
client, err := newElasticsearchClient(esConfig.Config)
if err != nil {
return nil, nil, err
Expand Down
2 changes: 1 addition & 1 deletion internal/beater/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ func TestWrapServer(t *testing.T) {
req := makeTransactionRequest(t, srv.URL)
req.Header.Add("Content-Type", "application/x-ndjson")
res, err := srv.Client.Do(req)
assert.NoError(t, err)
require.NoError(t, err)
res.Body.Close()

doc := <-docs
Expand Down
2 changes: 1 addition & 1 deletion internal/beater/tracing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func TestServerTracingEnabled(t *testing.T) {
// Make an HTTP request to the server, which should be traced
// if instrumentation is enabled.
resp, err := srv.Client.Get(srv.URL + "/foo")
assert.NoError(t, err)
require.NoError(t, err)
resp.Body.Close()

if enabled {
Expand Down

0 comments on commit 0062c13

Please sign in to comment.