|
| 1 | +--- |
| 2 | +title: Usage Tracking |
| 3 | +description: Understand what data LocalStack collects and how you can opt out of usage tracking |
| 4 | +template: doc |
| 5 | +--- |
| 6 | + |
| 7 | +## Overview |
| 8 | + |
| 9 | +For license activations, we track the timestamp and the licensing credentials. |
| 10 | +We need to do this to make CI credits work. |
| 11 | +It is tracked regardless of whether the user disables event tracking since we collect this in the backend, not the client. |
| 12 | + |
| 13 | +## LocalStack usage statistics |
| 14 | + |
| 15 | +For Pro users, most of the information is collected to populate the [Stack Insights](/aws/capabilities/web-app/stack-insights) dashboard. |
| 16 | +Collecting basic anonymized usage of AWS services helps us better direct engineering efforts to services that are used the most or cause the most issues. |
| 17 | + |
| 18 | +### Session information |
| 19 | + |
| 20 | +The current usage event collection on the client side includes: |
| 21 | + |
| 22 | +- A randomly generated ID pertaining to the session |
| 23 | +- The Auth Token or legacy API key (if any) |
| 24 | +- A randomly generated machine ID is kept throughout the session but deleted once the LocalStack cache directory is removed |
| 25 | +- The operating system (mostly Linux since LocalStack typically runs in our Debian container) |
| 26 | +- The LocalStack version being used |
| 27 | +- Whether LocalStack is running in a CI environment |
| 28 | +- Whether LocalStack is running in Docker |
| 29 | +- Whether this is an internal test run (LocalStack development flag) |
| 30 | + |
| 31 | +Here is an example of a usage event: |
| 32 | + |
| 33 | +```json |
| 34 | +{ |
| 35 | + "session_id": "f41119fd-af20-4d48-af92-2b8d69f8cf7e", |
| 36 | + "machine_id": "1b6a2f12", |
| 37 | + "api_key": "0123456789", |
| 38 | + "system": "Linux", |
| 39 | + "version": "1.0.5.dev", |
| 40 | + "is_ci": false, |
| 41 | + "is_docker": true, |
| 42 | + "is_testing": false |
| 43 | +} |
| 44 | +``` |
| 45 | + |
| 46 | +### AWS API call metadata |
| 47 | + |
| 48 | +The AWS API call metadata includes: |
| 49 | + |
| 50 | +- The service being called (like `s3` or `lambda`) |
| 51 | +- The operation being called (like `PutObject`, `CreateQueue`, `DeleteQueue`) |
| 52 | +- The HTTP status code of the response |
| 53 | +- If it is a 400 error, we collect the error type and message. |
| 54 | + If it is a 500 error (internal LocalStack error), and `DEBUG=1` is enabled, we may also collect the stack trace to help us identify LocalStack bugs |
| 55 | +- Whether the call originated from inside LocalStack |
| 56 | +- The region user made the call to |
| 57 | +- The dummy account ID user made the request |
| 58 | +- The user agent the request was made with (`aws-cli`, `terraform`) |
| 59 | + |
| 60 | +Here is an example of AWS API call metadata: |
| 61 | + |
| 62 | +```json |
| 63 | +{ |
| 64 | + "name": "aws_request", |
| 65 | + "metadata": { |
| 66 | + "session_id": "64517be1-7dd0-479b-a8ec-88d3e544afd9", |
| 67 | + "client_time": "2022-08-30 12:27:25.556001" |
| 68 | + }, |
| 69 | + "payload": { |
| 70 | + "service": "sqs", |
| 71 | + "operation": "DeleteQueue", |
| 72 | + "status_code": 400, |
| 73 | + "err_type": "AWS.SimpleQueueService.NonExistentQueue", |
| 74 | + "err_msg": "The specified queue does not exist for this wsdl version.", |
| 75 | + "is_internal": false, |
| 76 | + "region": "us-east-1", |
| 77 | + "account_id": "000000000000", |
| 78 | + "user_agent": "aws-cli/1.25.52 Python/3.10.4 Linux/5.13.0-28-generic awscrt/0.14.0 botocore/1.27.52" |
| 79 | + } |
| 80 | +} |
| 81 | +``` |
| 82 | + |
| 83 | +For the community image, we only track service, operation, status code, and how often the combination of those occurred. |
| 84 | + |
| 85 | +### CLI invocations |
| 86 | + |
| 87 | +We collect an anonymized event if a CLI command was invoked, but do not collect any of the parameter values. |
| 88 | +This event is not connected to the session or the Auth Token. |
| 89 | + |
| 90 | +Here is an example of a CLI invocation event: |
| 91 | + |
| 92 | +```json |
| 93 | +{ |
| 94 | + "name": "cli_cmd", |
| 95 | + "metadata": { |
| 96 | + "client_time": "2022-08-30 14:46:54.116457" |
| 97 | + }, |
| 98 | + "payload": { |
| 99 | + "cmd": "localstack config validate", |
| 100 | + "params": [ |
| 101 | + "file" |
| 102 | + ] |
| 103 | + } |
| 104 | +} |
| 105 | +``` |
| 106 | + |
| 107 | +### Feature usage |
| 108 | + |
| 109 | +We collect the usage of particular features in an anonymized and aggregated way. |
| 110 | + |
| 111 | +- If you use init scripts, we collect the stage, how many scripts are being executed, and how long they took |
| 112 | +- Nothing else at the moment, but we may track additional features |
| 113 | + |
| 114 | +## What we are not collecting? |
| 115 | + |
| 116 | +- Specific LocalStack configuration values |
| 117 | +- Content or file names of files being uploaded to S3 |
| 118 | +- More generally, we don't collect any parameters of AWS API Calls. |
| 119 | + We do not track S3 bucket names, Lambda function names, EC2 configurations, or anything similar |
| 120 | +- Any sensitive information about the request (like credentials and URL parameters) |
| 121 | + |
| 122 | +## Configuration |
| 123 | + |
| 124 | +You can disable event reporting in your LocalStack instance by setting the environment variable `DISABLE_EVENTS=1`. |
0 commit comments