-
Notifications
You must be signed in to change notification settings - Fork 204
Expand file tree
/
Copy pathconstants.ts
More file actions
46 lines (41 loc) · 1.12 KB
/
constants.ts
File metadata and controls
46 lines (41 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import type { Config, HttpConfig } from './types';
export const defaultApiHost = 'https://api.segment.io/v1/b';
export const settingsCDN = 'https://cdn-settings.segment.com/v1/projects';
export const defaultConfig: Config = {
writeKey: '',
maxBatchSize: 1000,
trackDeepLinks: false,
trackAppLifecycleEvents: false,
autoAddSegmentDestination: true,
useSegmentEndpoints: false,
};
export const defaultHttpConfig: HttpConfig = {
rateLimitConfig: {
enabled: true,
maxRetryCount: 100,
maxRetryInterval: 300,
maxRateLimitDuration: 43200,
},
backoffConfig: {
enabled: true,
maxRetryCount: 100,
baseBackoffInterval: 0.5,
maxBackoffInterval: 300,
maxTotalBackoffDuration: 43200,
jitterPercent: 10,
default4xxBehavior: 'drop',
default5xxBehavior: 'retry',
statusCodeOverrides: {
'408': 'retry',
'410': 'retry',
'429': 'retry',
'460': 'retry',
'501': 'drop',
'505': 'drop',
},
},
};
export const workspaceDestinationFilterKey = '';
export const defaultFlushAt = 20;
export const defaultFlushInterval = 30;
export const maxPendingEvents = 1000;