We're constantly striving to make observability on FlexStack as easy as possible, whether you're using AWS CloudWatch or third-party tools.
Built-in observability tools
Every service you deploy with FlexStack is seamlessly integrated with AWS CloudWatch out-of-the-box.
How it works
When you deploy a Component to FlexStack, we automatically emit a Log Stream to a shared Log Group within your Environment. Sharing a log group between all of the services within an environment allows us to create a rich logging experience that allows you to seamlessly zoom in/out on events from your services.
Environment logs
Each environment has a top-level logs page that displays all of the events captured in each service. This view can be configured to display specific fields within structured logs. It also allows you to set specific time frames, as well as filter and fuzzy search events. Here you'll be able to see which component emitted an event, in addition to the specific ECS task.
Component logs
To view logs for a specific task or component, you can click on the component name or task ID in the log event. This will navigate you to the component's log page. pictured below.
Component metrics
In addition to logs, each service captures metrics specific to the service type. In the case of Web Services, you'll see metric chars for CPU and memory utilization, request count, and service latency. Metrics are viewable in the component dashboard.
Third-party integrations
Integrating your favorite observability, logging, and metrics platforms with FlexStack is as easy as adding magic secrets. Only one integration may be configured per component.
How it works
When you deploy a component, we search for variables with names specific to logging and metric platforms. If we detect a secret, we automatically configure your ECS tasks to send logs to these platforms instead of AWS CloudWatch.
Datadog
To add a Datadog integration, add the following secrets to your environment or individual components. Adding these secrets will automatically configure a Datadog agent to run in a sidecar container in your component task. You need to redeploy your component for the variable changes to take effect.
Secret name | Description |
---|---|
DD_API_KEY | Your Datadog API key |
DD_SITE | By default the Datadog agent sends its data to Datadog US site: app.datadoghq.com. If your organization is on another site, you must update the site parameter. For example, "us5.datadoghq.com" |
To get the most out of your Datadog integration, you can optionally add these additional variables:
Secret name | Description |
---|---|
DD_TAGS | Set global tags to be attached to every span. Value must be either comma or space separated. e.g. key1:value1,key2,value2 or key1:value key2:value2. |
DD_SERVICE | Set the service name to be used for this application. A default is provided for these integrations: Bottle, Flask, Grpc, Pyramid, Pylons, Tornado, Celery, Django and Falcon. |
DD_SOURCE | A human readable name for the underlying technology of your service. For example, postgres or nginx. |
Once the component has deployed with the integration, you'll start to receive service logs and metrics to your Datadog dashboard.
Better Stack
To set up a Better Stack integration, head over to the "Logs" tab in the Better Stack dashboard. Click "Connect Source", enter a "Name" and then select "Amazon ECS" in the "Platform" dropdown.
Click "Create Source". This will take you to a page with a "Basic information" section that includes a field called "Source token". Click on the source token to copy it to your clipboard.
Next, add the following secrets to your environment or individual components:
Secret name | Description |
---|---|
BETTERSTACK_TOKEN | Your Better Stack "Source token" |
Finally, redeploy your component. This will cause logs to emit to Better Stack instead of AWS CloudWatch.
When it's finished deploying, you'll see logs show up in the "Live tail" tab of the Better Stack dashboard.
Axiom
To set up an Axiom integration, create a new Dataset in the Axiom dashboard. Name it whatever you'd like.
Next, click "Create a new token" at the top of the "Ingest method" section. Name it "FlexStack token". Click "Create" and copy the token to your clipboard.
Next, add the following secrets to your environment or individual components:
Secret name | Description |
---|---|
AXIOM_TOKEN_HEADER | A header containing your Axiom API token. For example "Authorization Bearer xaat-..." |
AXIOM_DATASET_NAME | The name of the Axiom dataset you created |
Finally, redeploy the component for the changes to take effect. This will cause logs to emit to Axiom instead of AWS CloudWatch.
Go to the "Streams" tab in the Axiom dashboard, click on your dataset name. Voila, you've got logs.
Mezmo (formerly LogDNA)
To set up a Mezmo integration, create a new Log Source. Copy the "Log ingestion key" at the top of the page.
Next, add the following secrets to your environment or individual components:
Secret name | Description |
---|---|
MEZMO_TOKEN | Your Mezmo API token. For example "bf26e9d3717cade950a90a4e519a4ba3" |
Finally, redeploy the component for the changes to take effect. This will cause logs to emit to Axiom instead of AWS CloudWatch.
Once the deployment has succeeded, head back to the Mezmo log viewer and you will see your component logs in the stream.