1import{r as o,M as R,B as l,U as n,j as e,F as c}from"./CZzrexQa.production.bundle.min.js";import{cc as A,cd as U,u as y,ce as p,cf as I,T as i,cg as r,L as j,a as L,ch as q,ci as w,cj as D,ck as k}from"./DeceMiF-.production.bundle.min.js";import{aa as P,l as Q,a2 as M}from"./b2Mkg01q.production.bundle.min.js";import{b as a,i as F,o as V}from"./C_cH1u9D.production.bundle.min.js";import"./9eHdvLN4.production.bundle.min.js";import{P as W}from"./CHClG9UV.production.bundle.min.js";import{u as m}from"./DvLd3evF.production.bundle.min.js";import"./DGYQp8fe.production.bundle.min.js";import"./D-90pMQ7.production.bundle.min.js";import"./CUZmxn9S.production.bundle.min.js";import"./E6csxmgU.production.bundle.min.js";import"./tkddr5kZ.production.bundle.min.js";import"./BmBjCq8D.production.bundle.min.js";import"./Dsqj8S3w.production.bundle.min.js";import"./3wIbuO__.production.bundle.min.js";import"./YCM_kEyP.production.bundle.min.js";import"./D4lvmK5r.production.bundle.min.js";import"./Y4Ob0Is8.production.bundle.min.js";import"./DGAisTA8.production.bundle.min.js";import"./kkIr59yR.production.bundle.min.js";import"./oN3AJijl.production.bundle.min.js";import"./DFn2u8qh.production.bundle.min.js";import"./Bm1LOIPR.production.bundle.min.js";import"./D0x1Z4HE.production.bundle.min.js";import"./DtpVAsok.production.bundle.min.js";import"./2mZBARql.production.bundle.min.js";import"./vhNSgALD.production.bundle.min.js";import"./DQegFpUo.production.bundle.min.js";import"./D8sKcCdJ.production.bundle.min.js";import"./CXT9N8xZ.production.bundle.min.js";import"./C_Ln3svq.production.bundle.min.js";import"./7LcJfZNO.production.bundle.min.js";import"./DWUNlcjA.production.bundle.min.js";import"./CNsPFEJO.production.bundle.min.js";import"./CiD4UJCU.production.bundle.min.js";import"./B0uEge7d.production.bundle.min.js";import"./CJIgguc4.production.bundle.min.js";import"./zzLyrqbE.production.bundle.min.js";import"./Ci_hGDFV.production.bundle.min.js";import"./DwmhJbxl.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 De=()=>{const u=o.useContext(R),S=m(A),d=m(U),T=y(),E=o.useMemo(()=>[{title:"Span With Status Error",titleInfo:"span with statusCode 2",columns:[p.TOTAL_REQUESTS],resourceName:"error_count",subInfo:"",badgeOptions:{type:a.Error},filter:l.Equal(i.STATUS_CODE,r.ERROR_STATUS_CODE)},{title:"Span With Status Ok | Unset",titleInfo:"span with statusCode 0 or 1",columns:[p.TOTAL_REQUESTS],resourceName:"success_count",subInfo:"",badgeOptions:{type:a.Success},filter:l.In(i.STATUS_CODE,[r.SUCCESS_STATUS_CODE,r.UNSET_STATUS_CODE])},{title:"Span Count",titleInfo:"span count",columns:[p.TOTAL_REQUESTS],resourceName:"total_requests",subInfo:"",badgeOptions:{type:a.Connect}},{title:"Avg Response Time",titleInfo:"avg response time",columns:[I.AVG_RESPONSE_TIME_NS],resourceName:"avg_response_time_ns",subInfo:"",badgeOptions:{type:a.Success}}],[S,d]),[_,C]=j("apm-spans-quick-stats-expanded",!1),[f,x]=o.useState(!1),g=o.useCallback(()=>x(!0),[]),[h,b]=o.useState(!1),[s,v]=o.useState(),O=o.useMemo(()=>s?{total_requests:n(s.totalRequests)??"0",error_count:n(s.errorCount)??"0",success_count:n(s.successCount)??"0",avg_response_time_ns:F(s.avgResponseTimeMs,s.responseTimeTpl??V)}:{},[s]);return T(W.Traces)?e.jsxs("div",{className:"apm-spans",children:[e.jsx("div",{className:"header-view",children:e.jsx(q,{placeholder:"Search by name, tag, label or annotation",regexSearch:"spanName"})}),e.jsx("div",{className:"apm-body-wrapper",children:e.jsxs(w,{uniqName:"span-list-quick-stats",disableSampling:h,onAggregatesChange:v,children:[e.jsxs(P,{title:"Quick Stats (Requests, Error and Latency)",defaultExpanded:_,handleSectionExpand:C,children:[e.jsx("div",{className:"service-stats-wrapper",children:e.jsx("div",{className:"service-stats",children:E.map((t,N)=>e.jsx("div",{className:"overview-card",style:t.resourceName==="error_count"||t.resourceName==="success_count"?{cursor:"pointer"}:{},onClick:()=>{t.resourceName==="error_count"&&u.actions.handleApplyFilters({[i.STATUS_CODE]:{operator:c.Equal,values:[r.ERROR_STATUS_CODE]}}),t.resourceName==="success_count"&&u.actions.handleApplyFilters({[i.STATUS_CODE]:{operator:c.In,values:[r.SUCCESS_STATUS_CODE,r.UNSET_STATUS_CODE]}})},children:e.jsx(Q,{className:"overview-card",bordered:!0,title:t.title,titleInfo:t.titleInfo,infoPlacement:M.End,isLoading:!s,queryCardProps:{value:s?O[t.resourceName]??"0":void 0,error:t.badgeOptions.type===a.Error,warning:t.badgeOptions.type===a.Warning,success:t.badgeOptions.type===a.Success}})},N))})}),e.jsx(D,{isTableLoaded:f})]}),e.jsx("div",{className:"span-table",children:e.jsx(k,{showRootSpanSelection:!0,showServiceSelection:!0,enableLazyLoading:!0,disableStatsRequest:!0,quickStats:s,onTableLoaded:g,onSmallFilteredResult:b})})]})})]}):e.jsx(L,{})};export{De 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.