Skip to content

feat: split EvaluationTrace into reason + error_code#319

Draft
fabriziodemaria wants to merge 6 commits intomainfrom
feat/split-evaluation-trace-reason-error
Draft

feat: split EvaluationTrace into reason + error_code#319
fabriziodemaria wants to merge 6 commits intomainfrom
feat/split-evaluation-trace-reason-error

Conversation

@fabriziodemaria
Copy link
Member

@fabriziodemaria fabriziodemaria commented Mar 19, 2026

Summary

Aligns the Java SDK telemetry with the updated proto: splits evaluation tracking into separate reason and error_code fields for finer-grained metrics.

  • Telemetry class: tracks EvaluationReason + EvaluationErrorCode per evaluation
  • Confidence: wires evaluation tracking into getEvaluation and getEvaluationFuture
  • Proto: updated telemetry.proto with EvaluationErrorCode enum and EVALUATION_REASON_ARCHIVED

Related PRs

Test plan

  • Updated ConfidenceIntegrationTest and FeatureProviderTest

- Added MetricAnnotation message for custom metrics.
- Extended EnumValueOptions to include metric annotations.
- Refactored LibraryTraces to support multiple trace types: RequestTrace and EvaluationTrace.
- Updated telemetry methods to track evaluation reasons and error codes.
- Modified tests to validate new trace structures and metrics.
@fabriziodemaria fabriziodemaria changed the title feat: split EvaluationTrace into reason + error_code (OpenFeature-aligned) feat: split EvaluationTrace into reason + error_code Mar 19, 2026
Added tracking of evaluation reasons to the telemetry client in the ConfidenceFeatureProvider. This change ensures that the reason for flag resolution is logged, improving visibility into feature flag evaluations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant