Repository navigation
Commit b5a08a7
Tighten tracer.metrics defaults to protect tight-heap JVMs (#11500)
Tighten tracer.metrics defaults to protect tight-heap JVMs
Cut the implicit TRACER_METRICS_MAX_PENDING default from 2048 (logical) to 128
on normal heap and to 64 at Xmx < 128 MB, and the implicit
TRACER_METRICS_MAX_AGGREGATES default from 2048 to 256 at tight heap.
Why
---
The metrics inbox is an MpscArrayQueue<SpanSnapshot> sized to
maxPending * LEGACY_BATCH_SIZE (64). With one ~120 B SpanSnapshot per slot,
the prior 131072-slot default pinned ~15 MB worst-case in-flight when the
aggregator stalled.
At Xmx <= ~128 MB the G1 survivor region is too small to absorb that
footprint -- observed catastrophically at Xmx 64 MB on spring-petclinic
where the inbox overflowed young gen and triggered To-space Exhausted →
Full GC storms (0 r/s in the worst case).
New defaults bound the worst-case in-flight footprint at ~1 MB on normal
heap and ~500 KB at tight heap, comfortably below typical survivor sizes
and large enough to absorb the sub-second consumer stalls we actually see
in practice (~0.8 s of buffer at 10 K spans/s on the normal-heap default).
Customers who explicitly configure TRACER_METRICS_MAX_PENDING are
unaffected; the LEGACY_BATCH_SIZE multiplier still applies to overrides.
Only the implicit defaults shrink.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sync tracer.metrics.max.pending metadata default to 128
The default cut from 2048 → 128 needs the matching entry in
metadata/supported-configurations.json so config-inversion tooling
and supported-configuration docs reflect the new value.
DD_TRACE_TRACER_METRICS_MAX_AGGREGATES is left at 2048: the normal-heap
default is unchanged. The metadata schema doesn't support heap-dependent
defaults, so the tight-heap branch (64 / 256) isn't representable; the
metadata reflects the normal-heap default that applies to the typical
customer (Xmx >= 128 MB).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
chore(metadata): bump DD_TRACE_TRACER_METRICS_MAX_PENDING version to B
Default changed from 2048 to 128; version field must be incremented
when the default value changes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Merge branch 'master' into dougqh/css-tight-heap-defaults
Merge branch 'master' into dougqh/css-tight-heap-defaults
Merge branch 'master' into dougqh/css-tight-heap-defaults
Co-authored-by: devflow.devflow-routing-intake <devflow.devflow-routing-intake@kubernetes.us1.ddbuild.io>1 parent 7b18b2e commit b5a08a7
2 files changed
Lines changed: 28 additions & 7 deletions
File tree
- internal-api/src/main/java/datadog/trace/api
- metadata
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2191 | 2191 | | |
2192 | 2192 | | |
2193 | 2193 | | |
2194 | | - | |
| 2194 | + | |
| 2195 | + | |
| 2196 | + | |
| 2197 | + | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
| 2202 | + | |
| 2203 | + | |
| 2204 | + | |
| 2205 | + | |
| 2206 | + | |
| 2207 | + | |
| 2208 | + | |
| 2209 | + | |
| 2210 | + | |
| 2211 | + | |
| 2212 | + | |
| 2213 | + | |
| 2214 | + | |
| 2215 | + | |
2195 | 2216 | | |
2196 | 2217 | | |
2197 | 2218 | | |
2198 | 2219 | | |
2199 | | - | |
2200 | | - | |
2201 | | - | |
| 2220 | + | |
| 2221 | + | |
2202 | 2222 | | |
2203 | 2223 | | |
2204 | 2224 | | |
2205 | 2225 | | |
2206 | 2226 | | |
2207 | 2227 | | |
2208 | 2228 | | |
2209 | | - | |
| 2229 | + | |
| 2230 | + | |
2210 | 2231 | | |
2211 | 2232 | | |
2212 | 2233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10915 | 10915 | | |
10916 | 10916 | | |
10917 | 10917 | | |
10918 | | - | |
| 10918 | + | |
10919 | 10919 | | |
10920 | | - | |
| 10920 | + | |
10921 | 10921 | | |
10922 | 10922 | | |
10923 | 10923 | | |
| |||
0 commit comments