You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+64-7Lines changed: 64 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -206,14 +206,31 @@ There are several features that can be enabled by setting environment variables
206
206
207
207
Run two Ads services and split traffic between them. The amount of traffic sent to each service is set with a percent value.
208
208
209
+
This requires running a second Ads service in addition to the default Java Ads service and setting environment variables in the `service-proxy` service. The Python Ads service is typically used as the secondary service.
210
+
211
+
1. Set an environment variable for the Python Ads service version.
212
+
213
+
```bash
214
+
export DD_VERSION_ADS_PYTHON=1.0.0
215
+
```
216
+
217
+
1. These environment variables need to be setfor the `service-proxy` service.
218
+
219
+
- `ADS_A_UPSTREAM`: Host and port for the primary (A) ads service (default: `ads:3030`)
220
+
- `ADS_B_UPSTREAM`: Host and port for the secondary (B) ads service (default: `ads-python:3030`)
221
+
- `ADS_B_PERCENT`: Percentage of traffic to route to the B (Python) ads service (default: `0`). The remainder goes to the A ads (Java) service.
222
+
- Set a value between `0` and `100` to control the split.
223
+
209
224
**How to use**
225
+
226
+
#### Docker Compose
210
227
1. Add a second Ads service to the `docker-compose.yml`
> Be sure to set the `DD_VERSION_ADS_PYTHON` environment variable so that it will be applied to the file by `envsubst`.
297
+
249
298
### Feature flags
299
+
250
300
Some capabilities are hidden behind feature flags, which can be controlled via `services/frontend/site/featureFlags.config.json`.
251
301
252
302
> [!NOTE]
@@ -258,6 +308,7 @@ Some capabilities are hidden behind feature flags, which can be controlled via `
258
308
> ```
259
309
260
310
#### dbm
311
+
261
312
Enables a product ticker on the homepage with a long-running query to demonstrate DBM.
262
313
263
314
**How to use**:
@@ -270,6 +321,7 @@ Enables a product ticker on the homepage with a long-running query to demonstrat
270
321
You can modify the ticker functionality in `services/frontend/components/common/NavBar.tsx`.
271
322
272
323
#### error-tracking
324
+
273
325
Introduces an exception in the Ads services to demonstrate Error Tracking by setting a header in to a value that is not expected by the Ads service.
274
326
275
327
**How to use**:
@@ -281,6 +333,7 @@ Introduces an exception in the Ads services to demonstrate Error Tracking by set
281
333
Modify this functionality in `services/frontend/components/common/Ad/Ad.tsx` and respective Ads service being used.
282
334
283
335
#### api-errors
336
+
284
337
This introduces random errors that occur in the frontend service's `/api` routes.
285
338
286
339
**How to use**:
@@ -291,6 +344,7 @@ This introduces random errors that occur in the frontend service's `/api` routes
291
344
Modify this functionality in`services/frontend/pages/api/*`.
292
345
293
346
#### product-card-frustration
347
+
294
348
This will swap out the product card component with a version that doesn't have the thumbnails linked to the product page. When paired with the Puppeteer service, this can be used to demonstrate Frustration Signals in RUM.
295
349
296
350
**How to use**:
@@ -301,6 +355,7 @@ This will swap out the product card component with a version that doesn't have t
301
355
Modify this functionality in `services/frontend/components/Product/ProductCard.tsx` and `services/frontend/components/Product/ProductCard-v2.tsx`.
302
356
303
357
## Image publication
358
+
304
359
Images are stored in GHCR. On PR merges, only the affected services will be pushed to GHCR, using the `latest` tag. For example, if you only made changes to the `backend` service, then only the `backend` Github workflow will trigger and publish `ghcr.io/datadog/storedog/backend:latest`.
305
360
306
361
Separately, we tag and publish *all* images when a new release is created with the corresponding release tag e.g. `ghcr.io/datadog/storedog/backend:1.0.1`. New releases are made on an ad-hoc basis, depending on the recent features that are added.
@@ -312,6 +367,7 @@ All of the services in the Storedog application are Dockerized and run in contai
312
367
Below is a breakdown of services and some instructions on how to use them.
313
368
314
369
### Ads
370
+
315
371
There are two advertisement services, the default service is built in Java and there is another option available in Python. These services do the same thing, have the same endpoints, run on the same port (`3030`), and have the same failure modes. These ads are served through the `Ads.tsx` component in the frontend service.
316
372
317
373
To switch between the Java and Python services, see the instructions in the [Ads service README](./services/ads/README.md).
@@ -340,6 +396,7 @@ sh ./scripts/backup-db.sh
340
396
This will create a new `restore.sql` file in the `services/postgres/db/` directory and get it set up with all of necessary SQL statements to prepare the database for Datadog monitoring. When done running, you'll want to rebuild the Postgres database image with the new restore point.
341
397
342
398
#### Worker
399
+
343
400
The Spree application has a worker process that runs in the background. There is a specific Datadog tracer configuration foritin the `services/worker/` directory and is mounted into the worker container.
0 commit comments