Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/github.com/elastic/go-…
Browse files Browse the repository at this point in the history
…elasticsearch/v8-8.17.0
  • Loading branch information
kruskall authored Dec 20, 2024
2 parents 28ba058 + 8d40b5e commit 37de1b3
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ 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 }}
TF_VAR_apm_server_tail_sampling_storage_limit: ${{ inputs.tailSamplingStorageLimit }}
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 }}
Expand Down
4 changes: 2 additions & 2 deletions NOTICE.txt
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ require (
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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
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
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
3 changes: 3 additions & 0 deletions systemtest/rum_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ func TestRUMXForwardedFor(t *testing.T) {
"source.port",
// Do not assert the exact contents of the location field since they may change
// slightly depending on the IP lookup.
"client.geo.city_name",
"client.geo.location",
"client.geo.region_iso_code",
"client.geo.region_name",
)
}

Expand Down

0 comments on commit 37de1b3

Please sign in to comment.