1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-06-09 01:17:06 +02:00

chore: update metrics interval from 5 to 1 (#8331)

This commit is contained in:
Jaanus Sellin 2024-10-02 13:01:12 +03:00 committed by GitHub
parent 3ac2c17a8e
commit 32849b6322
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 15 additions and 15 deletions

View File

@ -18,7 +18,7 @@ public class Program
{ {
AppName = "unleash-onboarding-dotnet", AppName = "unleash-onboarding-dotnet",
UnleashApi = new Uri("<YOUR_API_URL>"), UnleashApi = new Uri("<YOUR_API_URL>"),
SendMetricsInterval = TimeSpan.FromSeconds(5), SendMetricsInterval = TimeSpan.FromSeconds(1),
CustomHttpHeaders = new Dictionary<string, string>() CustomHttpHeaders = new Dictionary<string, string>()
{ {
{"Authorization","<YOUR_API_TOKEN>"} {"Authorization","<YOUR_API_TOKEN>"}

View File

@ -17,7 +17,7 @@ func init() {
unleash.WithAppName("unleash-onboarding-golang"), unleash.WithAppName("unleash-onboarding-golang"),
unleash.WithUrl("<YOUR_API_URL>"), unleash.WithUrl("<YOUR_API_URL>"),
unleash.WithCustomHeaders(http.Header{"Authorization": {"<YOUR_API_TOKEN>"}}), unleash.WithCustomHeaders(http.Header{"Authorization": {"<YOUR_API_TOKEN>"}}),
unleash.WithMetricsInterval(5*time.Second), unleash.WithMetricsInterval(1*time.Second),
) )
} }

View File

@ -14,7 +14,7 @@ UnleashConfig config = UnleashConfig.builder()
.instanceId("unleash-onboarding-instance") .instanceId("unleash-onboarding-instance")
.unleashAPI("<YOUR_API_URL>") .unleashAPI("<YOUR_API_URL>")
.apiKey("<YOUR_API_TOKEN>") .apiKey("<YOUR_API_TOKEN>")
.sendMetricsInterval(5) .sendMetricsInterval(1)
.build(); .build();
Unleash unleash = new DefaultUnleash(config); Unleash unleash = new DefaultUnleash(config);

View File

@ -11,7 +11,7 @@ const unleash = new UnleashClient({
url: '<YOUR_API_URL>', url: '<YOUR_API_URL>',
clientKey: '<YOUR_API_TOKEN>', clientKey: '<YOUR_API_TOKEN>',
appName: 'unleash-onboarding-javascript', appName: 'unleash-onboarding-javascript',
refreshInterval: 5000, metricsInterval: 1000,
}); });
unleash.start(); unleash.start();

View File

@ -11,7 +11,7 @@ const unleash = initialize({
url: '<YOUR_API_URL>', url: '<YOUR_API_URL>',
appName: 'unleash-onboarding-node', appName: 'unleash-onboarding-node',
customHeaders: { Authorization: '<YOUR_API_TOKEN>' }, customHeaders: { Authorization: '<YOUR_API_TOKEN>' },
metricsInterval: 5000, metricsInterval: 1000,
}); });
setInterval(() => { setInterval(() => {

View File

@ -16,7 +16,7 @@ $unleash = UnleashBuilder::create()
->withAppUrl('<YOUR_API_URL>') ->withAppUrl('<YOUR_API_URL>')
->withHeader('Authorization', '<YOUR_API_TOKEN>') ->withHeader('Authorization', '<YOUR_API_TOKEN>')
->withInstanceId('unleash-onboarding-instance') ->withInstanceId('unleash-onboarding-instance')
->withMetricsInterval(5000) ->withMetricsInterval(1000)
->build(); ->build();
while (true) { while (true) {

View File

@ -11,7 +11,7 @@ import asyncio
client = UnleashClient( client = UnleashClient(
url="<YOUR_API_URL>", url="<YOUR_API_URL>",
app_name="unleash-onboarding-python", app_name="unleash-onboarding-python",
refresh_interval=5, metrics_interval=1,
custom_headers={'Authorization': '<YOUR_API_TOKEN>'}) custom_headers={'Authorization': '<YOUR_API_TOKEN>'})
client.initialize_client() client.initialize_client()

View File

@ -11,7 +11,7 @@ import { FlagProvider } from '@unleash/proxy-client-react';
const config = { const config = {
url: '<YOUR_API_URL>', url: '<YOUR_API_URL>',
clientKey: '<YOUR_API_TOKEN>', clientKey: '<YOUR_API_TOKEN>',
refreshInterval: 5, // In production use interval of >15s metricsInterval: 1, // In production use interval of >15s
appName: 'unleash-onboarding-react', appName: 'unleash-onboarding-react',
}; };

View File

@ -26,7 +26,7 @@ enum Flags {
#[tokio::main] #[tokio::main]
async fn main() -> Result<(), Box<dyn Error + Send + Sync>> { async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
let client: Client<Flags, reqwest::Client> = ClientBuilder::default() let client: Client<Flags, reqwest::Client> = ClientBuilder::default()
.interval(5000) // Polling & metrics interval - default 15000 (ms) .interval(1000) // Polling & metrics interval - default 15000 (ms)
.into_client( .into_client(
"<YOUR_API_URL>", "<YOUR_API_URL>",
"unleash-onboarding-rust", "unleash-onboarding-rust",
@ -55,7 +55,7 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
let api_token = env::var("UNLEASH_API_TOKEN").expect("UNLEASH_API_TOKEN environment variable not set"); let api_token = env::var("UNLEASH_API_TOKEN").expect("UNLEASH_API_TOKEN environment variable not set");
let client: Client<Flags, reqwest::Client> = ClientBuilder::default() let client: Client<Flags, reqwest::Client> = ClientBuilder::default()
.interval(5000) // Polling & metrics interval - default 15000 (ms) .interval(1000) // Polling & metrics interval - default 15000 (ms)
.into_client( .into_client(
"<YOUR_API_URL>", "<YOUR_API_URL>",
"unleash-onboarding-rust", "unleash-onboarding-rust",

View File

@ -12,7 +12,7 @@ npm install @unleash/proxy-client-svelte
url: '<YOUR_API_URL>', url: '<YOUR_API_URL>',
clientKey: '<YOUR_API_TOKEN>', clientKey: '<YOUR_API_TOKEN>',
appName: 'unleash-onboarding-svelte', appName: 'unleash-onboarding-svelte',
metricsInterval: 5, metricsInterval: 1,
}; };
</script> </script>

View File

@ -12,7 +12,7 @@ import UnleashProxyClientSwift
var unleash = UnleashProxyClientSwift.UnleashClient( var unleash = UnleashProxyClientSwift.UnleashClient(
unleashUrl: "<YOUR_API_URL>", unleashUrl: "<YOUR_API_URL>",
clientKey: "<YOUR_API_TOKEN>", clientKey: "<YOUR_API_TOKEN>",
refreshInterval: 15, refreshInterval: 5,
appName: "unleash-onboarding-swift", appName: "unleash-onboarding-swift",
context: [:]) context: [:])

View File

@ -12,7 +12,7 @@ npm install @unleash/proxy-client-vue
url: '<YOUR_API_URL>', url: '<YOUR_API_URL>',
clientKey: '<YOUR_API_TOKEN>', clientKey: '<YOUR_API_TOKEN>',
appName: 'unleash-onboarding-vue', appName: 'unleash-onboarding-vue',
metricsInterval: 5, metricsInterval: 1,
} }
</script> </script>

View File

@ -132,7 +132,7 @@ export const ProjectOnboarded = ({
<ActionBox> <ActionBox>
<TitleContainer> <TitleContainer>
<ColoredMenuBook /> <ColoredMenuBook />
Learn about unleash Learn about Unleash
</TitleContainer> </TitleContainer>
<Typography> <Typography>
Take a deep dive through our documentation,{' '} Take a deep dive through our documentation,{' '}