Viewing the activity of specific users in Amazon Q Developer - Amazon Q Developer

Viewing the activity of specific users in Amazon Q Developer

You can configure Amazon Q to collect user activity telemetry of individual Amazon Q Developer subscribers in your organization and present that information in a report. The report gives you insights into how specific users are using Amazon Q.

Amazon Q generates the report every day at midnight, and saves it in a CSV file at the following path:

s3://bucketName/prefix/AWSLogs/accountId/QDeveloperLogs/by_user_analytic/region/year/month/day/utc-hour/accountId_by_user_analytic_timestamp_randomString.csv

The CSV file is laid out as follows:

  • Each row shows a user who interacted with Amazon Q that day.

  • Each column shows a metric, as described in User activity report metrics. Metrics are calculated based on the user telemetry collected over the course of the day.

If the CSV file surpasses 1 MB, Amazon Q splits the data into several CSV files for the day.

Note

When you enable user activity reports, Amazon Q collects telemetry regardless of how a developer has set the Enable Amazon Q to send usage data to AWS setting in their IDE. That setting controls whether telemetry can be used by the AWS corporation, not your organization. For more information about this setting, see Opting out of sharing your client-side telemetry.

Use the following instructions to enable user activity reports.

Prerequisite

Create an Amazon S3 bucket to hold the user activity report CSV file. The bucket must:

  • Be in the AWS Region where the Amazon Q Developer profile was installed. This profile was installed when you subscribed users to Amazon Q Developer Pro for the first time. For more information about this profile and the Regions where it's supported, see Amazon Q Developer profiles, and Supported Regions for the Q Developer console and Q Developer profile.

  • Be in the AWS account where users are subscribed. If users are subscribed in multiple AWS accounts, then you must create buckets in each of those accounts. Cross-account buckets are not supported.

  • (Optional but recommended) Be different from the bucket you might be using for prompt logging.

  • Include a prefix, also known as a subfolder, where Amazon Q will save the CSV file. The CSV file cannot be saved in the root of the bucket.

  • Have a bucket policy like the one that follows. Replace bucketName, region, accountId, and prefix with your own information.

    { "Version": "2012-10-17", "Statement": [ { "Sid": "QDeveloperLogsWrite", "Effect": "Allow", "Principal": { "Service": "q.amazonaws.com" }, "Action": [ "s3:PutObject" ], "Resource": [ "arn:aws:s3:::bucketName/prefix/*" ], "Condition": { "StringEquals": { "aws:SourceAccount": "accountId" }, "ArnLike": { "aws:SourceArn": "arn:aws:codewhisperer:region:accountId:*" } } } ] }

    If you're configuring SSE-KMS on the bucket, add the below policy on the KMS key:

    { "Effect": "Allow", "Principal": { "Service": "q.amazonaws.com" }, "Action": "kms:GenerateDataKey", "Resource": "*", "Condition": { "StringEquals": { "aws:SourceAccount": "accountId" }, "ArnLike": { "aws:SourceArn": "arn:aws:codewhisperer:region:accountId:*" } } }

    To learn about protecting the data in your Amazon S3 bucket, see Protecting data with encryption in the Amazon Simple Storage Service User Guide.

To enable user activity reports
  1. Open the Amazon Q Developer console.

    To use the Amazon Q Developer console, you must have the permissions defined in Allow administrators to use the Amazon Q Developer console.

  2. Choose Settings.

  3. Under Q Developer user activity reports, choose Edit.

  4. Toggle Collect granular metrics per user.

  5. Under S3 location, enter the Amazon S3 URI that you will use to hold the CSV reports. Example: s3://amzn-s3-demo-bucket/user-activity-reports/