also optimize get_cache_key to use python's built-in hash function
distinguish the "FXA did not return an FXA UID" error message
fix link in api_auth.md doc
The `STATSD_PREFIX` of `fx-private-relay` is converted to
`fx.private.relay` when stats are emitted. Change the value to the
converted value, to reduce confusion.
Document our statsd-style metrics, how to enable them for development,
and how to test. This is in contrast to METRICS.md, which covers the
Google Analyitics.
We're replacing them with a more sophisticated mechanism that does
not require recompiling the front-end, and allows gradually
enabling features for specific groups of users.
Note that this does enable the hitherto gated feature
`generateCustomAliasSubdomain` (a popover when clicking your
subdomain explaining how to create a custom mask). Additionally, it
makes the interview recruitment banner gated by the new-style
feature flags, which doesn't have a flag for that feature yet. That
means it will in effect be disabled for now.
* Relay Website strings include the in-email header and footer
* The email task uses FxA locale, captured at FxA sign-up
* The website and add-on use live browser locale
* The email task logs errors, the website and add-on do not
This command is based on process_delayed_emails_from_sqs, but is
designed to run until interrupted (or for a maximum duration)
rather than until the queue is empty.
The command logs to eventsinfo.process_emails_from_sqs:
* At the start and end of execution (INFO)
* For each polling loop (INFO if messages, DEBUG if none)
* For each processed message (INFO if failed, DEBUG if success)
* For AWS errors (ERROR)
Adds two new environment variables:
* AWS_SQS_EMAIL_QUEUE_URL - The SQS queue for incoming emails
* AWS_SQS_EMAIL_DLQ_URL - The dead letter queue for that queue
Adds three new stats gauges:
* email_queue_count - Estimated messages in SQS
* email_queue_count_delayed - ...that are not yet availabled
* email_queue_count_not_visible - ...that are reserved by a receiver
The current SNS workflow uses AWS_SQS_QUEUE_URL as its dead-letter
queue, and AWS_SQS_EMAIL_DLQ_URL could have the same value.
AWS_SQS_QUEUE_URL can be deprected and dropped after the transition
from SNS POSTs to SQS pulls.
Adds docs to test these changes in a local developer environment, and
tests to cover the new commands.