- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
",t};e.buildCustomizationMenuUi=t;function n(e){let t='
",t}function s(e){let n=e.filter.currentValue||e.filter.defaultValue,t='${e.filter.label}
`,e.filter.options.forEach(s=>{let o=s.id===n;t+=``}),t+="${e.filter.label}
`,t+=`Datadog feature flags offer a powerful, integrated way to manage feature delivery, with built-in observability and seamless integration across the platform.
Real-time metrics: Understand who’s receiving each variant, as well as how your flag impacts the health & performance of your application—all in real time.
Supports any data type: Use Booleans, strings, numbers or full JSON objects—whatever your use case requires.
Built for experimentation: Target specific audiences for A/B tests, roll out features gradually with canary releases, and automatically roll back when regressions are detected.
OpenFeature compatible: Built on the OpenFeature standard, ensuring compatibility with existing OpenFeature implementations and providing a vendor-neutral approach to feature flag management.
Your organization likely already has pre-configured environments for Development, Staging, and Production. If you need to configure these or any other environments, navigate to the Environments page to create tag queries for each environment. You can also identify which environment should be considered a Production environment.
First, install @datadog/openfeature-browser
and @openfeature/web-sdk
as dependencies in your project:
yarn add @datadog/openfeature-browser@preview @openfeature/web-sdk
Then, add the following to your project to initialize the SDK:
import { DatadogProvider } from '@datadog/openfeature-browser';
import { OpenFeature } from '@openfeature/web-sdk';
// Initialize the provider
const provider = new DatadogProvider({
clientToken: '<CLIENT_TOKEN>',
applicationId: '<APPLICATION_ID>',
enableExposureLogging: true,
site: 'datadoghq.com',
env: '<YOUR_ENV>', // Same environment normally passed to the RUM SDK
service: '<SERVICE_NAME>',
version: '1.0.0',
});
// Set the provider
await OpenFeature.setProviderAndWait(provider);
More information about OpenFeature SDK configuration options can be found in its documentation. For more information on creating client tokens and application IDs, see API and Application Keys.
Use the feature flags creation UI to bootstrap your first feature flag. By default, the flag is disabled in all environments.
In your application code, use the SDK to evaluate the flag and gate the new feature.
import { OpenFeature } from '@openfeature/web-sdk';
const client = OpenFeature.getClient();
// If applicable, set relevant attributes on the client's global context
// (e.g. org id, user email)
await OpenFeature.setContext({
org: { id: 2 },
user: { id: 'user-123', email: 'user@example.com' },
targetingKey: 'user-123',
});
// This is what the SDK returns if the flag is disabled in
// the current environment
const fallback = false;
const showFeature = await client.getBooleanValue('show-new-feature', fallback);
if (showFeature) {
// Feature code here
}
After you’ve completed this step, redeploy the application to pick up these changes. Additional usage examples can be found in the SDK’s documentation.
Now that the application is ready to check the value of your flag, you can start adding targeting rules. Targeting rules enable you to define where or to whom to serve different variants of your feature.
Go to Feature Flags, select your flag, then find the Targeting Rules & Rollouts section. Select the environment whose rules you want to modify, and click Edit Targeting Rules.
After saving changes to the targeting rules, publish those rules by enabling your flag in the environment of your choice.
In the Targeting Rules & Rollouts section, toggle your selected environment to Enabled.
The flag serves your targeting rules in this environment. You can continue to edit these targeting rules to control where the variants are served.
Monitor the feature rollout from the feature flag details page, which provides real-time exposure tracking and metrics such as error rate and page load time. As you incrementally release the feature with the flag, view the Real-Time Metric Overview panel in the Datadog UI to see how the feature impacts application performance.
추가 유용한 문서, 링크 및 기사: