TabbyML / tabby

Self-hosted AI coding assistant
https://tabby.tabbyml.com/
Other
18.31k stars 771 forks source link

IDE information in client logs #2566

Closed agarwars-deshaw closed 19 hours ago

agarwars-deshaw commented 2 days ago

I wanted to know if logs (like the one below) with IDE and tabby_plugin information can be generated using the current codebase?

{
  "level": 20,
  "time": 1702366018598,
  "pid": 3916280,
  "hostname": "<hostname>",
  "component": "TabbyAgent",
  "client": "Visual Studio Code desktop 1.84.2, TabbyML.vscode-tabby 1.1.3",
  "ide": {
    "name": "Visual Studio Code desktop",
    "version": "1.84.2"
  },
  "tabby_plugin": {
    "name": "TabbyML.vscode-tabby",
    "version": "1.1.3"
  },
  "requestId": "edbd2575-92cd-43c7-85d7-1889dcba34d3",
  "requestOptions": {
    "body": {
      "language": "plaintext",
      "segments": {
        "prefix": "[logs]\nlevel = \"silent",
        "suffix": "\"\n\n "
      }
    },
    "signal": {}
  },
  "url": <url with route>,
  "msg": "Completion request"
}

I am trying to log the client ide information to the server. I have tried

[logs] 
level = "trace"

as well as

[logs]
level = "debug"

along with

[anonymousUsageTracking] 
disable = false

in the ~/.tabby-client/agent/config.toml file.

Still, all I get is

{"level":20,"time":1719983446816,"pid":2850041,"hostname":"<hostname>","tag":"TabbyAgent","msg":"Completion request: POST <post-route>. [5fe552be-7f5e-4e2e-8569-c60fa45bed4b]"}
{"level":10,"time":1719983446816,"pid":2850041,"hostname":"<hostname>","tag":"TabbyAgent","language":"cpp","segments":{"prefix":"#include <iostream>\n","suffix":"\nint main(){\n    return 0;\n}","filepath":"main.cpp","relevant_snippets_from_changed_files":[]},"temperature":0.8,"msg":"Completion request body: [5fe552be-7f5e-4e2e-8569-c60fa45bed4b]"}
{"level":20,"time":1719983446921,"pid":2850041,"hostname":"<hostname>","tag":"TabbyAgent","msg":"Completion response status: 200. [5fe552be-7f5e-4e2e-8569-c60fa45bed4b]"}
{"level":10,"time":1719983446921,"pid":2850041,"hostname":"<hostname>","tag":"TabbyAgent","id":"cmpl-79c32ebf-966c-4f06-b7ca-e36a6de3682e","choices":[{"index":0,"text":""}],"msg":"Completion response data: [5fe552be-7f5e-4e2e-8569-c60fa45bed4b]"}

in the ~/.tabby-client/agent/logs/current.log file and no specific IDE information in server side terminal.

wsxiaoys commented 2 days ago

No, this information is not sent to Tabby server and there's no flag to enable such telemetry.

icycodes commented 2 days ago

Hi, @agarwars-deshaw.
The first snippet you pasted is logged by tabby-agent before v1.6. Its format has been changed to be like the later snippet you pasted since v1.6.
There are no options in the client config to control the logging fields for now.
For more information, please refer to #2072.

agarwars-deshaw commented 1 day ago

Hi, I wanted the ide information to be passed by the client itself. Is the tabby team willing to patch in that feature? If so, how much time will it take to get it?

wsxiaoys commented 1 day ago

Would reading events log under ~/.tabby/events an option? If not - consider grab a slot at https://calendly.com/tabby_ml/chat-with-tabbyml for a live discussion, thank you!

sundaraa-deshaw commented 20 hours ago

Hi, Logs under ~/.tabby/events will be great. I guess it does not contain any event type that suggests the client information. Please let us know if we are missing any piece here. We can contribute to add this if this looks viable.

wsxiaoys commented 19 hours ago

offline discussed with @sundaraa-deshaw and filed https://github.com/TabbyML/tabby/issues/2581 to track the FR.