如何實現日常業務問題的一鍵排查?

{"type":"doc","content":[{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"背景"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在日常的開發中,我們會收到來自用戶,合作伙伴,客服,運營,產品和測試的各種各樣的問題反饋,問題諮詢,單點問題排查等,這些問題在經過若干人轉交後,大部分最終會由開發同學處理。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"而開發同學解決這些問題也相當痛苦:反覆溝通獲取必要的查詢參數,從多個平臺得到業務數據,如果沒有相關的平臺工具,那麼還會通過構建SQL, rpc服務入參,緩存key等查詢獲取所需要的業務參數,最後根據你多年對業務的理解,從這些數據中找到答案。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們可以將以上歸納爲兩個影響我們日常問題排查效率的因素:"},{"type":"text","marks":[{"type":"strong"}],"text":"問題流轉多;排查鏈路長。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/82\/82cb10a5b0968b455bacde3ce0cc95a8.png","alt":"圖片","title":"null","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"本文將介紹一種"},{"type":"text","marks":[{"type":"strong"}],"text":"提高日常業務問題排查效率的通用方案"},{"type":"text","text":",並已在閒魚應用落地,取得了不錯的效果。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"該方案具備以下特點:"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"一鍵獲取所有關聯業務數據"},{"type":"text","text":":輸入不同維度的入參,獲取一致的數據結果;"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"業務數據易於理解,人人可用"},{"type":"text","text":":可對業務數據屬性進行解釋,以方便非技術人員自助查詢;"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"業務數據可診斷"},{"type":"text","text":":如果數據出現異常,能夠給出異常的數據信息。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/5b\/5bcff89b4dddc6ada622fa24de760e69.png","alt":"圖片","title":"null","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"業務數據全景與診斷"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"整體思路"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們將問題分成2類"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"異常case問題:業務數據存在異常(數據缺失,狀態不一致等)"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"業務數據查詢:數據正常,需要諮詢相關數據(單據狀態,權益覈銷情況等)"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"通過對問題的歸納和排查過程的抽象,我們的思路就比較清晰了:"}]},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/6e\/6e54c7ef5e986f6155bdf8169377b311.png","alt":"圖片","title":"null","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"1.提供一種通用的數據聚合查詢方式,能夠依賴調用各個系統服務獲取所有關聯數據"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2.對業務數據進行語義解釋和補充"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"3.抽象業務規則集,判斷數據是否存在異常"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"此外,系統還要 具備高擴展性和接入成本低,使其他業務快速接入使用。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"整體架構如下:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/12\/1259f4872b14419d4cbfbcb0f8221493.png","alt":"圖片","title":"null","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"下面分別介紹如何實現數據全景,業務語義解釋,以及業務數據診斷。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"數據全景"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"這一部分是整個系統的基礎,後續的所有的能力都是基於聚合查詢的數據實現的。聚合查詢會調用多個系統的接口,而對於每個業務的服務依賴都不同且只能由負責該業務的開發同學完成(因爲其他人並不知道取哪些數據),如果查詢成本過高則不利於業務方的接入和使用,通用性也大打折扣。這裏我們選擇GraphQL作爲數據聚合查詢服務。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關於GraphQL的介紹:https:\/\/graphql.cn\/"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"閒魚此前有過關於GraphQL的一些實踐。通過編寫graphql語句一次性獲取所有的數據,前端根據數據直接渲染,實現快速搭建頁面。通過將業務邏輯前置,服務端只需要專注於建設穩定的域服務,使我們開發過程中免除了前後端的數據格式約定和接口聯調,提高了研發效率。很多情況下,GraphQL也可以作爲FaaS的一種解決方案。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們以閒魚回收業務爲例,該業務全鏈路涉及到 交易,資金,芝麻信用,螞蟻能量,佣金結算,和估價數據,其graphql語句簡單描述爲:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/d2\/d2e16e7462fe06b15903ccf39da2fe86.png","alt":"圖片","title":"null","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"如上圖,我們輸入訂單號bizOrderId, 通過GraphQL執行器分別依賴調用了多個系統的 訂單服務queryBizOrder,估價服務HSF_quoteService,代扣服務 HSF_agreementpayBillQuery, spu查詢服務HSF_spuQuery,結算查詢服務settleBillQuery, 並且通過Tair(分佈式緩存,類似redis)查詢了用戶的業務狀態,經過6個系統最終得到聚合數據:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/c2\/c22cd8ab1a2808fa00efbc56056ba9ed.png","alt":"圖片","title":"null","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"使用GraphQL實現業務數據的聚合查詢,業務使用成本大大降低,一般無需侵入系統即可獲取所有數據。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"業務語義轉換"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"數據轉換是將GraphQL的查詢數據轉變爲可被理解的業務數據, 包括屬性字段的中文解釋,以及對屬性值的含義解釋,以便於可視化輸出和降低非技術同學理解成本,這裏需要解決3個問題:"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"數據重分組"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"從上面的例子我們看到,“用戶信用訂單筆數”是來自於redis 這樣中間件的非特定域服務的數據, 但從業務邏輯的劃分上,這個數據應當屬於”用戶“域,因此,爲了表達更加直觀,我們將其歸爲用戶屬性"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"輸入數據的不確定性"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在很多情況下,反饋者提供的查詢入參並不總是一個維度的參數,如交易鏈路中,用戶提供的可能是 訂單id\/退款單Id\/資金單Id\/權益Id等,這些數據實際上都能一一對應, 如果只能通過訂單號查詢,那有時候就需要進行至少一次反查才能得到訂單Id後再使用工具。要實現”一鍵直達“,我們就要支持多維參數輸入,比如上面的例子,還可以通過估價Id來獲取聚合數據:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/72\/72aa2c89f0a0db251b572baa82149047.png","alt":"圖片","title":"null","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"可以看到這兩個ql返回的數據結構是不同的,但其有效的業務數據都是相同的,我們將這種數據稱爲"},{"type":"text","marks":[{"type":"strong"}],"text":"異構數據"},{"type":"text","text":"。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"異構數據統一"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"不同的輸入參數導致我們需要使用不同的GraphQL語句來表達,並得到了不同結構的返回結果,這不利於業務字段的解釋和數據規則檢查 。因此需要將多個異構數據合併爲一個確定的數據結構,作爲頁面統一展示,和後續進行數據診斷的輸入參數。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們使用JSONPath將其轉化爲統一的數據結構並對數據進行重新分組:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/81\/816bdd929084db2df3c35a6e07b71f85.png","alt":"圖片","title":"null","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"除了JSONPath,我們還實現了一些其他情況下的二次值轉換:"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"狀態值轉換:通常用於翻譯可枚舉的狀態值,如交易狀態=6 解釋爲 交易狀態=6(交易成功);"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"虛擬屬性值對:類似於宏,如定義 \"是否是高價訂單\" = eval(order.price>2000), 計算表達式的值,以補充一個原本不存在的屬性字段。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"現在,我們已經得到一個可以查詢業務全景數據的工具了。你可以使用它作爲業務數據的查詢控制檯。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"有了統一的業務數據,下一步就是實現業務數據的診斷能力。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"業務診斷"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"判斷數據是否異常,從開發角度看就是這樣的邏輯集合:"}]},{"type":"codeblock","attrs":{"lang":null},"content":[{"type":"text","text":"if(實際值!=期望值){\n print 異常結果\n}\n"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"這裏的[期望值] 是一個數據集,即表示爲:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"當 數據中出現A數據時,數據還應當有結果[B1,B2,B3]。"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們將業務邏輯細化,形成一個業務數據規則表達模型:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/7f\/7f4a2c90b5bb20c1f7625b57ef5b5a3a.png","alt":"圖片","title":"null","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"這些規則可以從業務TC用例得出,進行可視化後還能幫助新人學習業務邏輯。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們選擇QLExpress來表達並執行這個規則"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"QLExpress(https:\/\/github.com\/taobao\/qlexpress)是阿里開源的一種動態腳本引擎,功能強大,兼容java的大部分語法,可以使用關鍵字別名替換:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"codeblock","attrs":{"lang":"text"},"content":[{"type":"text","text":"如果(order.isCreditOrder == \"1\") \n則 return order.idleCreditPayAmount > 0;\n否則 return true;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"執行上面的規則代碼"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"codeblock","attrs":{"lang":null},"content":[{"type":"text","text":" \/\/defaultContext 是數據轉換後的數據,作爲qlexpress的上下文\n Object executeResult = QLExpressUtil.execute(ruleExpress, defaultContext,\n errorList, false, false);\n \/\/將執行結果轉換,空結果默認成功, 如果結果爲失敗,則再執行一次formater獲得錯誤文案\n QLExpResult qlExpResult = buildQlExpResult(context, executeResult, formater);\n if (!qlExpResult.getSuccess()) {\n errors.add(DiagnosisError\n .of(ErrorLevel.BIZ_ERROR.name(), ruleName, String.valueOf(qlExpResult.getData())));\n }"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"依次將所有的規則全部執行完後,將結果與業務結果合併展示,就得到一個帶有診斷結果的業務全景數據:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/ee\/eeef1088b5b97ad43fe560664e8740cb.png","alt":"圖片","title":"null","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"整體執行過程"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"最後,總結一下整個執行過程:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/3a\/3a3db75759150989e88bdca5097c7717.png","alt":"圖片","title":"null","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"以上就是我們實現日常業務數據全景排查與診斷的核心能力,通過提供一些頁面配置化接口,即可使多業務快速接入。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/26\/2675bb84e144f68a6a7068b1a46da87f.png","alt":"圖片","title":"null","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"應用效果對比"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"最後,我們從幾個維度對比下該工具的排查效率:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/73\/737a00878fbac29b394c76cd600670b0.png","alt":"圖片","title":"null","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"能力延伸"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"除此以外,我們還進行了更多能力的延伸,以更高效地支持日常業務運維。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"接入釘釘答疑機器人"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"你可以在度假,休息,電腦不在身邊等不方便的情況下使用手機完成這一切,更高效更快速,避免了可能會收到的分手警告~"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/c6\/c620f61391b8f4cd912863e8568785a6.png","alt":"圖片","title":"null","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"用例的自動化檢查"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"如果業務系統會與外部(合作伙伴)系統交互,將無法通過內部的回放工具來保障外部服務是否正常,我們可以基於診斷能力從數據層面驗證是否存在異常:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/08\/085d5b7f8dd11d9d30914c5ff46c2a54.png","alt":"圖片","title":"null","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"總結"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"通過對日常問題的分析歸納,排查流程的抽象,我們總結出了一個能夠提高日常單點問題的排查效率的通用方案,使其能夠服務於產品,運營,客服,研發,測試人員,業務可擴展且低成本接入,顯著降低了問題的排查成本。方案的實現主要包括:"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"使用GraphQL 實現業務數據的聚合查詢;"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"使用JSONPath 解決不同維度的異構數據和業務數據的重分組,並進行業務語義解釋;"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"使用QLExpress 表達和執行業務數據規則,完成數據的診斷。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"當然,目前還存在很多種情況無法做到一鍵排查,未來,我們還會向着實現“問題到我爲止”的目標持續優化:"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"結合日誌檢索工具,用戶行爲回放工具提供更多維度的一鍵直達;"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"對異常數據的處理,包括數據訂正,審批,指引;"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"爲客服,答疑等場景提供排查手段,引入敏感數據分級,防止數據泄露;"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"接入業務消息進行對賬&監控預警。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"本文轉載自:閒魚技術(ID:XYtech_Alibaba)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"原文鏈接:"},{"type":"link","attrs":{"href":"https:\/\/mp.weixin.qq.com\/s\/VNDCe6JQGQCSu0biGDLiwQ","title":"xxx","type":null},"content":[{"type":"text","text":"如何實現日常業務問題的一鍵排查?"}]}]}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章