Continuously monitor your APIs

This page describes how to use Akita features that provide cluster-wide monitoring of your deployment, staging, or test environment.

๐Ÿ‘

We're still actively building our capabilities for continuous and cluster-wide monitoring, and we welcome feature requests or bug reports! Please let us know what you'd like to see.

Collecting traces continuously

Use the akita apidump command to collect data continuously and have Akita create API models for you. The command will automatically create a trace, and tag its trace with a "deployment" name that signals Akita to automatically create models, timelines, and a service graph.

akita apidump --service your-service

The trace will continue until the command is stopped by a SIGTERM or SIGINT. To run for a limited time and then stop, you can execute a command inside the apidump command, like this example which collects an hour-long trace and then exits:

akita apidump --service your-service -c "sleep 3600" -u root

๐Ÿšง

If you are using Django on Heroku or Express.js middleware, we plan to support running continuously, or on a regular schedule, via the Akita daemon mode. Please let us know if you would like to work with us on this!

Currently, the daemon mode only starts collecting data when temporarily enabled by the user through the Akita console.

Marking your traces as coming from a continuous deployment

Akita will automatically create models for any trace created by akita apidump. These traces are given the special x-akita-source and x-akita-deployment tags, which you can see with akita get trace.

If you are collecting traces from multiple environments, you may want to specify a different deployment tag for each. You can use values such as "production" or "staging" to the --deployment command line flag to identify the context for a trace.

akita apidump --service your-service --deployment staging

You can also provide this information in the AKITA_DEPLOYMENT environment variable instead.

Automatically created API model and timeline

When Akita receives traffic tagged with a deployment tag, Akita will automatically generate models from that traffic. The "API Model" page shows a model of the traffic from the past week, updated every 10 minutes, for each deployment of the service:

29482948

You can select the deployment for which you want to view a model via the dropdown.

You can view a history of all of these models in the "API model history" tab of the Service Diagnostics view:

27942794

You can use these models to see which services and endpoints are active in your cluster, and view the inferred data types associated with each endpoint.


Did this page help you?