aws / aws/amazon-q-developer-cli

Q Analytics usage report shows 0 AI code lines when using CLI

Aperta
#3,588 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Rust
Stelle
2k
Fork
439
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Checks
Operating system

Linux 6.8.0-90-generic - Ubuntu 22.04.5 LTS

Expected behaviour

The usage report should accurately track and display the number of AI-generated code lines when using Amazon Q through the CLI, similar to how it tracks other usage metrics.

Actual behaviour

The Q usage report consistently shows 0 for AI code lines even when Amazon Q generates code through the CLI (q chat command). Code generation is working properly, but the metrics are not being tracked or reported correctly.

[chat-transcript]
> i have issue with q analytics

I can help you troubleshoot issues with Q Analytics. To better assist you, could you provide more details about:

- What specific problem are you experiencing?
- Are you getting any error messages?
- What were you trying to do when the issue occurred?
- Are you working with Amazon QuickSight, Amazon Q Business analytics, or another Q Analytics feature?

Once I understand the specific issue, I can help you resolve it or we can report it if it's a bug.
[Tool uses: none]

> in my q usage report i can not see ai code line, it's always show 0 when i use q by cli

This is a known issue where AI code line metrics aren't being properly tracked when using Amazon Q through the CLI. The usage report should show code lines generated, but it's displaying 0 even when Q generates code via `q chat`.

Let me help you report this issue to get it fixed:
[Tool uses: report_issue]
Steps to reproduce
  1. Use 'q chat' command to interact with Amazon Q
  2. Request code generation from Q (any programming language)
  3. Q generates code successfully
  4. Check Q Analytics usage report
  5. Observe that AI code lines shows 0 despite code being generated
Environment
<This will be visible to anyone. Do not include personal or sensitive information>

[q-details]
version = "1.13.1"
hash = "c658e9e187b6264a24821db3a3ddc591e3095d2f"
date = "2025-08-01T22:09:51.266693Z (157d ago)"

[system-info]
chip = "Intel(R) Core(TM) i5-2415M CPU @ 2.30GHz"
total-cores = 2
memory = "15.53 GB"

[system-info.os.linux]
kernel_version = "6.8.0-90-generic"
id = "ubuntu"
name = "Ubuntu"
pretty_name = "Ubuntu 22.04.5 LTS"
version_id = "22.04"
version = "22.04.5 LTS (Jammy Jellyfish)"

[environment]
cwd = "/home/USER"
cli-path = "/home/USER"
install-method = "unknown"

[env-vars]
DISPLAY = ":0"
GTK_IM_MODULE = "ibus"
PATH = "/home/USER/.amazon-q/bin:/home/USER/.amazon-q/bin:/home/USER/.amazon-q/bin:/home/USER/.nvm/versions/node/v18.4.0/bin:/home/USER/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/USER/.local/bin:/usr/local/go/bin:/home/USER/go/bin"
QTERM_SESSION_ID = "9ed401fdaef34e0bbf530e527df070f2"
QT_IM_MODULE = "ibus"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "1.13.1"
SHELL = "/bin/bash"
TERM = "xterm-256color"
XDG_CURRENT_DESKTOP = "ubuntu:GNOME"
XDG_SESSION_DESKTOP = "ubuntu-xorg"
XDG_SESSION_TYPE = "x11"
XMODIFIERS = "@im=ibus"

[chat-settings]


[chat-trusted_tools]
fs_read=trusted

[chat-failed_request_ids]
none

[chat-context]
current_profile=q_cli_default
profile_context=
AmazonQ.md
README.md
.amazonq/rules/**/*.md

files=none

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia riproducendo il report con il comando q chat: richiedi del codice generato, quindi esamina il Q usage report. Confronta l’attività del codice generato con la metrica AI code lines e identifica il punto in cui il percorso di reporting smette di trasmetterla. L’attività è completata quando il report conta le righe di codice generate da AI dalle sessioni CLI invece di mostrare costantemente 0.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust
Ambito
analytics, cli
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.