-
Notifications
You must be signed in to change notification settings - Fork 6
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
Niko/dotnet new template #554
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for eppo-data-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Looks great overall.
Mostly just nits. Thanks Niko!
|
||
The Eppo .NET SDK enables feature flags and experiments in your .NET applications with only a few lines of code. | ||
|
||
The SDK handles all the complexity of feature flag evaluation and experiment assignment locally in your application, with no network calls required after initial setup. This guide will walk you through installing the SDK and implementing your first feature flag, experiment, and contextual bandit. |
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.
This SDK is primarily a server SDK and will poll for updated configuration every 30sec (configurable), so there are actually continuous network calls.
| `GetStringAssignment()` | String | | ||
| `GetBooleanAssignment()` | Boolean | | ||
| `GetJSONAssignment()` | JSON object | | ||
| `GetIntegerAssignment()` | Integer | |
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.
Returns a long
| `GetBooleanAssignment()` | Boolean | | ||
| `GetJSONAssignment()` | JSON object | | ||
| `GetIntegerAssignment()` | Integer | | ||
| `GetNumericAssignment()` | Float | |
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.
nit: returns a Double
|
||
For bandits, you'll need both an assignment logger and a bandit logger: | ||
|
||
```csharp |
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.
Segment Bandit Logger example here:
https://github.com/Eppo-exp/dot-net-server-sdk?tab=readme-ov-file#assignment-and-bandit-action-logger
["pricingTier"] = "1" | ||
}; | ||
|
||
var actions = new Dictionary<string, IDictionary<string, object?>>() |
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.
We have a helper class, ContextAttributes
which makes this typing a little simpler. Check out
https://github.com/Eppo-exp/dot-net-server-sdk/blob/89f65bb5779a7293beff878534381dcc871b03cd/dot-net-sdk/EppoClient.cs#L334
var defaultAssignment = new Dictionary<string, object> | ||
{ | ||
["hero"] = false, | ||
["heroImage"] = "placeholder.png", | ||
["heroTitle"] = "Placeholder Hero Title", | ||
["heroDescription"] = "Placeholder Hero Description" | ||
}; |
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.
var defaultAssignment = new Dictionary<string, object> | |
{ | |
["hero"] = false, | |
["heroImage"] = "placeholder.png", | |
["heroTitle"] = "Placeholder Hero Title", | |
["heroDescription"] = "Placeholder Hero Description" | |
}; | |
var defaultAssignment = (JObject)(new Dictionary<string, object> | |
{ | |
["hero"] = false, | |
["heroImage"] = "placeholder.png", | |
["heroTitle"] = "Placeholder Hero Title", | |
["heroDescription"] = "Placeholder Hero Description" | |
}); |
## Usage with Contextual Multi-Armed Bandits | ||
|
||
Eppo also supports contextual multi-armed bandits. You can read more about them in the [high-level documentation](/contextual-bandits). | ||
Bandit flag configuration--including setting up the flag key, status quo variation, bandit variation, and targeting rules--are configured within |
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.
I think an emdash is the correct punctuation here
ex:
Bandit flag configuration — including setting up the flag key
["pricingTier"] = "1" | ||
}; | ||
|
||
var actions = new Dictionary<string, IDictionary<string, object?>>() |
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.
Again, consider using the ContextAttributes
class here
|
||
### `GetBanditAction` Overloads | ||
|
||
There are several overloads of the `GetBanditAction()` method available: |
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.
Can link to the source code for full examples of using the convenient overloads
The action context contains contextual information about each action. They can be provided as a mapping of attribute names | ||
to their contexts. | ||
|
||
Similar to subject context, action contexts can be provided as `IDictionary<string, object?>`--which will then assume anything that is a number is a numeric |
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.
emdash here as well
(there are some markdown post-processors which can convert --
to a proper emdash, which is maybe what you're doing here, but it doesn't look like netlify is doing such post processing)
What?
Breaking out the Dotnet docs into the multipage template we use for Javascript.
Why?
Todo before merge