1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-05-31 01:16:01 +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",
UnleashApi = new Uri("<YOUR_API_URL>"),
SendMetricsInterval = TimeSpan.FromSeconds(5),
SendMetricsInterval = TimeSpan.FromSeconds(1),
CustomHttpHeaders = new Dictionary<string, string>()
{
{"Authorization","<YOUR_API_TOKEN>"}

View File

@ -17,7 +17,7 @@ func init() {
unleash.WithAppName("unleash-onboarding-golang"),
unleash.WithUrl("<YOUR_API_URL>"),
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")
.unleashAPI("<YOUR_API_URL>")
.apiKey("<YOUR_API_TOKEN>")
.sendMetricsInterval(5)
.sendMetricsInterval(1)
.build();
Unleash unleash = new DefaultUnleash(config);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -26,7 +26,7 @@ enum Flags {
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
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(
"<YOUR_API_URL>",
"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 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(
"<YOUR_API_URL>",
"unleash-onboarding-rust",

View File

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

View File

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

View File

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

View File

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