Skip to content

Commit

Permalink
Merge branch 'main' into apmbench-add-trace-only
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonip authored Feb 3, 2025
2 parents 38ade5e + 9ccfae6 commit 70a9ee6
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
with:
role-duration-seconds: 21600 # 6 hours

- uses: google-github-actions/get-secretmanager-secrets@e5bb06c2ca53b244f978d33348d18317a7f263ce # v2.2.2
- uses: google-github-actions/get-secretmanager-secrets@a8440875e1c2892062aef9061228d4f1af8f919b # v2.2.3
with:
export_to_environment: true
secrets: |-
Expand Down Expand Up @@ -257,7 +257,7 @@ jobs:
# there is a high chance things will stop working
# This is trying to reduce the chances of that happening.
# See https://github.com/elastic/observability-test-environments/actions/workflows/cluster-rotate-api-keys.yml
- uses: google-github-actions/get-secretmanager-secrets@e5bb06c2ca53b244f978d33348d18317a7f263ce # v2.2.2
- uses: google-github-actions/get-secretmanager-secrets@a8440875e1c2892062aef9061228d4f1af8f919b # v2.2.3
if: always()
with:
export_to_environment: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/functional-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

- uses: elastic/oblt-actions/google/auth@v1

- uses: google-github-actions/get-secretmanager-secrets@e5bb06c2ca53b244f978d33348d18317a7f263ce # v2.2.2
- uses: google-github-actions/get-secretmanager-secrets@a8440875e1c2892062aef9061228d4f1af8f919b # v2.2.3
with:
export_to_environment: true
secrets: |-
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/smoke-tests-ess.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:

- uses: elastic/oblt-actions/google/auth@v1

- uses: google-github-actions/get-secretmanager-secrets@e5bb06c2ca53b244f978d33348d18317a7f263ce # v2.2.2
- uses: google-github-actions/get-secretmanager-secrets@a8440875e1c2892062aef9061228d4f1af8f919b # v2.2.3
with:
export_to_environment: true
secrets: |-
Expand All @@ -81,7 +81,7 @@ jobs:
# there is a high chance things will stop working
# This is trying to reduce the chances of that happening.
# See https://github.com/elastic/observability-test-environments/actions/workflows/cluster-rotate-api-keys.yml
- uses: google-github-actions/get-secretmanager-secrets@e5bb06c2ca53b244f978d33348d18317a7f263ce # v2.2.2
- uses: google-github-actions/get-secretmanager-secrets@a8440875e1c2892062aef9061228d4f1af8f919b # v2.2.3
if: always()
with:
export_to_environment: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoke-tests-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:

- uses: elastic/oblt-actions/google/auth@v1

- uses: google-github-actions/get-secretmanager-secrets@e5bb06c2ca53b244f978d33348d18317a7f263ce # v2.2.2
- uses: google-github-actions/get-secretmanager-secrets@a8440875e1c2892062aef9061228d4f1af8f919b # v2.2.3
with:
export_to_environment: true
secrets: |-
Expand Down
2 changes: 1 addition & 1 deletion changelogs/9.0.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ https://github.com/elastic/apm-server/compare/v\...v9.0.0[View commits]

[float]
==== Breaking Changes
- Change `sampling.tail.storage_limit` default to `0`. While `0` means unlimited local tail-sampling database size, it now enforces a max 90% disk usage on the disk where the data directory is located. Any tail sampling writes after this threshold will be rejected, similar to what happens when tail-sampling database size exceeds a non-0 storage limit. Setting `sampling.tail.storage_limit` to non-0 maintains the existing behavior which limits the tail-sampling database size to `sampling.tail.storage_limit` and does not have the new disk usage threshold check. {pull}15467[15467]
- Change `sampling.tail.storage_limit` default to `0`. While `0` means unlimited local tail-sampling database size, it now enforces a max 80% disk usage on the disk where the data directory is located. Any tail sampling writes after this threshold will be rejected, similar to what happens when tail-sampling database size exceeds a non-0 storage limit. Setting `sampling.tail.storage_limit` to non-0 maintains the existing behavior which limits the tail-sampling database size to `sampling.tail.storage_limit` and does not have the new disk usage threshold check. {pull}15467[15467] {pull}15524[15524]

[float]
==== Deprecations
Expand Down
5 changes: 3 additions & 2 deletions changelogs/all-breaking-changes.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ The following breaking changes are introduced in APM version 9.0.0:

- Change `sampling.tail.storage_limit` default to `0`.
While `0` means unlimited local tail-sampling database size,
it now enforces a max 90% disk usage on the disk where the data directory is located.
it now enforces a max 80% disk usage on the disk where the data directory is located.
Any tail sampling writes after this threshold will be rejected,
similar to what happens when tail-sampling database size exceeds a non-0 storage limit.
Setting `sampling.tail.storage_limit` to non-0 maintains the existing behavior
which limits the tail-sampling database size to `sampling.tail.storage_limit`
and does not have the new disk usage threshold check.
For more details, see https://github.com/elastic/apm-server/pull/15467[PR #15467]
For more details, see https://github.com/elastic/apm-server/pull/15467[PR #15467] and
https://github.com/elastic/apm-server/pull/15524[PR #15524]
// end::90-bc[]

// tag::811-bc[]
Expand Down
2 changes: 1 addition & 1 deletion internal/beater/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ func TestUnpackConfig(t *testing.T) {
IngestRateDecayFactor: 0.25,
StorageLimit: "0",
StorageLimitParsed: 0,
DiskUsageThreshold: 0.9,
DiskUsageThreshold: 0.8,
TTL: 30 * time.Minute,
},
},
Expand Down
2 changes: 1 addition & 1 deletion internal/beater/config/sampling.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func defaultTailSamplingConfig() TailSamplingConfig {
IngestRateDecayFactor: 0.25,
TTL: 30 * time.Minute,
StorageLimit: "0",
DiskUsageThreshold: 0.9,
DiskUsageThreshold: 0.8,
DiscardOnWriteFailure: false,
}
parsed, err := humanize.ParseBytes(cfg.StorageLimit)
Expand Down
2 changes: 1 addition & 1 deletion x-pack/apm-server/sampling/eventstorage/storage_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ func (sm *StorageManager) NewReadWriter(storageLimit uint64, diskUsageThreshold
return uint64(float64(sm.cachedDiskStat.total.Load()) * diskUsageThreshold)
}
// the total disk space could change in runtime, but it is still useful to print it out in logs.
sm.logger.Infof("setting disk usage threshold to %.2f of total disk space of %0.1fgb", diskUsageThreshold, float64(sm.cachedDiskStat.total.Load())/gb)
sm.logger.Infof("setting disk usage threshold to %.0f%% of total disk space of %0.1fgb", diskUsageThreshold*100, float64(sm.cachedDiskStat.total.Load())/gb)
diskThresholdChecker := NewStorageLimitCheckerFunc(sm.diskUsed, diskThreshold)
rw = NewStorageLimitReadWriter(
fmt.Sprintf("disk usage threshold %.2f", diskUsageThreshold),
Expand Down

0 comments on commit 70a9ee6

Please sign in to comment.