Skip to content

Latest commit

 

History

History
309 lines (199 loc) · 7.81 KB

configuration.rst

File metadata and controls

309 lines (199 loc) · 7.81 KB

Configuration

Introduction

Antenna uses environment configuration to define its behavior.

The local development environment is configured in the my.env and docker/config/local_dev.env env files and that configuration is pulled in when you run Antenna using docker compose.

In a server environment, configuration is pulled in from the process environment.

Here's an example. This uses Datadog installed on the EC2 node for metrics and also IAM bound to the EC2 node that Antenna is running on so it doesn't need S3 credentials for crashstorage.

# Metrics things
STATSD_NAMESPACE=mcboatface

# BreakdpadSubmitterResource settings
CRASHMOVER_CRASHSTORAGE_CLASS=antenna.ext.s3.crashstorage.S3CrashStorage

# S3CrashStorage and S3Connection settings
CRASHMOVER_CRASHSTORAGE_BUCKET_NAME=org-myorg-mybucket

Gunicorn configuration

For Gunicorn configuration, see Dockerfile. You'll want to set the following:

Application

First, you need to configure the application-scoped variables.

antenna.app.AntennaApp

These are defaults appropriate for a server environment, so you may not have to configure any of this.

Breakpad crash resource

antenna.breakpad_resource.BreakpadSubmitterResource

Throttler

antenna.throttler.Throttler

Crash mover

antenna.crashmover.CrashMover

Crash storage

For crash storage, you have three options one of which is a no-op for debugging.

NoOpCrashStorage

The NoOpCrashStorage class is helpful for debugging, but otherwise shouldn't be used.

antenna.ext.crashstorage_base.NoOpCrashStorage

Filesystem

The FSCrashStorage class will save crash data to disk. If you choose this, you'll want to think about what happens to the crash after Antenna has saved it and implement that.

antenna.ext.fs.crashstorage.FSCrashStorage

When set as the CrashMover crashstorage class, configuration for this class is in the CRASHMOVER_CRASHSTORAGE namespace.

Example:

CRASHMOVER_CRASHSTORAGE_FS_ROOT=/tmp/whatever

AWS S3

The S3CrashStorage class will save crash data to AWS S3. You might be able to use this to save to other S3-like systems, but that's not tested or supported.

antenna.ext.s3.connection.S3Connection

When set as the CrashMover crashstorage class, configuration for this class is in the CRASHMOVER_CRASHSTORAGE namespace.

Example:

CRASHMOVER_CRASHSTORAGE_BUCKET_NAME=mybucket
CRASHMOVER_CRASHSTORAGE_REGION=us-west-2
CRASHMOVER_CRASHSTORAGE_ACCESS_KEY=somethingsomething
CRASHMOVER_CRASHSTORAGE_SECRET_ACCESS_KEY=somethingsomething

antenna.ext.s3.crashstorage.S3CrashStorage

When set as the CrashMover crashstorage class, configuration for this class is in the CRASHMOVER_CRASHSTORAGE namespace.

Generally, if the default connection class is fine, you don't need to do any configuration here.

Google Cloud Storage

The GcsCrashStorage class will save crash data to Google Cloud Storage.

antenna.ext.gcs.crashstorage.GcsCrashStorage

When set as the CrashMover crashstorage class, configuration for this class is in the CRASHMOVER_CRASHSTORAGE namespace.

Example:

CRASHMOVER_CRASHSTORAGE_BUCKET_NAME=mybucket

Crash publish

For crash publishing, you have two options one of which is a no-op.

NoOpCrashPublish

The NoOpCrashPublish class is helpful for debugging and also if you don't want Antenna to be publishing crash ids somewhere.

antenna.ext.crashpublish_base.NoOpCrashPublish

Google Pub/Sub

The PubSubCrashPublish class will publish crash ids to a Google Pub/Sub topic.

antenna.ext.pubsub.crashpublish.PubSubCrashPublish

When set as the BreakpadSubmitterResource crashpublish class, configuration for this class is in the CRASHMOVER_CRASHPUBLISH namespace.

You need to set the project id and topic name.

AWS SQS

The SQSCrashPublish class will publish crash ids to an AWS SQS queue.

antenna.ext.sqs.crashpublish.SQSCrashPublish

When set as the CrashMover crashpublish class, configuration for this class is in the CRASHMOVER_CRASHPUBLISH namespace.