The only tool you need to know what is happening and how to fix it.
Go alertingexception-trackerissue-trackinglogsmetricsmonitoringobservability-platformopen-telemetryotelsession-replaytelemetrytraces
import"./DsnmJJEf.js";import{p as Zt,b as Xt,g as t,j,l as D,e as Y,h as b,u,r as x,o as E,d as M,a as jt,aa as ut,f as zt,m as S,q as P,v as Rt,i as ke,c as Me}from"./BKFspo1J.js";import{i as nt}from"./COK9M2N0.js";import{e as gt,i as vt}from"./DpeZtIXD.js";import{b as rt,s as f}from"./DwMHXN8q.js";import{p as U,b as $t}from"./CARHnQ8P.js";import{i as te,l as ee}from"./DL0LKnr3.js";import{c as St,d as Te,a as ne,m as De,u as Se}from"./I2V_l3DK.js";import{S as ze}from"./8zLz30Kn.js";import{f as Re}from"./DbaB4N6s.js";import{a as Ae,g as Ce,f as Ee}from"./CMVNIlr1.js";import{g as Oe}from"./qSFdVk7G.js";class qt extends Map{constructor(n,l=Le){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:l}}),n!=null)for(const[s,i]of n)this.set(s,i)}get(n){return super.get(Kt(this,n))}has(n){return super.has(Kt(this,n))}set(n,l){return super.set(Ve(this,n),l)}delete(n){return super.delete(Ie(this,n))}}function Kt({_intern:r,_key:n},l){const s=n(l);return r.has(s)?r.get(s):l}function Ve({_intern:r,_key:n},l){const s=n(l);return r.has(s)?r.get(s):(r.set(s,l),l)}function Ie({_intern:r,_key:n},l){const s=n(l);return r.has(s)&&(l=r.get(s),r.delete(s)),l}function Le(r){return r!==null&&typeof r=="object"?r.valueOf():r}function Fe(r,n,l){r=+r,n=+n,l=(i=arguments.length)<2?(n=r,r=0,1):i<3?1:+l;for(var s=-1,i=Math.max(0,Math.ceil((n-r)/l))|0,a=new Array(i);++s<i;)a[s]=r+s*l;return a}const Jt=Symbol("implicit");function re(){var r=new qt,n=[],l=[],s=Jt;function i(a){let m=r.get(a);if(m===void 0){if(s!==Jt)return s;r.set(a,m=n.push(a)-1)}return l[m%l.length]}return i.domain=function(a){if(!arguments.length)return n.slice();n=[],r=new qt;for(const m of a)r.has(m)||r.set(m,n.push(m)-1);return i},i.range=function(a){return arguments.length?(l=Array.from(a),i):l.slice()},i.unknown=function(a){return arguments.length?(s=a,i):s},i.copy=function(){return re(n,l).unknown(s)},te.apply(i,arguments),i}function ae(){var r=re().unknown(void 0),n=r.domain,l=r.range,s=0,i=1,a,m,g=!1,T=0,z=0,O=.5;delete r.unknown;function p(){var d=n().length,X=i<s,V=X?i:s,I=X?s:i;a=(I-V)/Math.max(1,d-T+z*2),g&&(a=Math.floor(a)),V+=(I-V-a*(d-T))*O,m=a*(1-T),g&&(V=Math.round(V),m=Math.round(m));var _=Fe(d).map(function(q){return V+a*q});return l(X?_.reverse():_)}return r.domain=function(d){return arguments.length?(n(d),p()):n()},r.range=function(d){return arguments.length?([s,i]=d,s=+s,i=+i,p()):[s,i]},r.rangeRound=function(d){return[s,i]=d,s=+s,i=+i,g=!0,p()},r.bandwidth=function(){return m},r.step=function(){return a},r.round=function(d){return arguments.length?(g=!!d,p()):g},r.padding=function(d){return arguments.length?(T=Math.min(1,z=+d),p()):T},r.paddingInner=function(d){return arguments.length?(T=Math.min(1,d),p()):T},r.paddingOuter=function(d){return arguments.length?(z=+d,p()):z},r.align=function(d){return arguments.length?(O=Math.max(0,Math.min(1,d)),p()):O},r.copy=function(){return ae(n(),[s,i]).round(g).paddingInner(T).paddingOuter(z).align(O)},te.apply(p(),arguments)}function Qt(r,n){if((m=r.length)>1)for(var l=1,s,i,a=r[n[0]],m,g=a.length;l<m;++l)for(i=a,a=r[n[l]],s=0;s<g;++s)a[s][1]+=a[s][0]=isNaN(i[s][1])?i[s][0]:i[s][1]}function Bt(r){for(var n=r.length,l=new Array(n);--n>=0;)l[n]=n;return l}function Ne(r,n){return r[n]}function Xe(r){const n=[];return n.key=r,n}function Be(){var r=St([]),n=Bt,l=Qt,s=Ne;function i(a){var m=Array.from(r.apply(this,arguments),Xe),g,T=m.length,z=-1,O;for(const p of a)for(g=0,++z;g<T;++g)(m[g][z]=[0,+s(p,m[g].key,z,a)]).data=p;for(g=0,O=Te(n(m));g<T;++g)m[O[g]].index=g;return l(m,O),m}return i.keys=function(a){return arguments.length?(r=typeof a=="function"?a:St(Array.from(a)),i):r},i.value=function(a){return arguments.length?(s=typeof a=="function"?a:St(+a),i):s},i.order=function(a){return arguments.length?(n=a==null?Bt:typeof a=="function"?a:St(Array.from(a)),i):n},i.offset=function(a){return arguments.length?(l=a??Qt,i):l},i}function He(r){return Bt(r).reverse()}var We=ut('<rect fill-opacity="0.85" rx="3" ry="3"></rect><text text-anchor="end" dominant-baseline="middle" fill="currentColor" class="text-muted-foreground" font-size="11" style="cursor: default;"> </text><text text-anchor="start" dominant-baseline="middle" fill="currentColor" class="text-foreground" font-size="11" font-weight="500" style="cursor: default;"> </text>',1),Ge=Y('<div class="pointer-events-none absolute z-10 rounded border border-border bg-background px-2 py-1 text-xs whitespace-nowrap text-muted-foreground shadow-sm"> </div>'),Pe=ut("<svg><g></g></svg><!>",1),Ue=Y('<div class="flex h-full items-center justify-center text-sm text-muted-foreground">No data available</div>'),Ye=Y('<div class="relative w-full"><!></div>');function yn(r,n){Zt(n,!0);let l=U(n,"data",19,()=>[]),s=U(n,"height",3,220),i=U(n,"padding",19,()=>({top:10,right:70,bottom:10,left:160})),a=U(n,"unit",3,"");const m=["var(--chart-1)","var(--chart-2)","var(--chart-3)","var(--chart-4)","var(--chart-5)","hsl(280, 65%, 60%)","hsl(200, 65%, 55%)","hsl(340, 65%, 55%)"];let g=j(null),T=j(400),z=j(null);Xt(()=>{if(!t(g))return;const h=new ResizeObserver(L=>{for(const R of L)D(T,R.contentRect.width,!0)});return h.observe(t(g)),()=>h.disconnect()});const O=u(()=>Math.max(0,t(T)-i().left-i().right)),p=u(()=>Math.max(0,s()-i().top-i().bottom)),d=u(()=>[...l()].sort((h,L)=>L.value-h.value)),X=u(()=>ne(t(d),h=>h.value)??0),V=u(()=>ee().domain([0,t(X)*1.1||1]).range([0,t(O)])),I=u(()=>ae().domain(t(d).map(h=>h.endpoint)).range([0,t(p)]).padding(.25)),_=u(()=>t(I).bandwidth()),q=u(()=>t(d).length>0);function $(h){return n.formatValue?n.formatValue(h):h>=1e3?`${(h/1e3).toFixed(1)}s`:`${Math.round(h)}${a()}`}function at(h,L=22){return h.length<=L?h:h.slice(0,L-3)+"..."}function ct(h){D(z,h,!0)}function ot(){D(z,null)}var K=Ye(),yt=b(K);{var bt=h=>{var L=Pe(),R=zt(L),tt=b(R);gt(tt,21,()=>t(d),vt,(it,J,dt)=>{const H=u(()=>t(I)(t(J).endpoint)??0),st=u(()=>t(V)(t(J).value)),lt=u(()=>m[dt%m.length]),mt=u(()=>t(J).endpoint.length>22);var _t=We(),W=zt(_t);f(W,"x",0);var et=S(W);f(et,"x",-8);var Ct=b(et,!0);x(et);var ht=S(et),wt=b(ht,!0);x(ht),E((kt,Et,Ot)=>{f(W,"y",t(H)),f(W,"width",kt),f(W,"height",t(_)),f(W,"fill",t(lt)),f(et,"y",t(H)+t(_)/2),P(Ct,Et),f(ht,"x",t(st)+8),f(ht,"y",t(H)+t(_)/2),P(wt,Ot)},[()=>Math.max(0,t(st)),()=>at(t(J).endpoint),()=>$(t(J).value)]),Rt("mouseenter",et,()=>t(mt)&&ct(dt)),Rt("mouseleave",et,ot),M(it,_t)}),x(tt),x(R);var xt=S(R);{var ft=it=>{const J=u(()=>t(d)[t(z)]),dt=u(()=>(t(I)(t(J).endpoint)??0)+i().top+t(_)/2);var H=Ge(),st=b(H,!0);x(H),E(()=>{rt(H,`right: ${t(T)-i().left+8}px; top: ${t(dt)??""}px; transform: translateY(-50%);`),P(st,t(J).endpoint)}),M(it,H)};nt(xt,it=>{t(z)!==null&&it(ft)})}E(()=>{f(R,"width",t(T)),f(R,"height",s()),f(tt,"transform",`translate(${i().left??""}, ${i().top??""})`)}),M(h,L)},At=h=>{var L=Ue();M(h,L)};nt(yt,h=>{t(q)&&t(O)>0?h(bt):h(At,!1)})}x(K),$t(K,h=>D(g,h),()=>t(g)),E(()=>rt(K,`height: ${s()??""}px;`)),M(r,K),jt()}var qe=ut('<line stroke="currentColor" class="text-border" stroke-width="1" stroke-dasharray="4 4"></line>'),Ke=ut('<text text-anchor="end" dominant-baseline="middle" fill="currentColor" class="text-muted-foreground" font-size="10"> </text>'),Je=ut('<text text-anchor="end" fill="currentColor" class="text-muted-foreground" font-size="10"> </text>'),Qe=ut('<path fill-opacity="0.7" stroke-width="1"></path>'),Ze=ut('<svg><g><!><!><!><line stroke="currentColor" class="text-border" stroke-width="1"></line><line stroke="currentColor" class="text-border" stroke-width="1"></line><!></g></svg>'),je=Y('<div class="flex h-full items-center justify-center text-sm text-muted-foreground">No data in this period</div>'),$e=Y('<div class="pointer-events-none absolute top-0 bottom-0 border-x border-primary/40 bg-primary/20"><div class="absolute -top-5 left-0 -translate-x-full text-[9px] font-medium whitespace-nowrap text-primary"> </div> <div class="absolute -top-5 right-0 translate-x-full text-[9px] font-medium whitespace-nowrap text-primary"> </div></div>'),tn=Y('<div class="flex items-center gap-1.5"><span class="h-2 w-2 flex-shrink-0 rounded-full"></span> <span class="max-w-[200px] truncate"> </span> <span class="ml-auto tabular-nums"> </span></div>'),en=Y('<div class="pointer-events-none absolute z-10 -translate-x-1/2 -translate-y-full"><div class="mb-1 flex flex-col gap-0.5 rounded border border-border bg-background px-2 py-1.5 text-xs font-medium whitespace-nowrap text-foreground"></div></div>'),nn=Y('<div class="pointer-events-none absolute top-0 bottom-0 w-px bg-muted-foreground/50"></div> <!> <div class="pointer-events-none absolute bottom-0 -translate-x-1/2 translate-y-full"><div class="mt-1 rounded border border-border bg-background px-1.5 py-0.5 text-[10px] whitespace-nowrap text-muted-foreground shadow-sm"> </div></div>',1),rn=Y('<div class="flex items-center gap-1.5"><span class="h-2 w-2 flex-shrink-0 rounded-full"></span> <span class="max-w-[180px] truncate"> </span></div>'),an=Y('<div class="flex flex-wrap gap-x-4 gap-y-1 px-2 text-xs text-muted-foreground"></div>'),on=Y('<div class="flex flex-col gap-2"><div class="relative w-full select-none" role="application" aria-label="Stacked area chart with drag-to-zoom"><!> <!> <!></div> <!></div>');function bn(r,n){Zt(n,!0);let l=U(n,"endpoints",19,()=>[]),s=U(n,"series",19,()=>[]),i=U(n,"height",3,220),a=U(n,"padding",19,()=>({top:10,right:4,bottom:20,left:55})),m=U(n,"unit",3,"ms"),g=U(n,"colors",3,null),T=U(n,"showBuiltinLegend",3,!0);const z=u(Oe),O=["var(--chart-1)","var(--chart-2)","var(--chart-3)","var(--chart-4)","var(--chart-5)","var(--muted-foreground)"],p=u(()=>g()&&g().length>0?g():O);let d=j(null),X=j(300),V=j(!1),I=j(0),_=j(!1),q=j(0),$=j(0);Xt(()=>{if(!t(d))return;const e=new ResizeObserver(o=>{for(const c of o)D(X,c.contentRect.width,!0)});return e.observe(t(d)),()=>e.disconnect()});const at=u(()=>Math.max(0,t(X)-a().left-a().right)),ct=u(()=>Math.max(0,i()-a().top-a().bottom)),ot=u(()=>()=>{if(s().length===0||l().length===0)return[];const e=new ze;for(const o of s()){const c=o.timestamp.getTime();if(!e.has(c)){const v={timestamp:o.timestamp};for(const w of l())v[w]=0;e.set(c,v)}const y=e.get(c);y[o.endpoint]=o.value}return Array.from(e.values()).sort((o,c)=>o.timestamp.getTime()-c.timestamp.getTime())}),K=u(()=>()=>{const e=t(ot)();return e.length===0?new Date:De(e,o=>o.timestamp)??new Date}),yt=u(()=>()=>{const e=t(ot)();return e.length===0?new Date:ne(e,o=>o.timestamp)??new Date});function bt(e,o){const c=e[o];return typeof c=="number"?c:0}const At=u(()=>()=>{const e=t(ot)();if(e.length===0||l().length===0)return 0;let o=0;for(const c of e){let y=0;for(const v of l())y+=bt(c,v);o=Math.max(o,y)}return o}),h=u(()=>t(At)()*1.1||1),L=u(()=>Se().domain([t(K)(),t(yt)()]).range([0,t(at)])),R=u(()=>ee().domain([0,t(h)]).range([t(ct),0])),tt=u(()=>()=>t(R).ticks(4)),xt=u(()=>{if(!m())return null;const e=t(tt)();return e.length===0?null:Ce(e[e.length-1],m())}),ft=u(()=>()=>t(xt)?.unit??""),it=u(()=>{const e=t(tt)();return!!t(ft)()&&e.length>0&&t(R)(e[e.length-1])<12});function J(e){return t(xt)?Ee(e,t(xt).divisor):e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"k":Number.isInteger(e)?e.toString():e.toFixed(1)}const dt=u(()=>()=>{const e=t(ot)();if(e.length===0||l().length===0)return[];const c=Be().keys(l()).order(He)(e),y=Ae().x((v,w)=>t(L)(e[w].timestamp)).y0(v=>t(R)(v[0])).y1(v=>t(R)(v[1]));return c.map((v,w)=>({key:v.key,path:y(v)||"",color:t(p)[w%t(p).length]}))}),H=u(()=>t(ot)().length>0&&l().length>0);function st(){return t(I)>=a().left&&t(I)<=t(X)-a().right}function lt(e){if(t(at)<=0)return t(K)();const o=e-a().left,c=Math.max(0,Math.min(1,o/t(at))),y=t(yt)().getTime()-t(K)().getTime();return new Date(t(K)().getTime()+y*c)}const mt=u(()=>Math.max(a().left,Math.min(t(q),t($)))),_t=u(()=>Math.min(t(X)-a().right,Math.max(t(q),t($)))),W=u(()=>t(_t)-t(mt)),et=u(()=>lt(t(mt))),Ct=u(()=>lt(t(mt)+t(W)));function ht(e){const o=t(ot)();if(o.length===0)return null;const c=e.getTime();let y=null,v=1/0;for(const w of o){const G=Math.abs(w.timestamp.getTime()-c);G<v&&(v=G,y=w)}return y}const wt=u(()=>()=>t(V)?lt(t(I)):null),kt=u(()=>()=>{const e=t(wt)();return e?ht(e):null});function Et(e){return n.formatValue?n.formatValue(e):Number.isInteger(e)?e.toString():Math.abs(e)<.01?e.toFixed(4):Math.abs(e)<1?e.toFixed(2):Math.abs(e)<10?e.toFixed(1):Math.round(e).toString()}function Ot(e){if(!t(d))return;const o=t(d).getBoundingClientRect();D(I,e.clientX-o.left),t(_)&&D($,t(I),!0)}function oe(){D(V,!0)}function ie(){D(V,!1),t(_)&&D(_,!1)}function se(e){if(!t(d)||e.button!==0)return;const o=t(d).getBoundingClientRect(),c=e.clientX-o.left;c<a().left||c>o.width-a().right||(D(_,!0),D(q,c),D($,c),e.preventDefault())}function le(){if(t(_)&&(D(_,!1),t(W)>10&&n.onRangeSelect)){const e=lt(Math.min(t(q),t($))),o=lt(Math.max(t(q),t($)));n.onRangeSelect(e,o)}}function Ht(e){e.key==="Escape"&&t(_)&&(D(_,!1),D(q,0),D($,0))}Xt(()=>{if(t(_))return window.addEventListener("keydown",Ht),()=>window.removeEventListener("keydown",Ht)});function Vt(e){return e?Re(e,{timezone:t(z),format:"time"}):""}function ue(e){const o=l().indexOf(e);return o===-1?t(p)[t(p).length-1]:t(p)[o%t(p).length]}function Wt(e,o=30){return e.length<=o?e:e.slice(0,o-3)+"..."}var It=on(),Q=b(It);Q.__mousemove=Ot,Q.__mousedown=se,Q.__mouseup=le;var Gt=b(Q);{var ce=e=>{var o=Ze(),c=b(o),y=b(c);gt(y,17,()=>t(tt)(),vt,(C,k)=>{var F=qe();f(F,"x1",0),E((B,N)=>{f(F,"y1",B),f(F,"x2",t(at)),f(F,"y2",N)},[()=>t(R)(t(k)),()=>t(R)(t(k))]),M(C,F)});var v=S(y);gt(v,17,()=>t(tt)(),vt,(C,k,F)=>{var B=Ke();f(B,"x",-8);var N=b(B);x(B),E((Mt,Tt,Lt)=>{f(B,"y",Mt),P(N,`${Tt??""}${Lt??""}`)},[()=>t(R)(t(k)),()=>J(t(k)),()=>t(it)&&F===t(tt)().length-1?` ${t(ft)()}`:""]),M(C,B)});var w=S(v);{var G=C=>{var k=Je();f(k,"x",-8),f(k,"y",-4);var F=b(k,!0);x(k),E(B=>P(F,B),[()=>t(ft)()]),M(C,k)};nt(w,C=>{t(ft)()&&!t(it)&&C(G)})}var A=S(w);f(A,"x1",0);var Z=S(A);f(Z,"x1",0),f(Z,"y1",0),f(Z,"x2",0);var pt=S(Z);gt(pt,17,()=>t(dt)(),vt,(C,k,F,B)=>{var N=Qe();E(()=>{f(N,"d",t(k).path),f(N,"fill",t(k).color),f(N,"stroke",t(k).color)}),M(C,N)}),x(c),x(o),E(()=>{f(o,"width",t(X)),f(o,"height",i()),f(c,"transform",`translate(${a().left??""}, ${a().top??""})`),f(A,"y1",t(ct)),f(A,"x2",t(at)),f(A,"y2",t(ct)),f(Z,"y2",t(ct))}),M(e,o)},fe=e=>{var o=je();M(e,o)};nt(Gt,e=>{t(H)&&t(at)>0?e(ce):e(fe,!1)})}var Pt=S(Gt,2);{var de=e=>{var o=$e(),c=b(o),y=b(c,!0);x(c);var v=S(c,2),w=b(v,!0);x(v),x(o),E((G,A)=>{rt(o,`left: ${t(mt)??""}px; width: ${t(W)??""}px;`),P(y,G),P(w,A)},[()=>Vt(t(et)),()=>Vt(t(Ct))]),M(e,o)};nt(Pt,e=>{t(_)&&t(W)>0&&e(de)})}var me=S(Pt,2);{var he=e=>{const o=u(()=>Math.max(a().left,Math.min(t(I),t(X)-a().right))),c=u(()=>t(kt)());var y=nn(),v=zt(y),w=S(v,2);{var G=C=>{var k=en(),F=b(k);gt(F,21,l,vt,(B,N)=>{const Mt=u(()=>bt(t(c),t(N)));var Tt=Me(),Lt=zt(Tt);{var xe=Ft=>{var Nt=tn(),Ut=b(Nt),Dt=S(Ut,2),pe=b(Dt,!0);x(Dt);var Yt=S(Dt,2),ye=b(Yt);x(Yt),x(Nt),E((be,_e,we)=>{rt(Ut,`background-color: ${be??""};`),f(Dt,"title",t(N)),P(pe,_e),P(ye,`${we??""}${!n.formatValue&&m()?` ${m()}`:""}`)},[()=>ue(t(N)),()=>Wt(t(N),25),()=>Et(t(Mt))]),M(Ft,Nt)};nt(Lt,Ft=>{t(Mt)>0&&Ft(xe)})}M(B,Tt)}),x(F),x(k),E(()=>rt(k,`left: ${t(o)??""}px; top: 10px;`)),M(C,k)};nt(w,C=>{t(c)&&C(G)})}var A=S(w,2),Z=b(A),pt=b(Z,!0);x(Z),x(A),E(C=>{rt(v,`left: ${t(o)??""}px;`),rt(A,`left: ${t(o)??""}px;`),P(pt,C)},[()=>Vt(t(wt)())]),M(e,y)};nt(me,e=>{t(V)&&!t(_)&&st()&&t(kt)()&&e(he)})}x(Q),$t(Q,e=>D(d,e),()=>t(d));var ge=S(Q,2);{var ve=e=>{var o=an();gt(o,21,l,vt,(c,y,v)=>{var w=rn(),G=b(w),A=S(G,2),Z=b(A,!0);x(A),x(w),E(pt=>{rt(G,`background-color: ${t(p)[v%t(p).length]??""};`),f(A,"title",t(y)),P(Z,pt)},[()=>Wt(t(y),25)]),M(c,w)}),x(o),M(e,o)};nt(ge,e=>{t(H)&&T()&&e(ve)})}x(It),E(e=>rt(Q,`height: ${i()??""}px; cursor: ${e??""};`),[()=>t(_)?"col-resize":st()?"crosshair":"default"]),Rt("mouseenter",Q,oe),Rt("mouseleave",Q,ie),M(r,It),jt()}ke(["mousemove","mousedown","mouseup"]);export{yn as D,bn as a};