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:
parent
3ac2c17a8e
commit
32849b6322
@ -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>"}
|
||||
|
@ -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),
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
|
@ -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(() => {
|
||||
|
@ -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) {
|
||||
|
@ -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()
|
||||
|
@ -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',
|
||||
};
|
||||
|
||||
|
@ -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",
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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: [:])
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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,{' '}
|
||||
|
Loading…
Reference in New Issue
Block a user