Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/github.com/elastic/ela…
Browse files Browse the repository at this point in the history
…stic-agent-libs-0.17.5
  • Loading branch information
kruskall authored Dec 20, 2024
2 parents 7cc8acb + fee1e14 commit 5e58610
Show file tree
Hide file tree
Showing 21 changed files with 204 additions and 111 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ on:
required: false
type: boolean
default: false
enableTailSampling:
description: 'Enable tail-based sampling on the APM server'
required: false
type: boolean
default: false
tailSamplingStorageLimit:
description: 'Storage size limit of tail-based sampling on the APM server, defaults to 10GB'
required: false
type: string
default: "10GB"
profile:
description: 'The system profile used to run the benchmarks'
required: false
Expand Down Expand Up @@ -52,12 +62,14 @@ jobs:
TF_VAR_private_key: ./id_rsa_terraform
TF_VAR_public_key: ./id_rsa_terraform.pub
TF_VAR_run_standalone: ${{ inputs.runStandalone || github.event.schedule=='0 5 */5 * *' }}
TF_VAR_apm_server_tail_sampling: ${{ inputs.enableTailSampling || 'false' }} # set the default again otherwise schedules won't work
TF_VAR_apm_server_tail_sampling_storage_limit: ${{ inputs.tailSamplingStorageLimit || '10GB' }} # set the default again otherwise schedules won't work
RUN_STANDALONE: ${{ inputs.runStandalone || github.event.schedule=='0 5 */5 * *' }}
TFVARS_SOURCE: ${{ inputs.profile || 'system-profiles/8GBx1zone.tfvars' }} # // Default to use an 8gb profile
TF_VAR_BUILD_ID: ${{ github.run_id }}
TF_VAR_ENVIRONMENT: ci
TF_VAR_REPO: ${{ github.repository }}
GOBENCH_TAGS: branch=${{ github.head_ref || github.ref }},commit=${{ github.sha }},target_branch=${{ github.base_ref }}
GOBENCH_TAGS: branch=${{ github.head_ref || github.ref }},commit=${{ github.sha }},target_branch=${{ github.base_ref }},enable_tail_sampling=${{ inputs.enableTailSampling }}
GOBENCH_PASSWORD: ${{ secrets.GOBENCH_PASSWORD }}
GOBENCH_USERNAME: ${{ secrets.GOBENCH_USERNAME }}
GOBENCH_HOST: ${{ secrets.GOBENCH_HOST }}
Expand Down
20 changes: 10 additions & 10 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -604,11 +604,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected].

--------------------------------------------------------------------------------
Dependency : github.com/elastic/beats/v7
Version: v7.0.0-alpha2.0.20241213104605-93b018a83621
Version: v7.0.0-alpha2.0.20241216091513-d508a408b0e9
Licence type (autodetected): Elastic
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/[email protected].20241213104605-93b018a83621/LICENSE.txt:
Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/[email protected].20241216091513-d508a408b0e9/LICENSE.txt:

Source code in this repository is variously licensed under the Apache License
Version 2.0, an Apache compatible license, or the Elastic License. Outside of
Expand Down Expand Up @@ -1704,11 +1704,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/go-docappender/

--------------------------------------------------------------------------------
Dependency : github.com/elastic/go-elasticsearch/v8
Version: v8.16.0
Version: v8.17.0
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/elastic/go-elasticsearch/v8@v8.16.0/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/elastic/go-elasticsearch/v8@v8.17.0/LICENSE:

Apache License
Version 2.0, January 2004
Expand Down Expand Up @@ -4775,11 +4775,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI

--------------------------------------------------------------------------------
Dependency : go.opentelemetry.io/collector/pdata
Version: v1.21.0
Version: v1.22.0
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/collector/pdata@v1.21.0/LICENSE:
Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/collector/pdata@v1.22.0/LICENSE:


Apache License
Expand Down Expand Up @@ -5706,11 +5706,11 @@ THE SOFTWARE.

--------------------------------------------------------------------------------
Dependency : golang.org/x/net
Version: v0.32.0
Version: v0.33.0
Licence type (autodetected): BSD-3-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/golang.org/x/net@v0.32.0/LICENSE:
Contents of probable licence file $GOMODCACHE/golang.org/x/net@v0.33.0/LICENSE:

Copyright 2009 The Go Authors.

Expand Down Expand Up @@ -6066,11 +6066,11 @@ Contents of probable licence file $GOMODCACHE/google.golang.org/[email protected]/LIC

--------------------------------------------------------------------------------
Dependency : google.golang.org/protobuf
Version: v1.35.2
Version: v1.36.0
Licence type (autodetected): BSD-3-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/google.golang.org/protobuf@v1.35.2/LICENSE:
Contents of probable licence file $GOMODCACHE/google.golang.org/protobuf@v1.36.0/LICENSE:

Copyright (c) 2018 The Go Authors. All rights reserved.

Expand Down
3 changes: 2 additions & 1 deletion changelogs/8.15.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@ https://github.com/elastic/apm-server/compare/v8.14.3\...v8.15.0[View commits]

- Add `elasticsearch.flushed.uncompressed.bytes` metric {pull}13155[13155]
- APM Server now relies on the Elasticsearch apm-data plugin's index templates, removing the requirement to install the APM integration package {pull}12066[12066]
- Switch the default lifecycle management to leverage DSL instead of ILM, the change is executed as a part of Elasticsearch apm-data plugin migration {pull}12066[12066]
- Upgraded bundled APM Java agent attacher CLI to version 1.50.0 {pull}13326[13326]
- Enable Kibana curated UIs to work with hostmetrics from OpenTelemetry's https://pkg.go.dev/go.opentelemetry.io/collector/receiver/hostmetricsreceiver[hostmetricsreceiver] {pull}13196[13196]
- Add require data stream to bulk index requests {pull}13398[13398]
- Support self-instrumentation when in managed mode by getting tracing configs via reloader {pull}13514[13514] {pull}13653[13653] {pull}13691[13691] {pull}13790[13790]
- Add mapping for OpenTelemetry attribute `messaging.destination.name` to derive `service.target` correctly {pull}13472[13472]
- APM Server now automatically retries document-level 429s from Elasticsearch to avoid dropping data. `output.elasticsearch.max_retries` now controls both request-level and document-level retries, and defaults to `3`. {pull}13620[13620]
- APM Server now automatically retries document-level 429s from Elasticsearch to avoid dropping data. `output.elasticsearch.max_retries` now controls both request-level and document-level retries, and defaults to `3`. {pull}13620[13620]
27 changes: 27 additions & 0 deletions changelogs/8.16.asciidoc
Original file line number Diff line number Diff line change
@@ -1,9 +1,36 @@
[[apm-release-notes-8.16]]
== APM version 8.16

* <<apm-release-notes-8.16.2>>
* <<apm-release-notes-8.16.1>>
* <<apm-release-notes-8.16.0>>

[float]
[[apm-release-notes-8.16.2]]
=== APM version 8.16.2

https://github.com/elastic/apm-server/compare/v8.16.1\...v8.16.2[View commits]

[float]
==== Bug fixes

- Surface config parsing error under EA managed mode by logging and marking EA input unit as failed {pull}14574[14574]
- Remove unnecessary hot reload under EA managed mode when apm tracing config is nil {pull}14865[14865]

[float]
==== Breaking Changes

[float]
==== Deprecations

[float]
==== Intake API Changes

[float]
==== Added

- In this release we've introduced an image based on the hardened https://wolfi.dev/[Wolfi] image to provide additional security to our self-managed customers, and improve our supply chain security posture.

[float]
[[apm-release-notes-8.16.1]]
=== APM version 8.16.1
Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ require (
github.com/dustin/go-humanize v1.0.1
github.com/elastic/apm-aggregation v1.1.0
github.com/elastic/apm-data v1.14.4
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20241213104605-93b018a83621
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20241216091513-d508a408b0e9
github.com/elastic/elastic-agent-client/v7 v7.17.0
github.com/elastic/elastic-agent-libs v0.17.5
github.com/elastic/elastic-agent-system-metrics v0.11.5
github.com/elastic/gmux v0.3.2
github.com/elastic/go-docappender/v2 v2.3.2
github.com/elastic/go-elasticsearch/v8 v8.16.0
github.com/elastic/go-elasticsearch/v8 v8.17.0
github.com/elastic/go-sysinfo v1.15.0
github.com/elastic/go-ucfg v0.8.8
github.com/go-sourcemap/sourcemap v2.1.4+incompatible
Expand All @@ -41,19 +41,19 @@ require (
go.elastic.co/apm/module/apmotel/v2 v2.6.2
go.elastic.co/apm/v2 v2.6.2
go.elastic.co/fastjson v1.4.0
go.opentelemetry.io/collector/pdata v1.21.0
go.opentelemetry.io/collector/pdata v1.22.0
go.opentelemetry.io/otel v1.33.0
go.opentelemetry.io/otel/metric v1.33.0
go.opentelemetry.io/otel/sdk/metric v1.33.0
go.uber.org/automaxprocs v1.6.0
go.uber.org/zap v1.27.0
go.uber.org/zap/exp v0.3.0
golang.org/x/net v0.32.0
golang.org/x/net v0.33.0
golang.org/x/sync v0.10.0
golang.org/x/term v0.27.0
golang.org/x/time v0.8.0
google.golang.org/grpc v1.69.0
google.golang.org/protobuf v1.35.2
google.golang.org/protobuf v1.36.0
gopkg.in/yaml.v3 v3.0.1
)

Expand Down
20 changes: 10 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ github.com/elastic/apm-aggregation v1.1.0 h1:eTHGd5w99JoRFJ763MJP6nUX4hkkeSil3KW
github.com/elastic/apm-aggregation v1.1.0/go.mod h1:YBQ77Jt7vOy2/7w4q5SsEifhc0V02dJxRcyyeC6HsvQ=
github.com/elastic/apm-data v1.14.4 h1:Q84GljGLbPEnUCcF7i/CWFx6Ey1Rx+ffvSUyEy/k0R4=
github.com/elastic/apm-data v1.14.4/go.mod h1:MctdMZ5LBx07m0TjJTdh80nU2ef6ABcoyJWg1E14/kg=
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20241213104605-93b018a83621 h1:1fcMJDnMDx25sAQM7+YC5DeS+ovVWRkjWAUgR04pjDE=
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20241213104605-93b018a83621/go.mod h1:JZIuztvKeiuHUM8zvfQ24wz6nJPPOM1DVqu9FHu9a0Q=
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20241216091513-d508a408b0e9 h1:A+n1lfJyAxMQwWHq1nOkOMHk3rMOxFqgtbijT1Uh0aM=
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20241216091513-d508a408b0e9/go.mod h1:JZIuztvKeiuHUM8zvfQ24wz6nJPPOM1DVqu9FHu9a0Q=
github.com/elastic/elastic-agent-autodiscover v0.9.0 h1:+iWIKh0u3e8I+CJa3FfWe9h0JojNasPgYIA47gpuuns=
github.com/elastic/elastic-agent-autodiscover v0.9.0/go.mod h1:5iUxLHhVdaGSWYTveSwfJEY4RqPXTG13LPiFoxcpFd4=
github.com/elastic/elastic-agent-client/v7 v7.17.0 h1:TPLrEHF4kJ3RkmQzZPffrniY4WeW4vriHZbOAzM1hFo=
Expand All @@ -152,8 +152,8 @@ github.com/elastic/gmux v0.3.2 h1:cb721R+fe/rt/jVNyBP5HDQsEwLD2wSKfPD2Sk6adDk=
github.com/elastic/gmux v0.3.2/go.mod h1:OD6oYrno+SV3pyl1ArdWCjlExZ+FJOfoSaFqnFeldBQ=
github.com/elastic/go-docappender/v2 v2.3.2 h1:FJhYgq2DpCaxGaZUquc75dauEzWTWOyWUESAA/h8SPY=
github.com/elastic/go-docappender/v2 v2.3.2/go.mod h1:5URybRUfmexRMtM/lwvcIRLje3Gsrj15qiiLm41gDrc=
github.com/elastic/go-elasticsearch/v8 v8.16.0 h1:f7bR+iBz8GTAVhwyFO3hm4ixsz2eMaEy0QroYnXV3jE=
github.com/elastic/go-elasticsearch/v8 v8.16.0/go.mod h1:lGMlgKIbYoRvay3xWBeKahAiJOgmFDsjZC39nmO3H64=
github.com/elastic/go-elasticsearch/v8 v8.17.0 h1:e9cWksE/Fr7urDRmGPGp47Nsp4/mvNOrU8As1l2HQQ0=
github.com/elastic/go-elasticsearch/v8 v8.17.0/go.mod h1:lGMlgKIbYoRvay3xWBeKahAiJOgmFDsjZC39nmO3H64=
github.com/elastic/go-lumber v0.1.2-0.20220819171948-335fde24ea0f h1:TsPpU5EAwlt7YZoupKlxZ093qTZYdGou3EhfTF1U0B4=
github.com/elastic/go-lumber v0.1.2-0.20220819171948-335fde24ea0f/go.mod h1:HHaWnZamYKWsR9/eZNHqRHob8iQDKnchHmmskT/SKko=
github.com/elastic/go-structform v0.0.10 h1:oy08o/Ih2hHTkNcRY/1HhaYvIp5z6t8si8gnCJPDo1w=
Expand Down Expand Up @@ -453,8 +453,8 @@ go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJyS
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
go.opentelemetry.io/collector/consumer v1.21.0 h1:THKZ2Vbi6GkamjTBI2hFq5Dc4kINZTWGwQNa8d/Ty9g=
go.opentelemetry.io/collector/consumer v1.21.0/go.mod h1:FQcC4ThMtRYY41dv+IPNK8POLLhAFY3r1YR5fuP7iiY=
go.opentelemetry.io/collector/pdata v1.21.0 h1:PG+UbiFMJ35X/WcAR7Rf/PWmWtRdW0aHlOidsR6c5MA=
go.opentelemetry.io/collector/pdata v1.21.0/go.mod h1:GKb1/zocKJMvxKbS+sl0W85lxhYBTFJ6h6I1tphVyDU=
go.opentelemetry.io/collector/pdata v1.22.0 h1:3yhjL46NLdTMoP8rkkcE9B0pzjf2973crn0KKhX5UrI=
go.opentelemetry.io/collector/pdata v1.22.0/go.mod h1:nLLf6uDg8Kn5g3WNZwGyu8+kf77SwOqQvMTb5AXEbEY=
go.opentelemetry.io/collector/semconv v0.115.0 h1:SoqMvg4ZEB3mz2EdAb6XYa+TuMo5Mir5FRBr3nVFUDY=
go.opentelemetry.io/collector/semconv v0.115.0/go.mod h1:N6XE8Q0JKgBN2fAhkUQtqK9LT7rEGR6+Wu/Rtbal1iI=
go.opentelemetry.io/otel v1.33.0 h1:/FerN9bax5LoK51X/sI0SVYrjSE0/yUL7DpxW4K3FWw=
Expand Down Expand Up @@ -522,8 +522,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI=
golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs=
golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs=
golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
Expand Down Expand Up @@ -612,8 +612,8 @@ google.golang.org/grpc v1.69.0 h1:quSiOM1GJPmPH5XtU+BCoVXcDVJJAzNcoyfC2cCjGkI=
google.golang.org/grpc v1.69.0/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4=
google.golang.org/grpc/examples v0.0.0-20231016154744-cb430bed4d27 h1:EB/3dtnYKOItaNPpOI/HmOCGbVZUiXcstRfiuxN+cFg=
google.golang.org/grpc/examples v0.0.0-20231016154744-cb430bed4d27/go.mod h1:Crtq1t+mykyL5d6PR3z8zCxKx/Qjq/mlPWDPoWJANYA=
google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io=
google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
google.golang.org/protobuf v1.36.0 h1:mjIs9gYtt56AzC4ZaffQuh88TZurBGhIJMBZGSxNerQ=
google.golang.org/protobuf v1.36.0/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
2 changes: 1 addition & 1 deletion packaging/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RUN sed -i 's/localhost:9200/elasticsearch:9200/' apm-server.yml
# Build stage 1
# Copy prepared files from the previous stage and complete the image.
################################################################################
FROM registry.access.redhat.com/ubi9/ubi-micro:latest@sha256:a410623c2b8e9429f9606af821be0231fef2372bd0f5f853fbe9743a0ddf7b34
FROM registry.access.redhat.com/ubi9/ubi-micro:latest@sha256:a22fffe0256af00176c8b4f22eec5d8ecb1cb1684d811c33b1f2832fd573260f
ARG TARGETARCH
ARG BUILD_DATE
ARG VERSION
Expand Down
12 changes: 6 additions & 6 deletions systemtest/approvals/TestRUMXForwardedFor.approved.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"5.5.0"
],
"client.geo.city_name": [
"Perth"
"dynamic"
],
"client.geo.continent_name": [
"Oceania"
Expand All @@ -28,10 +28,10 @@
"dynamic"
],
"client.geo.region_iso_code": [
"AU-WA"
"dynamic"
],
"client.geo.region_name": [
"Western Australia"
"dynamic"
],
"client.ip": [
"220.244.41.16"
Expand Down Expand Up @@ -132,7 +132,7 @@
"5.5.0"
],
"client.geo.city_name": [
"Perth"
"dynamic"
],
"client.geo.continent_name": [
"Oceania"
Expand All @@ -147,10 +147,10 @@
"dynamic"
],
"client.geo.region_iso_code": [
"AU-WA"
"dynamic"
],
"client.geo.region_name": [
"Western Australia"
"dynamic"
],
"client.ip": [
"220.244.41.16"
Expand Down
12 changes: 12 additions & 0 deletions systemtest/benchtest/expvar/expvar.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ type expvar struct {
LibbeatStats
ElasticResponseStats
OTLPResponseStats
TailSamplingStats

// UncompressedBytes holds the number of bytes of uncompressed
// data that the server has read from the Elastic APM events
Expand Down Expand Up @@ -72,6 +73,11 @@ type LibbeatStats struct {
RSSMemoryBytes int64 `json:"beat.memstats.rss"`
}

type TailSamplingStats struct {
TBSLsmSize int64 `json:"apm-server.sampling.tail.storage.lsm_size"`
TBSVlogSize int64 `json:"apm-server.sampling.tail.storage.value_log_size"`
}

func queryExpvar(ctx context.Context, out *expvar, srv string) error {
req, err := http.NewRequest("GET", srv+"/debug/vars", nil)
if err != nil {
Expand Down Expand Up @@ -113,6 +119,7 @@ func queryExpvar(ctx context.Context, out *expvar, srv string) error {
aggregateResponseStats(s.ElasticResponseStats, &result.ElasticResponseStats)
aggregateOTLPResponseStats(s.OTLPResponseStats, &result.OTLPResponseStats)
aggregateLibbeatStats(s.LibbeatStats, &result.LibbeatStats)
aggregateTailSamplingStats(s.TailSamplingStats, &result.TailSamplingStats)
result.UncompressedBytes += s.UncompressedBytes
result.AvailableBulkRequests += s.AvailableBulkRequests
}
Expand Down Expand Up @@ -205,3 +212,8 @@ func aggregateOTLPResponseStats(from OTLPResponseStats, to *OTLPResponseStats) {
to.ErrorOTLPTracesResponses += from.ErrorOTLPTracesResponses
to.ErrorOTLPMetricsResponses += from.ErrorOTLPMetricsResponses
}

func aggregateTailSamplingStats(from TailSamplingStats, to *TailSamplingStats) {
to.TBSLsmSize += from.TBSLsmSize
to.TBSVlogSize += from.TBSVlogSize
}
4 changes: 4 additions & 0 deletions systemtest/benchtest/expvar/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ const (
ErrorElasticResponses
ErrorOTLPTracesResponses
ErrorOTLPMetricsResponses
TBSLsmSize
TBSVlogSize
)

type AggregateStats struct {
Expand Down Expand Up @@ -164,6 +166,8 @@ func (c *Collector) accumulate(e expvar) {
c.processMetric(MemBytes, int64(e.TotalAlloc))
c.processMetric(HeapAlloc, int64(e.HeapAlloc))
c.processMetric(HeapObjects, int64(e.HeapObjects))
c.processMetric(TBSLsmSize, e.TBSLsmSize)
c.processMetric(TBSVlogSize, e.TBSVlogSize)
}

func (c *Collector) processMetric(m Metric, val int64) {
Expand Down
2 changes: 2 additions & 0 deletions systemtest/benchtest/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ func addExpvarMetrics(result *testing.BenchmarkResult, collector *expvar.Collect
result.Extra["max_heap_alloc"] = float64(collector.Get(expvar.HeapAlloc).Max)
result.Extra["max_heap_objects"] = float64(collector.Get(expvar.HeapObjects).Max)
result.Extra["mean_available_indexers"] = float64(collector.Get(expvar.AvailableBulkRequests).Mean)
result.Extra["tbs_lsm_size"] = float64(collector.Get(expvar.TBSLsmSize).Max)
result.Extra["tbs_vlog_size"] = float64(collector.Get(expvar.TBSVlogSize).Max)
}

// Record the number of error responses returned by the server: lower is better.
Expand Down
4 changes: 4 additions & 0 deletions systemtest/benchtest/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ func TestAddExpvarMetrics(t *testing.T) {
`"apm-server.processor.span.transformations": 5`,
`"apm-server.processor.metric.transformations": 9`,
`"apm-server.processor.error.transformations": 3`,
`"apm-server.sampling.tail.storage.lsm_size": 10`,
`"apm-server.sampling.tail.storage.value_log_size": 11`,
`"beat.runtime.goroutines": 4`,
`"beat.memstats.rss": 1048576`,
`"output.elasticsearch.bulk_requests.available": 0`,
Expand All @@ -165,6 +167,8 @@ func TestAddExpvarMetrics(t *testing.T) {
"max_heap_objects": 102,
"mean_available_indexers": 0,
"error_responses/sec": 1,
"tbs_lsm_size": 10,
"tbs_vlog_size": 11,
},
},
}
Expand Down
Loading

0 comments on commit 5e58610

Please sign in to comment.