1import{j as e}from"./CZzrexQa.production.bundle.min.js";import{aS as o,aT as i,aU as r}from"./DeceMiF-.production.bundle.min.js";import"./DGYQp8fe.production.bundle.min.js";import"./b2Mkg01q.production.bundle.min.js";import"./D4lvmK5r.production.bundle.min.js";import"./C_cH1u9D.production.bundle.min.js";import"./DGAisTA8.production.bundle.min.js";import"./E6csxmgU.production.bundle.min.js";import"./D8sKcCdJ.production.bundle.min.js";import"./kkIr59yR.production.bundle.min.js";import"./BmBjCq8D.production.bundle.min.js";import"./CHClG9UV.production.bundle.min.js";import"./Dsqj8S3w.production.bundle.min.js";import"./3wIbuO__.production.bundle.min.js";import"./tkddr5kZ.production.bundle.min.js";import"./Bm1LOIPR.production.bundle.min.js";import"./DtpVAsok.production.bundle.min.js";import"./2mZBARql.production.bundle.min.js";import"./vhNSgALD.production.bundle.min.js";import"./YCM_kEyP.production.bundle.min.js";import"./DFn2u8qh.production.bundle.min.js";import"./DWUNlcjA.production.bundle.min.js";import"./CUZmxn9S.production.bundle.min.js";import"./9eHdvLN4.production.bundle.min.js";import"./CiD4UJCU.production.bundle.min.js";import"./DvLd3evF.production.bundle.min.js";import"./Ci_hGDFV.production.bundle.min.js";import"./DwmhJbxl.production.bundle.min.js";import"./D-90pMQ7.production.bundle.min.js";import"./B0uEge7d.production.bundle.min.js";import"./DQegFpUo.production.bundle.min.js";import"./D0x1Z4HE.production.bundle.min.js";import"./Y4Ob0Is8.production.bundle.min.js";import"./oN3AJijl.production.bundle.min.js";import"./CXT9N8xZ.production.bundle.min.js";import"./C_Ln3svq.production.bundle.min.js";import"./7LcJfZNO.production.bundle.min.js";import"./CNsPFEJO.production.bundle.min.js";import"./CJIgguc4.production.bundle.min.js";import"./zzLyrqbE.production.bundle.min.js";import"./CpVN2k6O.production.bundle.min.js";import"./B7Fri_dM.production.bundle.min.js";import"./CLBsRoPD.production.bundle.min.js";import"./Ch78CD0x.production.bundle.min.js";import"./D1TNtnEv.production.bundle.min.js";import"./DnQqxH0F.production.bundle.min.js";const n=`--- 2 3# ð APM Incident Investigation Report 4 5## Root Cause 6**This is NOT a production bug** â the \`FileNotFoundError\` is intentional test code designed to generate exceptions for APM monitoring validation. 7 8--- 9 10## Evidence 11 12### **A) Error Identity** 13- **Exception Type**: \`FileNotFoundError\` 14- **Error Message**: \`[Errno 2] No such file or directory: 'nofile.txt'\` 15- **HTTP Status**: 500 (Internal Server Error) 16 17### **B) Stack Trace Analysis** 18**Application-owned frames (root cause chain):** 19 201. **\`/flask/test.py\` line 27** in \`file_not_found()\`: 21 \`\`\`python 22 def file_not_found(): open('nofile.txt') 23 \`\`\` 24 â **PRIMARY CAUSE**: Attempts to open non-existent file 25 26### **F) Log Analysis (Critical Evidence)** 27 28**Correlated logs revealed:** 29- **2 trace-specific logs** for this exact request (INFO + ERROR) 30- **54 total ERROR logs** in the 10-minute incident window from the same service 31- **Multiple exception types** observed: 32 - \`FileNotFoundError\` (our incident) 33 - \`ZeroDivisionError\` (from \`/exception1\`) 34 35**Pattern**: Diverse, intentional exceptions from multiple test endpoints confirm this is an **APM test harness**, not a production failure. 36 37### **G) Repository Context** 38- **URL**: https://bitbucket.org/temp-mw/demo-apm-python-sanjay 39- **Type**: Demo/example code for APM Python testing 40- **Access**: Repository authentication unavailable, but stack traces in logs provide complete code context 41 42--- 43 44## Suggested Fix 45 46### **Recommended Improvements: Documentation & Safety** 47 48Since this is test code that may confuse operators when alerts fire, add clarifying documentation and safety controls: 49 50#### **1. Add Module Documentation to \`/flask/test.py\`:** 51 52\`\`\`python 53# @@file: /flask/test.py 54""" 55APM Exception Testing Module 56============================ 57This module intentionally generates various Python exceptions for testing 58Application Performance Monitoring (APM) and observability tools. 59 60â ï¸ WARNING: This code is for TESTING ONLY. Do not use in production. 61""" 62 63import random 64import os 65 66ENABLE_EXCEPTION_TESTS = os.getenv('ENABLE_EXCEPTION_TESTS', 'true').lower() == 'true' 67 68 69def file_not_found(): 70 """ 71 Intentionally raises FileNotFoundError for testing. 72 NOTE: The file 'nofile.txt' is deliberately missing - DO NOT CREATE IT. 73 """ 74 open('nofile.txt') # Intentional error for APM testing 75\`\`\` 76 77 78\`\`\`mermaid 79sequenceDiagram 80 participant Team as Agno Team 81 participant Adapter as AgnoTeamAdapter 82 participant MW as MW events/outputs 83 84 Team->>Adapter: TeamToolCallStarted (delegate_task_to_member, tool_call_id=X) 85 Adapter->>Adapter: current_delegate_tool_call_id = X 86 Team->>
86Adapter: RunOutputEvent (member, no team_id) 87 Adapter->>MW: MWTeamOutputEvent(tool_call_id=X) 88 Team->>Adapter: ... more member events ... 89 Adapter->>MW: MWTeamOutputEvent(tool_call_id=X) 90 Team->>Adapter: TeamToolCallCompleted (tool_call_id=X) 91 Adapter->>Adapter: current_delegate_tool_call_id = None 92\`\`\` 93 94--- 95 96## Summary 97 98| Attribute | Value | 99|-----------|-------| 100| **Incident Type** | Intentional test exception (not a bug) | 101| **Root Cause** | \`file_not_found()\` function designed to fail for APM testing | 102| **Service** | \`python-github-testing\` (test environment) | 103| **Impact** | None (expected behavior) | 104| **Action Required** | Optional documentation improvements only | 105| **Fix Status** | No fix needed â working as designed | 106 107### Inline chart citation (demo) 108 109Average CPU (sample): <<!!--<ref>##opsref_demo_chart_1--!!>> 110`,a={version:1,blocks:[{id:"chart-opsref_demo_chart_1",kind:"chart",citation_id:"opsref_demo_chart_1",reference_id:"opsref_demo_chart_1",title:"Sample CPU query",chart_source:"bifrost_query",tool_call_id:"tool_demo",bifrost_query:JSON.stringify({query_results:[{query_data:{series:[{name:"avg(system.cpu.utilization, value(avg))",data:[[177642315e4,4.11],[177642318e4,4.22],[177642321e4,3.85]],custom:{groups:[],metricName:"avg(system.cpu.utilization, value(avg))",config:{type:"percent",config:{precision:2,"progress-bar":!0}}}}],noDataFound:!1,timeRange:{fromTs:1776423170435,toTs:1776426770435,interval:30}},time_range:{fromTs:1776423170435,toTs:1776426770435,interval:30}}]}),tool_args:{queries:[{chartType:"time_series_chart",columns:[{aggregation_method:"avg",name:"system.cpu.utilization",rollup_method:"avg"}],filters:{},groupBy:[],resources:["host"],timeRange:{from:1776423170435,to:1776426770435}}]}}]},$=()=>{let t=`prometheus 111--log.level=info 112--log.format=logfmt 113--config.file=/etc/prometheus/prometheus.yml 114--storage.tsdb.path=/data 115--storage.tsdb.retention.time=6h`;return e.jsxs("div",{children:[e.jsx(o,{children:t}),e.jsx("h2",{children:"Script Code Block"}),e.jsx(i,{title:"Installation Script",blocks:[{code:t.split(` 116`).slice(0,2).join(` 117`),hideIndex:!0},{code:t,hideIndex:!0}]}),e.jsx("h2",{children:"Chat Parser"}),e.jsx(r,{content:n,presentation:a})]})};export{$ as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.