mirror of
https://github.com/usestrix/strix.git
synced 2026-08-22 11:02:08 +02:00
Add Scarf telemetry alongside PostHog
Both backends share session/version/first-run helpers in strix/telemetry/_common.py and fire from the same four call sites in strix/interface/main.py and strix/report/state.py. STRIX_TELEMETRY is the single toggle for both.
This commit is contained in:
@@ -16,7 +16,7 @@ from strix.report.writer import (
|
||||
write_run_record,
|
||||
write_vulnerabilities,
|
||||
)
|
||||
from strix.telemetry import posthog
|
||||
from strix.telemetry import posthog, scarf
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -202,6 +202,7 @@ class ReportState:
|
||||
self.vulnerability_reports.append(report)
|
||||
logger.info(f"Added vulnerability report: {report_id} - {title}")
|
||||
posthog.finding(severity)
|
||||
scarf.finding(severity)
|
||||
|
||||
if self.vulnerability_found_callback:
|
||||
self.vulnerability_found_callback(report)
|
||||
@@ -254,6 +255,7 @@ class ReportState:
|
||||
logger.info("Updated scan final fields")
|
||||
self.save_run_data(mark_complete=True)
|
||||
posthog.end(self, exit_reason="finished_by_tool")
|
||||
scarf.end(self, exit_reason="finished_by_tool")
|
||||
|
||||
def set_scan_config(self, config: dict[str, Any]) -> None:
|
||||
self.scan_config = config
|
||||
|
||||
Reference in New Issue
Block a user