Skip to content

[FSSDK-11463] C# - Add SDK Multi-Region Support for Data Hosting #383

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

esrakartalOpt
Copy link

Summary

  • Add Multi-Region Support for Data Hosting

Test plan

  • Created and added new test cases

Issues

@esrakartalOpt esrakartalOpt requested a review from Copilot August 12, 2025 18:32
Copilot

This comment was marked as outdated.

@esrakartalOpt esrakartalOpt requested a review from Copilot August 12, 2025 19:57
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds multi-region support for data hosting in the Optimizely C# SDK, allowing event dispatching to region-specific endpoints (US and EU) rather than hardcoding the US endpoint.

Key changes:

  • Added Region property to ProjectConfig interface and implementation
  • Replaced hardcoded US event endpoint with configurable region-specific endpoints
  • Updated event factories to use region-based endpoint selection with US as fallback

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
OptimizelySDK/ProjectConfig.cs Added Region property to ProjectConfig interface
OptimizelySDK/Config/DatafileProjectConfig.cs Implemented Region property and cleaned up string formatting
OptimizelySDK/Event/EventFactory.cs Added region-specific endpoint mapping and selection logic
OptimizelySDK/Event/Entity/EventContext.cs Added Region property to EventContext with builder pattern support
OptimizelySDK/Event/UserEventFactory.cs Updated to include region in event context creation
OptimizelySDK/Event/Builder/EventBuilder.cs Updated deprecated builder to use new region-aware endpoints
OptimizelySDK.Tests/OptimizelyTest.cs Updated test to use new endpoint reference
OptimizelySDK.Tests/EventTests/TestForwardingEventDispatcher.cs Updated test assertion to use new endpoint reference
OptimizelySDK.Tests/EventTests/EventFactoryTest.cs Added comprehensive tests for EU and invalid region handling, updated existing tests
OptimizelySDK.Tests/EventTests/EventBuilderTest.cs Updated all test assertions to use new endpoint references

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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