Skip to content

fix: telemetry fixes, audit_tool_call, export audit#116

Merged
saurabhjain1592 merged 14 commits intomainfrom
fix/telemetry-platform-version
Mar 14, 2026
Merged

fix: telemetry fixes, audit_tool_call, export audit#116
saurabhjain1592 merged 14 commits intomainfrom
fix/telemetry-platform-version

Conversation

@saurabhjain1592
Copy link
Member

Summary

  • Telemetry fixes: Arch normalization (aarch64 to arm64, x86_64 to x64), thread-safety fix (build payload inside thread), broader exception handling
  • audit_tool_call (#1260): Add audit_tool_call() method and AuditToolCallRequest/AuditToolCallResponse types
  • Export audit (#878): Export AuditSearchRequest, AuditSearchResponse, AuditLogEntry, AuditQueryOptions from __init__.py
  • Full export audit: Add 16 missing type exports

Test plan

  • pytest passes (642 tests, 22 skipped, 77.78% coverage)
  • New types importable: from axonflow import AuditToolCallRequest
  • CI green

- Call /health endpoint to detect platform version before sending
  telemetry ping (2s timeout, silent failure on any error)
- Platform version is included in the checkpoint payload when available
- endpoint parameter is no longer unused (was reserved for this purpose)
Report 'darwin' instead of 'Darwin' for consistency across SDKs.
Add TypeError and AttributeError to exception tuple so non-object
/health responses (arrays, strings) don't escape and kill the
telemetry thread before POST.
Export AuditSearchRequest, AuditSearchResponse, AuditLogEntry, and
AuditQueryOptions from the package __init__.py. The types, client
methods, and tests were already implemented but not publicly exported.
Add audit_tool_call SDK method to record non-LLM tool calls
(MCP tools, API calls, function calls) in the audit trail.
Posts to POST /api/v1/audit/tool-call with AuditToolCallRequest
and returns AuditToolCallResponse.
Add 10 missing type exports (AxonFlowConfig, ConnectorHealthStatus,
PolicyMatchInfo, ExfiltrationCheckInfo, DynamicPolicyMatch,
DynamicPolicyInfo, ConnectorPolicyInfo, FindingSeverity, FindingStatus,
Finding) to both imports and __all__ in axonflow/__init__.py.
When the SDK endpoint is localhost, 127.0.0.1, or ::1, telemetry
pings are now suppressed unless telemetry_enabled is explicitly
set to True. Prevents telemetry leaks during local development.
- Sort imports in __init__.py (I001)
- Extract string literal from ValueError (EM101)
- Narrow blind Exception catch to ValueError (BLE001)
- Move return to else block (TRY300)
- Break long Field descriptions to stay under 100 chars (E501)
@saurabhjain1592 saurabhjain1592 merged commit bb97a80 into main Mar 14, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant