Amazon’s Relational Database Service (RDS) lets you use a number of databases without having to administer them yourself. The Honeycomb RDS connector gives you access to the same data as if you were running MySQL on your own server.
The Honeycomb RDS connector surfaces attributes like:
Honeycomb allows you to calculate metrics and statistics on the fly while retaining the full-resolution log lines (and the original MySQL query that started it all).
Once you have got data flowing, be sure to take a look at our starter queries; our entry points provide our recommendations for comparing lock retention by normalized query, scan efficiency by collection, or read vs. write distribution by host.
This integration is a Lambda function subscribed to your instance’s RDS Log Group. It parses log events as they arrive and submits them to Honeycomb. Note that configuring your RDS instance to send its logs to Cloudwatch will incur additional AWS costs - see the Cloudwatch Pricing docs for details.
Before installing the integration, configure MySQL running on RDS to output the slow query log to a file. Refer to Amazon’s documentation on setting Parameter Groups to get started, and find more detail about the configuration options below in the MySQL docs for the slow query log.
Set the following options in the Parameter Group:
If you switch to a new Parameter Group when you make these changes, make sure you restart the database.
Note: Enabling slow query logs for all queries can generate a lot of log data, and can have an adverse impact on the performance of your RDS instance.
If your database already has a lot of traffic, consider starting out by only logging longer queries (for example, setting
long_query_time to 0.1 or higher) before logging everything.
You may also wish to consider sampling your data.
Next, enable publishing of MySQL slow query logs to AWS Cloudwatch Logs. You can do this in the RDS console in the instance configuration. See the AWS docs for full details.
This change can be done without instance downtime. Once you have made the above changes, verify that logs are being received by Cloudwatch Logs via the Cloudwatch Logs Console.
The MySQL integration exists as an AWS Lambda function deployed in your AWS account. It subscribes to the Cloudwatch Log Group created by RDS, parses log lines, and submits them as events to Honeycomb. You can view the source here.
To install the integration, you will need:
To get started, click this AWS quick-create link. This will launch the Cloudformation Stack creation wizard and will prompt you for a few key inputs:
To hash the concrete
query, set the
ScrubQuery parameter to
true when installing the integration.
normalized_query attribute will still be representative of the shape of the query and identifying patterns (including specific queries) will still be possible, but the sensitive information will be completely obscured before being submitted to our API.
Did you find what you were looking for?