diff --git a/docs/client/Templates/_GettingStarted.mdx b/docs/client/Templates/_GettingStarted.mdx index 6359a41f3..5de3aff89 100644 --- a/docs/client/Templates/_GettingStarted.mdx +++ b/docs/client/Templates/_GettingStarted.mdx @@ -38,7 +38,7 @@ After installation, you will need to initialize the SDK using a Client SDK key f These Client SDK Keys are intended to be embedded in client side applications. If need be, you can invalidate or create new SDK Keys for other applications/SDK integrations. :::info -Do NOT embed your Server Secret Key in client-side applications, or expose it in any external-facing documents. However, if you do accidentally expose it, you can create a new one in the Statsig console. +Do NOT embed your Server Secret Key in client-side applications, or expose it in any external-facing documents. However, if you accidentally expose it, you can create a new one in the Statsig console. ::: In addition to the SDK key, you should also pass in a [StatsigUser](#statsig-user) for feature gate targeting and experimentation grouping purposes. diff --git a/docs/client/_client-sdk-template.mdx b/docs/client/_client-sdk-template.mdx index 0cf1e9847..59e6da42e 100644 --- a/docs/client/_client-sdk-template.mdx +++ b/docs/client/_client-sdk-template.mdx @@ -38,7 +38,7 @@ After installation, you will need to initialize the SDK using a Client SDK key f These Client SDK Keys are intended to be embedded in client side applications. If need be, you can invalidate or create new SDK Keys for other applications/SDK integrations. :::info -Do NOT embed your Server Secret Key in client-side applications, or expose it in any external-facing documents. However, if you do accidentally expose it, you can create a new one in the Statsig console. +Do NOT embed your Server Secret Key in client-side applications, or expose it in any external-facing documents. However, if you accidentally expose it, you can create a new one in the Statsig console. ::: In addition to the SDK key, you should also pass in a [Statsig user](#statsig-user) for feature gate targeting and experimentation grouping purposes. diff --git a/docs/dynamic-config/enforce-schema.md b/docs/dynamic-config/enforce-schema.md new file mode 100644 index 000000000..d96b159cd --- /dev/null +++ b/docs/dynamic-config/enforce-schema.md @@ -0,0 +1,33 @@ +--- +title: Using a schema +sidebar_label: Using a Schema +slug: /dynamic-config/enforce-schema +--- + +Dynamic configs support schemas using [JSON Schema](https://json-schema.org/learn/getting-started-step-by-step) syntax to enforce a common convention between the return values for each rule you'll set. + +:::info +Schemas are only enforced when editing dynamic configs through the console or API, and are not used at code runtime. +::: + +For example, if you have a dynamic config that returns settings for a site banner, you might have a schema of: +``` +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "title": { + "type": "string", + }, + "description": { + "type": "string", + }, + "cta": { + "type": "string", + } + }, + "required": ["title", "description", "cta"], +} +``` + +Now, each of your rules must return an object including title, description, and CTA. \ No newline at end of file diff --git a/docs/server/Templates/_GettingStarted.mdx b/docs/server/Templates/_GettingStarted.mdx index 3544351a2..80aef9718 100644 --- a/docs/server/Templates/_GettingStarted.mdx +++ b/docs/server/Templates/_GettingStarted.mdx @@ -32,7 +32,7 @@ To work with the SDK, you will need a Statsig account. If you don't yet have an After installation, you will need to initialize the SDK using a [Server Secret Key from the statsig console](https://console.statsig.com/api_keys). :::info -Do NOT embed your Server Secret Key in client-side applications, or expose it in any external-facing documents. However, if you do accidentally expose it, you can create a new one in the Statsig console. +Do NOT embed your Server Secret Key in client-side applications, or expose it in any external-facing documents. However, if you accidentally expose it, you can create a new one in the Statsig console. ::: <> diff --git a/docs/server/_server-sdk-template.mdx b/docs/server/_server-sdk-template.mdx index cf4d74bc9..a19ca4ec5 100644 --- a/docs/server/_server-sdk-template.mdx +++ b/docs/server/_server-sdk-template.mdx @@ -36,7 +36,7 @@ You could skip this for now, but you will need an SDK Key and some Feature Gates After installation, you will need to initialize the SDK using a [Server Secret Key from the statsig console](https://console.statsig.com/api_keys). :::info -Do NOT embed your Server Secret Key in client-side applications, or expose it in any external-facing documents. However, if you do accidentally expose it, you can create a new one in the Statsig console. +Do NOT embed your Server Secret Key in client-side applications, or expose it in any external-facing documents. However, if you accidentally expose it, you can create a new one in the Statsig console. ::: There is also an optional parameter `options` that allows you to pass in a [StatsigOptions](#statsig-options) to customize the SDK. diff --git "a/docs/stats-engine/methodologies/benjamini\342\200\223hochberg-procedure.md" "b/docs/stats-engine/methodologies/benjamini\342\200\223hochberg-procedure.md" index ae7a80bb4..c20ee0882 100644 --- "a/docs/stats-engine/methodologies/benjamini\342\200\223hochberg-procedure.md" +++ "b/docs/stats-engine/methodologies/benjamini\342\200\223hochberg-procedure.md" @@ -4,14 +4,14 @@ sidebar_label: Benjamini–Hochberg slug: /stats-engine/methodologies/benjamini–hochberg-procedure --- -## Coming soon +## What it is +The Benjamini-Hochberg procedure is a statistical method that reduces the probability of false positives by adjusting the significance level for multiple comparisons. It is not as extreme as a [Bonferroni Correction](https://docs.statsig.com/stats-engine/methodologies/bonferroni-correction), because instead of controlling the chance of at least one false positive (Family Wise Error Rate), this controls the expected value of false positives when the null hypothesis has been rejected (False Discovery Rate). -Currently in beta. Reach out in Slack if you're having it turned on for your company now. +Like with other analysis settings, you can configure this per experiment (or configure global Experiment Settings to default it). +![image](https://github.com/user-attachments/assets/c865494e-0ae4-489c-a416-45848b4d10bc) -## Methodology - -The Benjamini-Hochberg procedure is a statistical method that reduces the probability of false positives by adjusting the significance level for multiple comparisons. It is not as extreme as a [Bonferroni Correction](https://docs.statsig.com/stats-engine/methodologies/bonferroni-correction), because instead of controlling the chance of at least one false positive (Family Wise Error Rate), this controls the expected value of false positives when the null hypothesis has been rejected (False Discovery Rate). +## Methodology The significance level is calculated by sorting p-values in ascending order and comparing with the a threshold. Each p-value’s threshold is the desired False Discovery Rate divided by the number of comparisons being evaluated multiplied by what rank a p-value is in the ordered list. The largest threshold value which is higher than its corresponding p-value is our new significance level ($\alpha$). The Benjamini-Hochberg Correction can be applied based on: diff --git a/docusaurus.config.js b/docusaurus.config.js index 744b4071f..1223798db 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -345,6 +345,7 @@ module.exports = { [ require.resolve("@easyops-cn/docusaurus-search-local"), { + explicitSearchResultPath: true, hashed: true, indexBlog: false, indexDocs: true, diff --git a/sidebars.js b/sidebars.js index 3d21d4249..2059daab2 100644 --- a/sidebars.js +++ b/sidebars.js @@ -140,6 +140,7 @@ module.exports = { }, items: [ "dynamic-config/working-with", + "dynamic-config/enforce-schema", "dynamic-config/create-new", "dynamic-config/add-rule", ],