-
Notifications
You must be signed in to change notification settings - Fork 26
/
config.yaml
264 lines (251 loc) · 9.96 KB
/
config.yaml
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
## config.yaml provides a default set of configuration options
## service author included in the /info response
author: "Optimizely Inc."
## name of the running application included in the /info response
name: "optimizely"
## version of the application included in the /info response and startup logs
## Defaults to the latest git tag `git describe --tags`
#version: custom-build
## list of SDK keys to be pre-fetched during startup (recommended for production)
#sdkkeys:
# - <sdk-key-1>
# - <sdk-key-2>
##
## log: logger configuration
##
log:
## log level used to filter logs of lesser severity (from highest to lowest):
## panic, fatal, error, warn, info, debug
level: info
## enable pretty colorized console logging. setting to false will output
## structured JSON logs. Recommended false in production.
pretty: true
## to set whether or not the SDK key is included in the logging output.
includeSdkKey: true
##
## tracing: tracing configuration
##
## For distributed tracing, trace context should be sent on "traceparent" header
## The value set in HTTP Header must be a hex compliant with the W3C trace-context specification.
## See more at https://www.w3.org/TR/trace-context/#trace-id
tracing:
## bydefault tracing is disabled
## to enable tracing set enabled to true
enabled: false
# opentelemetry tracing configuration
opentelemetry:
## bydefault stdout exporter is enabled
## to enable remote exporter set default as "remote"
default: "stdout"
## tracing service name
serviceName: "optimizely-agent"
## tracing environment name
## example: for production environment env can be set as "prod"
env: "dev"
## tracing service configuration
services:
## stdout exporter configuration
stdout:
## for stdout tracing data is saved in the specified file
filename: "trace.out"
## remote exporter configuration
remote:
## remote collector endpoint
endpoint: "localhost:4317"
## supported protocols are "http" and "grpc"
protocol: "grpc"
## "sampleRate" refers to the rate at which traces are collected and recorded.
## sampleRate >= 1 will always sample.
## sampleRate < 0 are treated as zero i.e. never sample.
sampleRate: 1.0
##
## http server configuration
##
server:
## List of allowed request host values.
## Requests whose host value does not match either the configured server.host, or one of these, will be rejected
## with a 404 response.
## To match all subdomains, you can use a leading dot (for example .example.com matches my.example.com, hello.world.example.com, etc.).
## You can use the value "." to disable allowed host checking, allowing requests with any host.
## Request host is determined in the following priority order:
## 1. X-Forwarded-Host header value
## 2. Forwarded header host= directive value
## 3. Host property of request (see Host under https://golang.org/pkg/net/http/#Request)
## Note: don't include port in these hosts values - port is stripped from the request host before comparing against these.
allowedHosts:
- localhost
## the maximum duration for reading the entire request, including the body.
## Value can be set in seconds (e.g. "5s") or milliseconds (e.g. "5000ms")
readTimeout: 5s
## the maximum duration before timing out writes of the response.
## Value can be set in seconds (e.g. "5s") or milliseconds (e.g. "5000ms")
writeTimeout: 10s
## path for the health status api
healthCheckPath: "/health"
## the location of the TLS key file
# keyFile: <key-file>
## the location of the TLS certificate file
# certFile: <cert-file>
## IP of the host
host: "127.0.0.1"
## configure optional Agent interceptors
# interceptors:
# httplog: {}
##
## api service configuration
##
api:
## the maximum number of concurrent requests handled by the api listener
# maxConns: 10000
## http listener port
port: "8080"
## set to true to enable subscribing to notifications via an SSE event-stream
enableNotifications: false
## set to true to be able to override experiment bucketing. (recommended false in production)
enableOverrides: true
## CORS support is provided via chi middleware
## https://github.com/go-chi/cors
# cors:
# ## If allowedOrigins is nil or empty, value is set to ["*"].
# allowedOrigins: ["*"]
# ## If allowedMethods is nil or empty, value is set to (HEAD, GET and POST).
# allowedMethods:
# - "HEAD"
# - "GET"
# - "POST"
# - "OPTIONS"
# ## Default value is [] but "Origin" is always appended to the list.
# allowedHeaders: ["*"]
# exposedHeaders: []
# allowedCredentials: false
# maxAge: 300
##
## admin service configuration
##
admin:
## http listener port
port: "8088"
## metrics package to use
## supported packages are expvar and prometheus
## default is expvar
metricsType: ""
##
## webhook service receives update notifications to your Optimizely project. Receipt of the webhook will
## trigger an immediate download of the datafile from the CDN
##
webhook:
## http listener port
port: "8089"
# ## a map of Optimizely Projects to one or more SDK keys
# projects:
# ## <project-id>: Optimizely project id as an integer
# <project-id>:
# ## sdkKeys: a list of SDKs linked to this project
# sdkKeys:
# - <sdk-key-1>
# - <sdk-key-1>
# ## secret: webhook secret used the validate the notification
# secret: <secret-10000>
# ## skipSignatureCheck: override the signature check (not recommended for production)
# skipSignatureCheck: true
##
## optimizely client configurations (options passed to the underlying go-sdk)
##
client:
## the time between successive polls for updated project configuration
pollingInterval: 1m
## the number of events in a batch
batchSize: 10
## the max number of events pending dispatch, setting this too low may result in events being dropped
queueSize: 1000
## the maximum time between events being dispatched
flushInterval: 30s
## Template URL for SDK datafile location. The template should specify a "%s" token for SDK key substitution.
## For secure environments, the datafileURLTemplate should be set to "https://config.optimizely.com/datafiles/auth/%s.json"
datafileURLTemplate: "https://cdn.optimizely.com/datafiles/%s.json"
## URL for dispatching events.
eventURL: "https://logx.optimizely.com/v1/events"
## Validation Regex on the request SDK Key
## By default Agent assumes only alphanumeric characters as part of the SDK Key string.
## https://github.com/google/re2/wiki/Syntax
sdkKeyRegex: "^[a-zA-Z0-9+/=_]+(:[a-zA-Z0-9+/=_]+)?$"
## configure optional User profile service
userProfileService:
default: ""
services:
# in-memory:
# capacity: 0
# storageStrategy: "fifo"
# redis:
# host: "localhost:6379"
# password: ""
# database: 0
# rest:
# host: "http://localhost"
# lookupPath: "/ups/lookup"
# lookupMethod: "POST"
# savePath: "/ups/save"
# saveMethod: "POST"
# userIDKey: "user_id"
# async: false
# headers:
# Content-Type: "application/json"
# Auth-Token: "12345"
odp:
## Disable odp
disable: false
## Timeout in seconds after which event requests will timeout.
eventsRequestTimeout: 10s
## Flush interval in seconds for odp events
eventsFlushInterval: 1s
## Timeout in seconds after which segment requests will timeout.
segmentsRequestTimeout: 10s
## If no segmentsCache is defined (or no default is defined), we will use the default in-memory with default size and timeout
segmentsCache:
default: "in-memory"
services:
in-memory:
size: 10000
timeout: 600s
# redis:
# host: "localhost:6379"
# password: ""
# database: 0
# timeout: 0s
##
## optimizely runtime configuration can be used for debugging and profiling the go runtime.
## These should only be configured when debugging in a non-production environment.
##
runtime:
## SetBlockProfileRate controls the fraction of goroutine blocking events
## that are reported in the blocking profile. The profiler aims to sample
## an average of one blocking event per rate nanoseconds spent blocked.
##
## To include every blocking event in the profile, pass rate = 1.
## To turn off profiling entirely, pass rate <= 0.
blockProfileRate: 0
## mutexProfileFraction controls the fraction of mutex contention events
## that are reported in the mutex profile. On average 1/rate events are
## reported. The previous rate is returned.
##
## To turn off profiling entirely, pass rate 0.
## To just read the current rate, pass rate < 0.
## (For n>1 the details of sampling may change.)
mutexProfileFraction: 0
## synchronization should be enabled when features for multiple nodes like notification streaming are deployed
synchronization:
pubsub:
redis:
host: "redis.demo.svc:6379"
password: ""
database: 0
## if notification synchronization is enabled, then the active notification event-stream API
## will get the notifications from available replicas
notification:
enable: false
default: "redis"
## if datafile synchronization is enabled, then for each webhook API call
## the datafile will be sent to all available replicas to achieve better eventual consistency
datafile:
enable: false
default: "redis"