# sr-record-event

The purpose of this function is to record a persistent event which occured during a sound recording delivery process in order to create a historical log.

# Local installation on apple silicon

If you're not using docker and you want to install the packages on your machine locally, you may run into the following error when running `pip install -r requirements.txt`:

`fatal error: 'librdkafka/rdkafka.h' file not found`

To fix this, you need to install `librdkafka` on your machine and tell your C compiler where to find it. Install it via

`brew install librdkafka`

and then add the following lines to your `.zshrc`:

```
export C_INCLUDE_PATH=/opt/homebrew/Cellar/librdkafka/<version>/include
export LIBRARY_PATH=/opt/homebrew/Cellar/librdkafka/<version>/lib
```

Replace `version` installed with the version number by homebrew. After restarting your terminal or after running `source ~/.zshrc` pip install should work now.

### Optional Dev Sentry DSN

If you have a dev Sentry DSN to use (using either a catch-all DSN or by setting up a dev DSN for this lambda), you can:

* `cp .env.shadow .env`
* Fill in the DSN in `.env`
* The SENTRY_DSN env var in `docker-compose.yaml` will then pick this up

If you don't fill out the environment variable, docker-compose will warn you, but it is not required.
