Skip to content

Default symbol_database.enabled to dynamic_instrumentation.enabled#5828

Draft
p-datadog wants to merge 3 commits into
masterfrom
revert-5818-claude/symdb-default-off
Draft

Default symbol_database.enabled to dynamic_instrumentation.enabled#5828
p-datadog wants to merge 3 commits into
masterfrom
revert-5818-claude/symdb-default-off

Conversation

@p-datadog
Copy link
Copy Markdown
Member

@p-datadog p-datadog commented May 27, 2026

Summary

Makes symbol_database.enabled default to the value of dynamic_instrumentation.enabled instead of a fixed boolean.

  • DI on, env unset → symbol database upload is on by default
  • DI off, env unset → symbol database upload is off by default
  • DD_SYMBOL_DATABASE_UPLOAD_ENABLED or explicit c.symbol_database.enabled = … continue to override via the existing precedence chain

This replaces the unconditional true default that #5818 was reverted to. The config DSL's o.default { … } block is evaluated lazily on first get (see Datadog::Core::Configuration::Option#default_value), so the value is taken from whatever DI is configured to at the time symbol_database.enabled is first read — which in practice is Component.build, after user Datadog.configure blocks and env vars have been applied.

Precedent for this pattern: lib/datadog/tracing/contrib/redis/configuration/settings.rb and several other contrib settings use the same o.default do … end shape.

Changes

  • lib/datadog/symbol_database/configuration.rb: replace o.default true with o.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 "Tracks DD_DYNAMIC_INSTRUMENTATION_ENABLED" / "Tracks c.dynamic_instrumentation.enabled".

Change log entry

Yes. Dynamic Instrumentation: Symbol Database upload now defaults to the value of dynamic_instrumentation.enabled instead of a fixed default; set DD_SYMBOL_DATABASE_UPLOAD_ENABLED to override.

Test plan

  • bundle exec rspec spec/datadog/symbol_database/ — 331 examples, 0 failures

@p-datadog p-datadog requested review from a team as code owners May 27, 2026 23:58
@p-datadog p-datadog marked this pull request as draft May 27, 2026 23:58
@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented May 27, 2026

Thank you for updating Change log entry section 👏

Visited at: 2026-05-28 00:18:30 UTC

@dd-octo-sts dd-octo-sts Bot added the debugger Live Debugger (+Dynamic Instrumentation, +Symbol Database) label May 27, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@datadog-official
Copy link
Copy Markdown

datadog-official Bot commented May 28, 2026

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 97.09% (-0.02%)

This comment will be updated automatically if new data arrives.
🔗 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>
@p-datadog p-datadog changed the title Revert "Default DD_SYMBOL_DATABASE_UPLOAD_ENABLED to false" Default symbol_database.enabled to dynamic_instrumentation.enabled May 28, 2026
@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented May 28, 2026

Typing analysis

Note: Ignored files are excluded from the next sections.

steep:ignore comments

This PR introduces 1 steep:ignore comment, and clears 1 steep:ignore comment.

steep:ignore comments (+1-1)Introduced:
lib/datadog/symbol_database/configuration.rb:31
Cleared:
lib/datadog/symbol_database/configuration.rb:29

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>
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented May 28, 2026

Benchmarks

Benchmark execution time: 2026-05-28 00:48:17

Comparing candidate commit 9554612 in PR branch revert-5818-claude/symdb-default-off with baseline commit 36b96ce in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 45 metrics, 1 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

debugger Live Debugger (+Dynamic Instrumentation, +Symbol Database)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants