本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
管道指標範例
將 Amazon Personalize 搜尋排名外掛程式套用至 OpenSearch 查詢時,您可以透過取得搜尋管道的指標來監控外掛程式。管線測量結果包括personalized_search_ranking
回應處理器失敗要求數目等統計資料。
下列程式碼顯示從中 OpenSearch傳回之管線量度的摘錄。它只會顯示包含兩個不同管線統計資料的pipelines
物件。對於每個管道,您可以在personalized_search_ranking
回應處理器清單中找到 Amazon Personalize 搜尋排名外掛程式指標。如需所有指標的完整範例,請參閱搜尋管道指標
{ .... .... "pipelines": { "pipelineA": { "request": { "count": 0, "time_in_millis": 0, "current": 0, "failed": 0 }, "response": { "count": 6, "time_in_millis": 2246, "current": 0, "failed": 0 }, "request_processors": [], "response_processors": [ { personalized_search_ranking": { "type": "personalized_search_ranking", "stats": { "count": <number of requests>, "time_in_millis": <time>, "current": 0, "failed": <number of failed requests> } } } ] }, "pipelineB": { "request": { "count": 0, "time_in_millis": 0, "current": 0, "failed": 0 }, "response": { "count": 8, "time_in_millis": 2248, "current": 0, "failed": 0 }, "request_processors": [], "response_processors": [ { "personalized_search_ranking": { "type": "personalized_search_ranking", "stats": { "count": <number of requests>, "time_in_millis": <time>, "current": 0, "failed": <number of failed requests> } } } ] } } .... .... }