Skip to content

feat(unity): add event tracking - #51

Open
vahidlazio wants to merge 1 commit into
mainfrom
vahidt/unity-event-tracking
Open

feat(unity): add event tracking#51
vahidlazio wants to merge 1 commit into
mainfrom
vahidt/unity-event-tracking

Conversation

@vahidlazio

Copy link
Copy Markdown
Collaborator

Summary

  • Add Track method to IFeatureClient, IFeatureProvider, and ConfidenceProvider following the OpenFeature tracking specification
  • Buffer events (up to 100) and flush every 10s alongside flag applies, plus on pause/focus-loss/quit
  • Send events to events.confidence.dev/v1/events:publish as JSON, matching the PublishEventsRequest proto schema
  • Map OpenFeature tracking details to Confidence event format: trackingEventNameeventDefinitions/{name}, details.valuepayload["value"], details.data → merged into payload, evaluationContextpayload["context"]
  • Identical mapping as Go/JS/Python providers in confidence-resolver-rust

Test plan

  • 12 new unit tests for TrackingEventDetails and payload construction
  • All 175 tests pass (12 new + 163 existing)
  • Unity Editor build

🤖 Generated with Claude Code

Add Track method to IFeatureClient, IFeatureProvider, and
ConfidenceProvider matching the OpenFeature tracking specification
and the pattern used in Go/JS/Python providers in confidence-resolver-rust.

Events are buffered (up to 100) and flushed every 10s alongside flag
applies, as well as on pause/focus-loss/quit. Events are sent to
events.confidence.dev/v1/events:publish as JSON, matching the
PublishEventsRequest proto schema.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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