Ce produit n'est pas pris en charge par le site Datadog que vous avez sélectionné. ().
Cette page n'est pas encore disponible en français, sa traduction est en cours. Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.
Overview
Datadog Feature Flags for server-side applications allow you to remotely control feature availability, run experiments, and roll out new functionality with confidence. Server-side SDKs integrate with the Datadog APM tracer and use Remote Configuration to receive flag updates in real time.
This guide covers the common setup required for all server-side SDKs, including Agent configuration and application environment variables. Select your language or framework to view SDK-specific setup instructions:
Prerequisites
Before setting up server-side feature flags, ensure you have:
Datadog Agent 7.55 or later installed and running
Datadog API key configured
APM tracing enabled in your application
Remote Configuration enabled for your organization. Verify this in Organization Settings.
Agent configuration
Server-side feature flags use Remote Configuration to deliver flag configurations to your application. Enable Remote Configuration in your Datadog Agent by setting DD_REMOTE_CONFIGURATION_ENABLED=true or adding remote_configuration.enabled: true to your datadog.yaml.
The Agent polls Datadog for configuration updates at a configurable interval. This interval determines the average time between making a flag change in the UI and the change becoming available to your application.
Configure your application with the standard Datadog environment variables. These are common across all server-side SDKs:
# Required: Service identificationDD_SERVICE=<YOUR_SERVICE_NAME>
DD_ENV=<YOUR_ENVIRONMENT>
DD_VERSION=<YOUR_APP_VERSION>
# Agent connection (if not using default localhost:8126)DD_AGENT_HOST=localhost
DD_TRACE_AGENT_PORT=8126# Enable Remote Configuration in the tracerDD_REMOTE_CONFIG_ENABLED=true# Enable the feature flagging provider (required for most SDKs)DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED=true
The DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED=true environment variable is required to enable the feature flagging provider. Java also supports the system property -Ddd.experimental.flagging.provider.enabled=true, and Ruby and Node.js support code-based configuration as an alternative. See the SDK-specific documentation for details.
Context attribute requirements
Evaluation context attributes must be flat primitive values (strings, numbers, booleans). Nested objects and arrays are not supported and will cause exposure events to be silently dropped.
// These attributes will cause exposure events to be dropped
constevaluationContext={targetingKey:req.session?.userID,company:{id:req.session?.companyID},// nested object - NOT SUPPORTED
roles:['admin','user']// array - NOT SUPPORTED
};
Further reading
Documentation, liens et articles supplémentaires utiles: