Add structured compiler diagnostics
This commit is contained in:
parent
0fe968c475
commit
24bd13f9d9
20 changed files with 1386 additions and 58 deletions
|
|
@ -26,6 +26,7 @@ from typing import BinaryIO, cast
|
|||
from .errors import DocForgeError
|
||||
from .index import ProjectIndex
|
||||
from .project import project_root_fingerprint
|
||||
from .telemetry import increment, stage
|
||||
from .visualization import VISUALIZATION_TEMPLATE, VisualizationIndexSnapshot
|
||||
|
||||
MANAGER_PROTOCOL = "docforge-viewer-manager@1"
|
||||
|
|
@ -635,7 +636,8 @@ class ViewerManagerClient:
|
|||
return self._lifecycle_request("stop")
|
||||
|
||||
def status(self) -> dict[str, object]:
|
||||
return self._lifecycle_request("status")
|
||||
with stage("visualization.status"):
|
||||
return self._lifecycle_request("status")
|
||||
|
||||
def _lifecycle_request(self, action: str) -> dict[str, object]:
|
||||
descriptor = self.index.project.descriptor
|
||||
|
|
@ -654,6 +656,11 @@ class ViewerManagerClient:
|
|||
}
|
||||
|
||||
def _request(self, request: dict[str, object]) -> dict[str, object]:
|
||||
increment("viewer_manager_requests")
|
||||
with stage("viewer.manager"):
|
||||
return self._request_core(request)
|
||||
|
||||
def _request_core(self, request: dict[str, object]) -> dict[str, object]:
|
||||
state = self._read_state()
|
||||
host = state["host"]
|
||||
port = state["port"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue