feat(telemetry): add isolated beta quality diagnostics and release identity

This commit is contained in:
dadachann
2026-09-15 09:35:01 +00:00
parent 91d6de8858
commit f8123ead0a
89 changed files with 4205 additions and 175 deletions
+12 -4
View File
@@ -1,5 +1,7 @@
from __future__ import annotations
from ..telemetry import diagnostics
import asyncio
import inspect
import typing
@@ -639,6 +641,7 @@ class RuntimeConnectionHandler(handler.Handler):
avoids reserving one pooled connection across provider and network waits.
"""
diagnostics.annotate(workspace_uuid=action_context.workspace_uuid)
persistence_mgr = getattr(self.ap, 'persistence_mgr', None)
if persistence_mgr is None:
yield
@@ -687,10 +690,13 @@ class RuntimeConnectionHandler(handler.Handler):
return
if trusted_plugin_identity is not None:
safe_data['caller_plugin_identity'] = trusted_plugin_identity
async for response in _action_handler(safe_data):
yield response
async with contextlib.aclosing(_action_handler(safe_data)) as responses:
async for response in responses:
yield response
self.actions[action_name] = secured_stream_action
self.actions[action_name] = diagnostics.observe(
'api', 'host.' + action_name, source='plugin', ap=self.ap
)(secured_stream_action)
continue
async def secured_action(
@@ -719,7 +725,9 @@ class RuntimeConnectionHandler(handler.Handler):
response = await response
return response
self.actions[action_name] = secured_action
self.actions[action_name] = diagnostics.observe('api', 'host.' + action_name, source='plugin', ap=self.ap)(
secured_action
)
async def _get_plugin_setting(
self,