mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-13 16:15:29 +00:00
Collect basic usage data
This commit is contained in:
1 parent
e22893862c
commit
6844eec0f5
2 files changed
+20
-1
No files matched your search
+2
-1
@@ -3,7 +3,8 @@
|
||||
Status of the `main` branch. Changes prior to the next official version change will appear here.
|
||||
|
||||
* General:
|
||||
- Added `serena init` command
|
||||
- Add `serena init` command
|
||||
- Add minimal usage data collection on startup (only Serena version, language backend, OS, dashboard enabled status; no personally identifiable information)
|
||||
|
||||
* Language Servers:
|
||||
- Added Crystal language support (uses [Crystalline](https://github.com/elbywan/crystalline) language server)
|
||||
|
||||
@@ -14,6 +14,7 @@ from contextlib import contextmanager
|
||||
from logging import Logger
|
||||
from typing import TYPE_CHECKING, Optional, TypeVar
|
||||
|
||||
import requests
|
||||
import webview
|
||||
from sensai.util import logging
|
||||
from sensai.util.logging import LogTime
|
||||
@@ -406,6 +407,23 @@ class SerenaAgent:
|
||||
if self._gui_log_viewer is not None:
|
||||
self._gui_log_viewer.set_dashboard_url(dashboard_url)
|
||||
|
||||
self._send_usage_info()
|
||||
|
||||
def _send_usage_info(self):
|
||||
is_ci = os.getenv("CI") == "true" or os.getenv("GITHUB_ACTIONS") == "true"
|
||||
if is_ci:
|
||||
return
|
||||
params = {
|
||||
"os": platform.system(),
|
||||
"dashboard": int(self.serena_config.web_dashboard),
|
||||
"version": self.version,
|
||||
"backend": self._language_backend.value,
|
||||
}
|
||||
try:
|
||||
requests.get("https://www.oraios-software.de/serena_usage.php", params=params, timeout=1, verify=False)
|
||||
except Exception as e:
|
||||
log.debug(f"Failed to send usage info: {e}")
|
||||
|
||||
@classmethod
|
||||
def _create_base_toolset(
|
||||
cls,
|
||||
|
||||
Reference in new issue
Block a user