-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add Java Feature Flags Setup Documentation #33194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
- Add comprehensive Java SDK onboarding guide - Include installation instructions for Maven and Gradle - Document OpenFeature provider initialization and usage - Add code examples for all flag types (boolean, string, int, double, object) - Document error handling and common error codes - Include best practices and troubleshooting guide - Add Java to feature flags setup page navigation - Document integration with Datadog APM and exposure tracking Related: FFE Server SDK code freeze preparation
…ocumentation
Critical fixes:
- Add missing dd-java-agent-feature-flagging-bootstrap dependency to all examples
- Add Building from Source section with detailed instructions
- Explain bootstrap module purpose (classloader communication)
- Add troubleshooting for ClassNotFoundException
Improvements to match Java APM documentation patterns:
- Add application server configuration tabs (Spring Boot, Tomcat, JBoss, Jetty, Docker)
- Update all code examples to use SLF4J logger instead of System.out/err
- Add Compatibility requirements section
- Add Getting started section
- Update initialization example to show complete application structure
Code quality:
- Use logger.info/warn/error throughout with parameterized messages
- Show proper exception handling with logger
- Match actual implementation in ffe-dogfooding repo
- Include named client usage ("my-app")
The documentation now accurately reflects the required dependencies,
follows established Datadog docs patterns, and provides complete
setup instructions for the development build.
Preview links (active after the
|
Changes: - Add cross-linking to Configuration section from early warning - Add OpenFeature SDK to compatibility requirements (it is required) - Remove all local build instructions (only reference published X.X.X versions) - Add skip guidance for users with existing agent/remote-config setup - Clarify ProviderNotReadyError is OpenFeature exception (optional handling) - Update exception handling to be optional based on availability requirements - Note that not catching exception may prevent application startup Improvements: - Users with existing APM can skip to provider initialization - Users with existing remote-config can skip agent configuration - Clear guidance on when exception handling is optional vs required - Removed all references to building from source
…aring Changes: - Add PROVIDER_ERROR and PROVIDER_STALE event listeners to async init example - Note that PROVIDER_CONFIGURATION_CHANGED is optional (depends on provider support) - Update multiple clients section: "organize context and flags" (not just flags) - Clarify that Provider instance is shared globally (client names are organizational only) The Provider constructor doesn't take a name parameter - it's a single shared instance. Named clients are just for organizing your application code, not separate providers.
Changes: - Update all flag keys to use dot notation (matching Android/iOS): * new-checkout-flow -> checkout.new * ui-theme -> ui.theme * payment-api-endpoint -> payment.api.endpoint * max-retries -> retries.max * discount-rate -> pricing.discount.rate * feature-config -> ui.config * All other flags updated to dot notation - Standardize attribute to use "tier" consistently (not "plan") - Remove "country" attribute from basic example to match mobile simplicity This creates consistency across all SDK documentation and makes it easier for users to migrate between platforms or reference examples.
|
Opened DOCS-12847 to follow up with editorial review. |
leoromanovsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very thorough! I'm going to reference this structure in the golang one, thank you
| {{% /tab %}} | ||
| {{< /tabs >}} | ||
|
|
||
| <div class="alert alert-warning"><strong>Important:</strong> Feature flagging requires both <code>DD_REMOTE_CONFIG_ENABLED=true</code> and <code>DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED=true</code>. Without the experimental flag, the feature flagging system does not start.</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please say what the impact will be so readers understand - i.e. your flags will evaluate to programmatic defaults
| {{< /code-block >}} | ||
|
|
||
| ### 3. Create context once | ||
| Create the evaluation context once per request/user/session and reuse it for all flag evaluations: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not doing this will incur additional cost
| Feature flags automatically integrate with Datadog APM: | ||
|
|
||
| - **Trace Correlation**: Flag evaluations are automatically correlated with APM traces | ||
| - **Performance Impact**: Track how feature flags affect application performance | ||
| - **Error Tracking**: See which flags were active when errors occurred |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 not yet
What does this PR do? What is the motivation?
Adds comprehensive Java Feature Flags setup documentation to support the upcoming release of Feature Flags for Java in
dd-trace-javavX.X.XThis PR fixes critical documentation gaps discovered while dogfooding the Java implementation:
Improvements to Match Patterns:
/tracing/trace_collection/automatic_instrumentation/dd_libraries/java.md)System.out/errClassNotFoundExceptionNew Content:
Merge instructions
Merge readiness:
Dependencies:
dd-trace-javav1.57.0+ with Feature Flags supportAdditional notes
Testing: All code examples verified against working implementation in
DataDog/ffe-dogfooding/apps/javaRelated Work:
DataDog/ffe-dogfooding(apps/java)DataDog/dd-trace-java(products/feature-flagging)