Add evaluation metrics section to Java feature flags docs#35970
Draft
Add evaluation metrics section to Java feature flags docs#35970
Conversation
Add comprehensive Unity Feature Flags documentation with two implementations: 1. unity.md - Direct FlagsClient API (current implementation) - Uses DdFlags.CreateClient() and direct FlagsClient methods - Synchronous flag evaluation (GetBooleanValue, GetStringValue, etc.) - Simpler API without async/await 2. unity-openfeature.md - OpenFeature integration (future/alternative) - Uses OpenFeature Api.Instance.GetClient() - Async flag evaluation methods - Standards-based approach Both pages: - Include cross-links to each other for easy navigation - Follow the structure of Android/iOS feature flags docs - Include installation, setup, evaluation, and advanced config sections - Add Unity card to feature flags client navigation The documentation is ready for preview and user feedback.
Replace full documentation with minimal placeholder pages to test CI: - Keep navigation links and cross-references - Add 'Documentation coming soon' message - Reduce from ~270 lines to ~28 lines each - Test if minimal changes pass all CI checks Full documentation will be added incrementally after CI validation.
…e docs Incremental update to unity-openfeature.md: - Add detailed Overview explaining OpenFeature integration - Add complete Installation instructions (EDM4U, Unity package, Android setup) - Add Initialize SDK section with reference to Unity Monitoring Setup - Add reference links at bottom File size: 27 → 68 lines (+41 lines)
Add back all sections to unity-openfeature.md: - Enable flags - Create and retrieve a client - Set the evaluation context - Evaluate flags (boolean, string, integer, double, object) - Flag evaluation details - Advanced configuration Also fixes duplicate further_reading partial and adds OpenFeature external link to further_reading frontmatter.
Add back all sections to unity.md: - Overview - Installation - Initialize the SDK - Enable flags - Create and retrieve a client - Set the evaluation context - Evaluate flags (boolean, string, integer, double, object) - Flag evaluation details - Advanced configuration
Feature flags are no longer in preview. Removed the callout from both unity.md and unity-openfeature.md to match the other SDK pages (android, ios, javascript, react).
…section - FlagsConfiguration is now immutable (constructor-based, not object initializer) - Add Getting Started quickstart section to unity.md - Fix DdFlags.Instance.CreateClient() throughout unity.md - Update parameter names to match constructor signatures (camelCase) - Add EvaluationFlushIntervalSeconds clamp range [1, 60] to both pages
- Revert FlagsConfiguration to object initializer syntax (mutable properties, PascalCase) - Restore DdFlags.SetEvaluationContext() as static method (not on client) - DdFlags.CreateClient() returns void; OpenFeature client retrieved via Api.Instance.GetClient() - Add Getting Started quickstart section - Restore correct advanced config property names (PascalCase)
- DdFlags is an instance class with immutable FlagsConfiguration (constructor syntax) - DdFlags.Instance.CreateProvider() returns provider for registration with OpenFeature - Provider registered via Api.Instance.SetProviderAsync(provider) - Evaluation context set via OpenFeature standard EvaluationContext.Builder() - No Datadog-specific context types or direct provider method calls - Rename "Create and retrieve a client" section to "Register the provider"
- Evaluation context set via client.SetEvaluationContext(FlagsEvaluationContext) not OpenFeature context builder
- DdFlags.Instance.CreateClient() returns FlagsClient (held for context setting); OpenFeature client retrieved separately via Api.Instance.GetClient()
- Show Unity coroutine pattern (WaitUntil) for async flag evaluation — MonoBehaviour does not support await
- Fix named provider registration: Api.Instance.SetProviderAsync("domain", provider)
- Add Getting Started as full MonoBehaviour example
- Remove unused openfeature.dev footnote
- Merge unity.md and unity-openfeature.md into one page, OpenFeature-first - Add aliases for old unity-openfeature URLs - Direct FlagsClient API moved to collapsed advanced section at the bottom - Drop FlagDetails documentation (FlagDetails<T> and FlagEvaluationError are now internal) - Flag evaluation details section uses OpenFeature FlagEvaluationDetails types only - Delete unity-openfeature.md and unity.md.bak
- new DatadogFeatureProvider(client) replaces DdFlags.Instance.CreateProvider() - DatadogFeatureProvider is in separate com.datadoghq.unity.flags.openfeature package - using Datadog.Unity.Flags.OpenFeature namespace required - DdFlags.Instance is always non-null (static readonly singleton) - CreateClient() returns IFlagsClient (public interface) - FlagDetails<T> and FlagEvaluationError are public — restore detail methods in direct API section - Installation section updated for two-package architecture and NuGetForUnity
- Remove all OpenFeature references and the openfeature package install steps - Follow iOS page structure: Enable → Create client → Set context → Evaluate → Advanced config - DdFlags.Enable() / DdFlags.Instance.CreateClient() / client.SetEvaluationContext() - Synchronous typed getters: GetBooleanValue, GetStringValue, GetIntegerValue, GetDoubleValue, GetObjectValue - FlagDetails<T> detail methods documented - FlagsConfiguration uses constructor syntax (immutable) - Backup of previous state at typo/unity-feature-flags-docs-openfeature-backup
- Remove /feature_flags/setup/unity/ alias (URL never existed) - Simplify Git URL installation step wording - ensure -> help ensure (Vale rule) - once the -> after the (Vale rule)
Documents the feature_flag.evaluations OTel counter metric added in dd-openfeature v1.61.0. Covers optional OTel SDK dependencies, OTLP endpoint configuration, and metric attribute reference. Also bumps dd-openfeature version references from 1.57.0 to 1.61.0.
Contributor
Preview links (active after the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do? What is the motivation?
Documents the
feature_flag.evaluationsOTel counter metric introduced indd-openfeaturev1.61.0 (DataDog/dd-trace-java#11040).feature_flag.evaluationsmetric attribute referencedd-openfeatureversion references from1.57.0to1.61.0Merge instructions
Merge readiness:
Additional notes
The parent
_index.mddescribesDD_METRICS_OTEL_ENABLED=trueas the activation mechanism for evaluation metrics across all server SDKs. The Java SDK uses classpath detection instead (OTel SDK deps on classpath enable metrics automatically). The parent page may need a follow-up note calling out this difference.