OpenFeature: Add context attributes to frontend settings (#112105)
* Update targeting key to namespace * Pass eval ctx attributes to frontend * Add context config to the frontend * Fix OF namespace not defined in e2e tests * Set default namespace and targeting key * remove e2e server config now that namespace is default --------- Co-authored-by: joshhunt <josh.hunt@grafana.com>
This commit is contained in:
@@ -259,6 +259,8 @@ export class GrafanaBootConfig {
|
||||
listDashboardScopesEndpoint = '';
|
||||
listScopesEndpoint = '';
|
||||
|
||||
openFeatureContext: Record<string, unknown> = {};
|
||||
|
||||
constructor(
|
||||
options: BootData['settings'] & {
|
||||
bootData: BootData;
|
||||
|
||||
@@ -24,7 +24,7 @@ export async function initOpenFeature() {
|
||||
|
||||
await OpenFeature.setProviderAndWait(ofProvider, {
|
||||
targetingKey: config.namespace,
|
||||
namespace: config.namespace,
|
||||
...config.openFeatureContext,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user