Default symbol_database.enabled to dynamic_instrumentation.enabled#5828
Default symbol_database.enabled to dynamic_instrumentation.enabled#5828p-datadog wants to merge 3 commits into
Conversation
|
Thank you for updating Change log entry section 👏 Visited at: 2026-05-28 00:18:30 UTC |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c297bba664
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| o.type :bool | ||
| o.env 'DD_SYMBOL_DATABASE_UPLOAD_ENABLED' | ||
| o.default false | ||
| o.default true |
There was a problem hiding this comment.
Gate symbol database uploads on active DI
With this default enabled, an app that sets DD_DYNAMIC_INSTRUMENTATION_ENABLED=true will advertise and accept LIVE_DEBUGGING_SYMBOL_DB remote configs by default even in contexts where DI::Component.build later refuses to start, such as Rails development mode or when the DI C extension is unavailable. SymbolDatabase::Component.build only checks its own setting, remote config, and MRI/Ruby version, so opening the DI UI in those cases can still trigger ObjectSpace symbol extraction and upload even though Dynamic Instrumentation is disabled. Please keep this default tied to the actual DI component/environment gate, not just the DI setting.
Useful? React with 👍 / 👎.
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 9554612 | Docs | Datadog PR Page | Give us feedback! |
Replaces the unconditional `true` default with a block that reads `Datadog.configuration.dynamic_instrumentation.enabled` at access time. The default is evaluated lazily on first `get`, so env vars and explicit assignment continue to take precedence via the existing chain. Spec asserts both branches (DI on → symdb default true, DI off → symdb default false) and verifies the env var still wins over the derived default. Docs updated to describe the conditional default. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Typing analysisNote: Ignored files are excluded from the next sections.
|
The DI Settings module is extended lazily by lib/datadog/di.rb (via Datadog::DI::Extensions.activate!) and is not always loaded before symbol_database's default fires. CI hit `NoMethodError: undefined method 'dynamic_instrumentation' for ... Settings` when a Settings instance was constructed without DI's extension active. Default now returns false in that scenario (no DI loaded → no symdb), which preserves the intended "symdb tracks DI" semantics. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
BenchmarksBenchmark execution time: 2026-05-28 00:48:17 Comparing candidate commit 9554612 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 45 metrics, 1 unstable metrics.
|
Summary
Makes
symbol_database.enableddefault to the value ofdynamic_instrumentation.enabledinstead of a fixed boolean.DD_SYMBOL_DATABASE_UPLOAD_ENABLEDor explicitc.symbol_database.enabled = …continue to override via the existing precedence chainThis replaces the unconditional
truedefault that #5818 was reverted to. The config DSL'so.default { … }block is evaluated lazily on firstget(seeDatadog::Core::Configuration::Option#default_value), so the value is taken from whatever DI is configured to at the timesymbol_database.enabledis first read — which in practice isComponent.build, after userDatadog.configureblocks and env vars have been applied.Precedent for this pattern:
lib/datadog/tracing/contrib/redis/configuration/settings.rband several other contrib settings use the sameo.default do … endshape.Changes
lib/datadog/symbol_database/configuration.rb: replaceo.default truewitho.default { Datadog.configuration.dynamic_instrumentation.enabled }; update the comment block.spec/datadog/symbol_database/configuration_spec.rb: drop the env-unset row from the env-var table (its value now depends on DI, which the env table doesn't model). Add a dedicated context that asserts both branches and that the env var still wins.docs/GettingStarted.md: default column now reads "TracksDD_DYNAMIC_INSTRUMENTATION_ENABLED" / "Tracksc.dynamic_instrumentation.enabled".Change log entry
Yes. Dynamic Instrumentation: Symbol Database upload now defaults to the value of
dynamic_instrumentation.enabledinstead of a fixed default; setDD_SYMBOL_DATABASE_UPLOAD_ENABLEDto override.Test plan
bundle exec rspec spec/datadog/symbol_database/— 331 examples, 0 failures