Commit 9ae6eba
feat(agent-reach): add LoongSuite instrumentation for Agent-Reach
Implements OpenTelemetry instrumentation for the Agent-Reach framework
(https://github.com/Panniantong/Agent-Reach) per the execute.md plan in
llm-dev/agent-reach/investigate/.
Coverage:
- ENTRY span on agent_reach.cli.main
- TOOL span on agent_reach.doctor.check_all
- TOOL span on every Channel.check override (dynamic discovery via
register_post_import_hook on agent_reach.channels)
- TOOL span on agent_reach.probe.probe_command
- TOOL span on agent_reach.transcribe.transcribe and transcribe_chunk
- Conditional TOOL span on agent_reach.integrations.mcp_server.create_server
(skipped when loongsuite-instrumentation-mcp is already active to
avoid duplicate spans)
Spans are produced via opentelemetry-util-genai's ExtendedTelemetryHandler
(entry/execute_tool context managers). Sensitive content
(gen_ai.tool.call.arguments / .result) is gated behind
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT plus the experimental
semconv opt-in, matching the util-genai contract.
Custom metrics (agent_reach_channel_status, agent_reach_probe_total,
agent_reach_probe_duration_seconds) record channel health and probe
outcomes; generic request/error/duration metrics are derived by the
backend from span data.
All 7 unit tests pass; ruff lint clean.
Co-authored-by: multica-agent <github@multica.ai>1 parent 01bba83 commit 9ae6eba
12 files changed
Lines changed: 1674 additions & 0 deletions
File tree
- instrumentation-loongsuite/loongsuite-instrumentation-agent-reach
- src/opentelemetry/instrumentation/agent_reach
- tests
Lines changed: 44 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
Lines changed: 66 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
0 commit comments