[TRAIN-3456] Add healthchecks. Add functionality to Makefile. Refactor Puppeteer.#122
[TRAIN-3456] Add healthchecks. Add functionality to Makefile. Refactor Puppeteer.#122briannadelvalle-datadog wants to merge 49 commits into
Conversation
| console.error(e) | ||
| setLoading(false) | ||
| } | ||
| }, [adsPath, getRandomArbitrary, setData, setLoading]) |
There was a problem hiding this comment.
React said that this wasn't needed here.
There was a problem hiding this comment.
Makes sense, it's not a dependency
| @@ -1,29 +1,134 @@ | |||
| FROM node:20 AS builder | |||
| FROM node:lts-alpine AS base | |||
There was a problem hiding this comment.
To mitigate a security vulnerability in other image
| @@ -1,4 +1,5 @@ | |||
| module.exports = { | |||
| output: 'standalone', | |||
There was a problem hiding this comment.
This is for the optimized production builds (production build target)
|
|
||
| settings.json | ||
|
|
||
| docker-compose.dev.frontend-prod.yml No newline at end of file |
There was a problem hiding this comment.
Was this last one left here on purpose?
There was a problem hiding this comment.
Yeah, this is only for testing the frontend prod build target.
Can't test it with the regular docker-compose.yml because it's not in the storedog image.
Can't test it with the docker-compose.dev.yml because of the volume mounts.
I'm adding a script and a make command to generate this file, but there's no reason to add it to source control.
There was a problem hiding this comment.
For more context, the prod build creates a server.js file and the command is node server.js. If we're mounting the entire service directory, we end up losing that file.
…tation; add transform_compose.py script and unit tests for compose transformations.
…ddprofrb for profiling
…nction for generated files in transform_compose.py
…put setting in next.js for prod build
…production frontend build
…rget, and build args in docker-compose template; refine regex pattern for build section replacement in transformation logic.
…opment and production environments, including environment variable configurations and dependency installations.
… function for selecting the appropriate Docker Compose file based on the ENV variable. Simplify commands for starting, stopping, and managing containers in both development and production environments.
…ariables for frontend service; add port mapping for local development.
…th NEXT_PUBLIC_DD variables for frontend service configuration.
…ment to production
…nv var stuff to env templates, move feature stuff to feature.md
…BLIC_DD variables for consistency in frontend service configuration.
… with NEXT_PUBLIC_DD variables for consistency in frontend service configuration.
… NEXT_PUBLIC prefix and enhance transformation logic for development to production changes.
…g, and improve documentation for better usability.
…og configurations for cleaner logging setup.
…, simplifying the setup for Datadog logging.
…et to simplify usage instructions.
…filters branch Replaces the monolithic puppeteer.js script with a modular traffic generator featuring a SessionManager, BrowserPool, and 10 configurable session types. Upgrades Puppeteer from v20 to v24 and adds memory-aware concurrency profiles. Updates docker-compose service definitions with new environment variables. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
d3e964e to
bb45864
Compare
…vices These tags are unnecessary since DD_SERVICE, DD_VERSION, and DD_ENV are already set as environment variables on these containers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This reverts commit a68ce35.
- Fix NEXT_PUBLIC_CLIENT_TOKEN -> NEXT_PUBLIC_DD_CLIENT_TOKEN in .env.development.template - Remove unused getRandomArbitrary function and leftover console.logs in Ad.tsx - Fix .PHONY to match actual Makefile targets (remove dd-dev, dd-prod, prepare-frontend-prod; add frontend-prod) - Deduplicate node_modules and .env entries in .gitignore, add trailing newline - Fix copy-paste error in discounts README (ads.py -> discounts.py) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Description
docker-compose.ymlfiles fromdocker-compose.dev.yaml. (One is intended for pre-release, another is for testing the frontend prod build target while using the dev docker compose file.)env.development.templatefor TCD use.rum-retention-filtersbranch — replaces the monolithicpuppeteer.js(841-line single script + shell wrapper) with a modular traffic generator architecture. Key changes:package.jsonwith proper npm dependency managementSessionManager,BrowserPool,BaseSessionclass, and 10 individual session types (browsing, taxonomy, frustration, homePage, short, vip, bot, cartAbandonment, earlyError, lateError)services/puppeteer/README.md)RUM_APP_ID/RUM_CLIENT_TOKEN) mapped from existingNEXT_PUBLIC_DD_APPLICATION_ID/NEXT_PUBLIC_DD_CLIENT_TOKENFrontend build times
Tested with the help of Cursor/Claude.
Image Sizes
Tested with the help of Cursor/Claude.
How to test
Test the healthchecks
make upto build the dev containers.Test the frontend prod build target
Makefile, setENV=dev-frontend-prod.make up clean.Test the dockerfile generation script
make prepare-release.docker-compose.generated.ymlfile and answer Y/N in the terminal.Test the Makefile updates
make helpto see the commands.Test the puppeteer migration
make up(ordocker compose -f docker-compose.dev.yml up --build puppeteer)PUPPETEER_LOOP=singleandPUPPETEER_DEBUG=truein.envfor a quick smoke test