Skip to content

add env var to configure ffe init time#6948

Merged
leoromanovsky merged 2 commits intomasterfrom
lr/ffe-init-timeout-env-var
Jan 29, 2026
Merged

add env var to configure ffe init time#6948
leoromanovsky merged 2 commits intomasterfrom
lr/ffe-init-timeout-env-var

Conversation

@leoromanovsky
Copy link
Copy Markdown
Contributor

@leoromanovsky leoromanovsky commented Nov 19, 2025

Motivation

Follow-up to the OpenFeature flagging provider feature. The provider was initially configurable only via the programmatic API. This PR adds environment variable support so users can enable and configure the flagging provider without code changes.

Changes

  • Add DD_FLAGGING_PROVIDER_ENABLED and DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED env vars to enable the flagging provider
  • Add DD_FLAGGING_PROVIDER_INITIALIZATION_TIMEOUT_MS and DD_EXPERIMENTAL_FLAGGING_PROVIDER_INITIALIZATION_TIMEOUT_MS env vars to configure initialization timeout
  • Update TypeScript definitions to document the env vars
  • Add tests for env var configuration

Decisions

  • Both experimental (DD_EXPERIMENTAL_*) and non-experimental (DD_*) env var names are supported for consistency with other configuration options
  • Experimental env vars take precedence when both are set
  • Programmatic config values override env vars (standard behavior)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 19, 2025

Overall package size

Self size: 4.46 MB
Deduped: 5.3 MB
No deduping: 5.3 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 2.0.3 | 76.87 kB | 808.03 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 19, 2025

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.16%. Comparing base (7b864e2) to head (9f0ba3a).
⚠️ Report is 18 commits behind head on master.

Files with missing lines Patch % Lines
packages/dd-trace/src/config/index.js 80.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6948   +/-   ##
=======================================
  Coverage   86.16%   86.16%           
=======================================
  Files         515      515           
  Lines       22234    22249   +15     
=======================================
+ Hits        19157    19171   +14     
- Misses       3077     3078    +1     
Flag Coverage Δ
aiguard-macos 99.09% <ø> (ø)
aiguard-ubuntu 99.09% <ø> (ø)
aiguard-windows 99.09% <ø> (ø)
apm-capabilities-tracing-macos 57.84% <80.00%> (-0.05%) ⬇️
apm-capabilities-tracing-ubuntu 57.83% <80.00%> (-0.05%) ⬇️
apm-capabilities-tracing-windows 57.45% <80.00%> (-0.05%) ⬇️
apm-integrations-child-process 99.19% <ø> (ø)
apm-integrations-couchbase-18 100.00% <ø> (ø)
apm-integrations-couchbase-eol 100.00% <ø> (ø)
appsec-express 62.54% <ø> (+0.08%) ⬆️
appsec-fastify 58.55% <ø> (+0.07%) ⬆️
appsec-graphql 53.40% <ø> (-0.02%) ⬇️
appsec-kafka 43.98% <ø> (ø)
appsec-ldapjs 46.04% <ø> (ø)
appsec-lodash 47.29% <ø> (ø)
appsec-macos 93.76% <ø> (+0.02%) ⬆️
appsec-mongodb-core 51.82% <ø> (ø)
appsec-mongoose 50.73% <ø> (ø)
appsec-mysql 54.16% <ø> (-0.05%) ⬇️
appsec-node-serialize 43.92% <ø> (ø)
appsec-passport 48.07% <ø> (-0.04%) ⬇️
appsec-postgres 54.51% <ø> (-0.05%) ⬇️
appsec-sourcing 33.80% <ø> (ø)
appsec-template 43.92% <ø> (ø)
appsec-ubuntu 93.76% <ø> (+0.02%) ⬆️
appsec-windows 93.76% <ø> (+0.02%) ⬆️
llmobs-ai 52.09% <ø> (ø)
llmobs-anthropic 42.73% <ø> (ø)
llmobs-bedrock 40.06% <ø> (ø)
llmobs-google-genai 45.89% <ø> (ø)
llmobs-langchain 50.15% <ø> (ø)
llmobs-openai 55.62% <ø> (ø)
llmobs-vertex-ai 44.48% <ø> (ø)
platform-core 87.23% <ø> (ø)
platform-instrumentations-misc 89.16% <ø> (+0.57%) ⬆️
platform-shimmer 98.80% <ø> (-0.02%) ⬇️
platform-unit-guardrails 89.47% <ø> (ø)
profiling-macos 70.74% <ø> (ø)
profiling-ubuntu 70.74% <ø> (ø)
profiling-windows 74.20% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Nov 19, 2025

Benchmarks

Benchmark execution time: 2026-01-29 14:46:27

Comparing candidate commit 9f0ba3a in PR branch lr/ffe-init-timeout-env-var with baseline commit 7b864e2 in branch master.

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

Add environment variable support for:
- DD_FLAGGING_PROVIDER_ENABLED / DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED
- DD_FLAGGING_PROVIDER_INITIALIZATION_TIMEOUT_MS / DD_EXPERIMENTAL_FLAGGING_PROVIDER_INITIALIZATION_TIMEOUT_MS
@leoromanovsky leoromanovsky force-pushed the lr/ffe-init-timeout-env-var branch from 06d5c11 to 76a0e6c Compare January 27, 2026 15:14
@leoromanovsky leoromanovsky marked this pull request as ready for review January 27, 2026 16:29
@leoromanovsky leoromanovsky requested review from a team as code owners January 27, 2026 16:29
@leoromanovsky leoromanovsky requested review from BridgeAR and removed request for a team January 27, 2026 16:29
Copy link
Copy Markdown
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

LGTM in case we use a single env.
I do not know how stable things are, so I would also be fine to use the non experimental name. While it is a new case for me and I would have to look up what rules we define for us about that (if we have some).

…ovider

Remove support for non-experimental env vars (DD_FLAGGING_PROVIDER_ENABLED
and DD_FLAGGING_PROVIDER_INITIALIZATION_TIMEOUT_MS) to align with other
Datadog tracers (Go, Python, Ruby, Java, .NET) which only support the
DD_EXPERIMENTAL_* variants.
@leoromanovsky
Copy link
Copy Markdown
Contributor Author

Even though we are going to go GA soon, because all other trace libraries are currently configured as experimental and I think our customers are well served by having configurable env var which is their canonical method of injecting configuration, I'd like to proceed with keeping the experimental label. We will remove it all together across the tracer fleet at a medium-term later date:

  ┌────────┬────────────────────────────────────────────────┐
  │ Tracer │                    Env Var                     │
  ├────────┼────────────────────────────────────────────────┤
  │ Go     │ DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED only │
  ├────────┼────────────────────────────────────────────────┤
  │ Python │ DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED only │
  ├────────┼────────────────────────────────────────────────┤
  │ Ruby   │ DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED only │
  ├────────┼────────────────────────────────────────────────┤
  │ Java   │ DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED only │
  ├────────┼────────────────────────────────────────────────┤
  │ .NET   │ DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED only │
  └────────┴────────────────────────────────────────────────┘

@datadog-datadog-prod-us1

This comment has been minimized.

@leoromanovsky leoromanovsky merged commit 7b348ca into master Jan 29, 2026
784 checks passed
@leoromanovsky leoromanovsky deleted the lr/ffe-init-timeout-env-var branch January 29, 2026 15:18
dd-octo-sts bot pushed a commit that referenced this pull request Jan 29, 2026
* feat(openfeature): add env vars for flagging provider configuration

Add environment variable support for:
- DD_FLAGGING_PROVIDER_ENABLED / DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED
- DD_FLAGGING_PROVIDER_INITIALIZATION_TIMEOUT_MS / DD_EXPERIMENTAL_FLAGGING_PROVIDER_INITIALIZATION_TIMEOUT_MS

* fix(openfeature): use only DD_EXPERIMENTAL_* env vars for flagging provider

Remove support for non-experimental env vars (DD_FLAGGING_PROVIDER_ENABLED
and DD_FLAGGING_PROVIDER_INITIALIZATION_TIMEOUT_MS) to align with other
Datadog tracers (Go, Python, Ruby, Java, .NET) which only support the
DD_EXPERIMENTAL_* variants.
@dd-octo-sts dd-octo-sts bot mentioned this pull request Jan 29, 2026
BridgeAR pushed a commit that referenced this pull request Jan 30, 2026
* feat(openfeature): add env vars for flagging provider configuration

Add environment variable support for:
- DD_FLAGGING_PROVIDER_ENABLED / DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED
- DD_FLAGGING_PROVIDER_INITIALIZATION_TIMEOUT_MS / DD_EXPERIMENTAL_FLAGGING_PROVIDER_INITIALIZATION_TIMEOUT_MS

* fix(openfeature): use only DD_EXPERIMENTAL_* env vars for flagging provider

Remove support for non-experimental env vars (DD_FLAGGING_PROVIDER_ENABLED
and DD_FLAGGING_PROVIDER_INITIALIZATION_TIMEOUT_MS) to align with other
Datadog tracers (Go, Python, Ruby, Java, .NET) which only support the
DD_EXPERIMENTAL_* variants.
BridgeAR pushed a commit that referenced this pull request Feb 22, 2026
* feat(openfeature): add env vars for flagging provider configuration

Add environment variable support for:
- DD_FLAGGING_PROVIDER_ENABLED / DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED
- DD_FLAGGING_PROVIDER_INITIALIZATION_TIMEOUT_MS / DD_EXPERIMENTAL_FLAGGING_PROVIDER_INITIALIZATION_TIMEOUT_MS

* fix(openfeature): use only DD_EXPERIMENTAL_* env vars for flagging provider

Remove support for non-experimental env vars (DD_FLAGGING_PROVIDER_ENABLED
and DD_FLAGGING_PROVIDER_INITIALIZATION_TIMEOUT_MS) to align with other
Datadog tracers (Go, Python, Ruby, Java, .NET) which only support the
DD_EXPERIMENTAL_* variants.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants