Every collector needs the following environmental variables for setup:
-`DB_USER` which is the postgres database user.
-`DB_PASS` which is the postgres database user's password.
-`DB_HOST` which is the postgres database host.
-`DB_PORT` which is the postgres database port.
-`DB_NAME` which is the postgres database name.
-`COLLECTOR_NAME` which is the name of the collector (the name for a particular running instance of a collector for a particular `TARGET_URL`). This name needs to be unique for all the collectors that are going to be run.
-`COLLECTOR_INTERVAL_SECONDS` which is the amount of time in seconds the collector needs to sleep before beginning the next round of collection.
-`TARGET_URL` which is the base domain url for where the requests are going to be send to when collecting.
-`LOOK_BACK_DAYS` which represents how old of a dataset (measured in days) do we want the collectors to collect data from (for example pull requests that were update 365 days ago for gitlab-scm-collector)
-`GO_RUN_ENV` which represents the environment type (can be "production" or "development" only).
-`COLLECTOR_TARGETS_INTRVL_SECS` which represents the amount of time that the top level collection (collector target collection) must wait before collecting again. Ideally 24 hours.
-`MAX_REQUESTS_PER_MINUTE` which represents the threshold for the amount of requests that can be sent to `TARGET_URL` in a minute before the collector instance needs to stop sending requests for a brief period of time.
-`ACCESS_TOKEN` which is the token that must be set in order for the collector to retrieve data from whatever API might need the token (example: GitLab, Jira etc.).
-`DB_USER`: the postgres database user.
-`DB_PASS`: the postgres database user's password.
-`DB_HOST`: the postgres database host.
-`DB_PORT`: the postgres database port.
-`DB_NAME`: the postgres database name.
-`COLLECTOR_NAME`: the name of the collector (the name for a particular running instance of a collector for a particular `TARGET_URL`). This name needs to be unique for all the collectors that are going to be run.
-`COLLECTOR_INTERVAL_SECONDS`: the amount of time in seconds the collector needs to sleep before beginning the next round of collection.
-`TARGET_URL`: the base domain url for where the requests are going to be sent to when collecting. For example, `https://example.com`.
-`LOOK_BACK_DAYS`: represents how old of a dataset (measured in days) do we want the collectors to collect data from (for example pull requests that were update 365 days ago for gitlab-scm-collector)
-`GO_RUN_ENV`: represents the environment type (can be "production" or "development" only).
-`COLLECTOR_TARGETS_INTRVL_SECS`: represents the amount of time that the top level collection (collector target collection) must wait before collecting again. Ideally 24 hours.
-`MAX_REQUESTS_PER_MINUTE`: represents the threshold for the amount of requests that can be sent to `TARGET_URL` in a minute before the collector instance needs to stop sending requests for a brief period of time.
-`ACCESS_TOKEN`: the token that must be set in order for the collector to retrieve data from whatever API might need the token (example: GitLab, Jira etc.).
## Environmental Variables needed for the API
The API needs the following environmental variables for the setup:
-`DB_USER`: the postgres database user.
-`DB_PASS`: the postgres database user's password.
-`DB_HOST`: the postgres database host.
-`DB_PORT`: the postgres database port.
-`DB_NAME`: the postgres database name.
-`SSO_ENABLED`: determines whether the SSO is enabled or not (can only be one of "true" or "false" as value).
-`SSO_ADMIN_GROUP`: the SSO group name for admin access.
-`SSO_LEADERSHIP_GROUP`: the SSO group name for leadership access.
-`SSO_GROUPS_KEY`: the key found in user token indicating the list of groups a user is part of (this can include `SSO_ADMIN_GROUP`, `SSO_LEADERSHIP_GROUP` in the list). This list will determine what SSO permissions a user has.
-`SSO_USERNAME_KEY`: the key found in user token indicating the user's username.
-`OPENAPI_VERSION`: the open api version for the app to use.
-`MODE`: the mode of operation for the app (can be "production" or "development")
### Experimental features that can be enabled
The API can enable experimental features by setting the variable name that describes the feature
as true. For example, `FEATURE_XXX=true`. where `XXX` is the feature name.