Note: this code is not yet in production use.
The FxA metrics processor is a Pub/Sub ETL worker that transforms raw log lines from the FxA auth, content, and payments servers into amplitude and activity/flow metrics events.
This package will be the eventual home for metrics processing code extracted from the FxA monorepo (fxa-shared, fxa-auth-server, fxa-content-server, fxa-payments-server), as well as the fxa-amplitude-send and fxa-activity-metrics repos.
Work in this package is tracked under the metrics epic, https://jira.mozilla.com/browse/FXA-838 (technically linked to mozilla#3738, but a lot of the context is not synced over to GH).
This package uses Mocha to test its code. By default npm test
will test all files ending under src/test/
, and uses ts-node
so it can process TypeScript files.
Test specific tests with the following commands:
# Test only src/test/lib/pubsub.spec.ts
npx mocha -r ts-node/register src/test/lib/pubsub.spec.ts
# Grep for "return messages"
npx mocha -r ts-node/register src/test/*/** -g "return messages"
Refer to Mocha's CLI documentation for more advanced test configuration.