@odigos/ui-kit 0.0.244 → 0.0.246
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/lib/chunks/helpers-BFZzc68M.js +19 -0
- package/lib/chunks/index-BrSebk-Z.js +155 -0
- package/lib/chunks/source-instrument-form-context-n8N3zC_-.js +1 -0
- package/lib/chunks/ui-components-DNrEjxrR.js +1635 -0
- package/lib/components/_v2/cards/section-card/index.d.ts +3 -1
- package/lib/components/_v2/input-table/dynamic-field/index.d.ts +1 -0
- package/lib/components/_v2/input-table/types.d.ts +2 -1
- package/lib/components/_v2/table/styled.d.ts +7 -1
- package/lib/components/_v2/table/table-columns/index.d.ts +2 -0
- package/lib/components/_v2/table/table-rows/index.d.ts +2 -0
- package/lib/components/_v2/typography/index.d.ts +8 -4
- package/lib/components/_v2/typography-truncatable/index.d.ts +18 -10
- package/lib/components/styled.d.ts +4 -1
- package/lib/components/v2.js +1 -1
- package/lib/components.js +1 -1
- package/lib/constants/index.d.ts +1 -0
- package/lib/constants/regex.d.ts +40 -0
- package/lib/constants/sampling/index.d.ts +5 -0
- package/lib/constants.js +1 -1
- package/lib/containers/_v2/_drawers/edit-source-drawer/{yaml-files → debug}/index.d.ts +2 -2
- package/lib/containers/_v2/_drawers/index.d.ts +1 -0
- package/lib/containers/_v2/_drawers/regex-tester-drawer/highlighter.d.ts +20 -0
- package/lib/containers/_v2/_drawers/regex-tester-drawer/index.d.ts +13 -0
- package/lib/containers/_v2/_forms/add-action-form/custom-fields/extract-attribute/index.d.ts +5 -0
- package/lib/containers/_v2/central-connections/index.d.ts +1 -2
- package/lib/containers/_v2/overview/columns/index.d.ts +1 -2
- package/lib/containers/_v2/overview/drawers/index.d.ts +4 -1
- package/lib/containers/_v2/overview/index.d.ts +0 -2
- package/lib/containers/_v2/pipeline-collectors/index.d.ts +3 -3
- package/lib/containers/_v2/pipeline-collectors/pods-info/index.d.ts +2 -2
- package/lib/containers/_v2/sampling-rules/helpers.d.ts +2 -1
- package/lib/containers/_v2/sampling-rules/rules-table/index.d.ts +1 -2
- package/lib/containers/_v2/sampling-rules/types.d.ts +0 -2
- package/lib/containers/_v2/settings/index.d.ts +0 -1
- package/lib/containers/service-map/index.d.ts +0 -1
- package/lib/containers/v2.js +255 -126
- package/lib/containers.js +7 -4
- package/lib/contexts/rule-form-context.d.ts +13 -4
- package/lib/contexts.js +1 -1
- package/lib/functions/index.d.ts +1 -0
- package/lib/functions/instrumentation-rule-source-scopes/index.d.ts +76 -0
- package/lib/functions.js +1 -1
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/useInstrumentationRuleFormData.d.ts +2 -2
- package/lib/hooks/useOverflow.d.ts +26 -0
- package/lib/hooks.js +1 -1
- package/lib/snippets/_v2/index.d.ts +1 -0
- package/lib/snippets/_v2/instrumentation-rule-form-sections/index.d.ts +1 -0
- package/lib/snippets/_v2/instrumentation-rule-form-sections/instrumentation-preview.d.ts +10 -0
- package/lib/snippets/_v2/rich-title/index.d.ts +5 -1
- package/lib/snippets/_v2/sampling-rule-form-sections/source-scope.d.ts +18 -8
- package/lib/snippets/v2.js +1 -1
- package/lib/snippets.js +2 -2
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types/actions/index.d.ts +19 -2
- package/lib/types/instrumentation-rules/index.d.ts +14 -0
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +1 -1
- package/lib/chunks/helpers-aJJ1GhqS.js +0 -19
- package/lib/chunks/index-BnOPIhIp.js +0 -149
- package/lib/chunks/source-instrument-form-context-5GXsAhJd.js +0 -1
- package/lib/chunks/ui-components-Dnqp-MQm.js +0 -1592
package/lib/containers.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useState as n,useRef as i,useCallback as a,useEffect as o}from"react";import{MarkerType as s,useNodesState as c,useEdgesState as d}from"@xyflow/react";import{N as l,D as p,E as u,g,d as h,e as m,S as y,f,h as v,i as x,F as S,j as N,k as b,l as K,m as
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useState as n,useRef as i,useCallback as a,useEffect as o}from"react";import{MarkerType as s,useNodesState as c,useEdgesState as d}from"@xyflow/react";import{N as l,D as p,E as u,g,d as h,e as m,S as y,f,h as v,i as x,F as S,j as N,k as b,l as K,m as w,n as k}from"./chunks/ui-components-DNrEjxrR.js";import{UserIcon as T,ImageErrorIcon as M,ChevronDownIcon as $,ChevronRightIcon as C}from"./icons.js";import I,{useTheme as z}from"styled-components";import{E}from"./chunks/vendor-Be0cOokr.js";import{Flow as G}from"./snippets.js";import"zustand";import"javascript-time-ago";import"prism-react-renderer";import"react-error-boundary";import"react-dom";import"virtua";const V=e=>`${u.Source}-${e}-${l.MapItem}`,D=(e,t,r)=>{const n=e.isVirtual,i=r?[T]:n?[g(e)]:t?h(t):[M],{priorotizedStatus:a}=n?{priorotizedStatus:void 0}:m(t?.conditions||[]);return{id:e.graphKey,title:e.serviceName,icons:i,isVirtual:n,status:a,aggService:e}},R=e=>!(!e||"user"!==e.serviceName||e.id.namespace||e.id.name||e.id.kind),A=({theme:e,nodes:t,aggregatedServiceMap:r})=>{const n=[],i=new Map(t.map(e=>[e.id,e]));for(const t of r){const r=V(t.graphKey),a=i.get(r);if(!a)continue;const o=a.data?.status===y.Error;for(const a of t.connections){const c=V(a.targetGraphKey);i.has(c)&&n.push({id:`${r}-to-${c}`,type:"smoothstep",source:r,target:c,data:{sourceGraphKey:t.graphKey,targetGraphKey:a.targetGraphKey},markerEnd:{type:s.ArrowClosed},style:{stroke:o?e?.colors.dark_red:e?.colors.border}})}}return n},j=e=>{const t=e.lastIndexOf("|");return-1===t?{graphKey:e,detail:""}:{graphKey:e.substring(0,t),detail:e.substring(t+1)}},O=new E,_=`${u.Source}-user-${l.MapItem}`,q={"elk.algorithm":"layered","elk.direction":"RIGHT","elk.layered.spacing.nodeNodeBetweenLayers":"150","elk.spacing.nodeNode":"120","elk.layered.nodePlacement.strategy":"NETWORK_SIMPLEX","elk.layered.spacing.edgeEdgeBetweenLayers":"30","elk.layered.spacing.edgeNodeBetweenLayers":"40"},B=I.div`
|
|
2
2
|
padding: 8px 0;
|
|
3
3
|
`,F=I.div`
|
|
4
4
|
display: flex;
|
|
@@ -23,9 +23,12 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useState
|
|
|
23
23
|
padding: 4px 0 8px;
|
|
24
24
|
`,P=({conn:r,onToggle:n,isExpanded:i})=>{const a=r.details.length>0;return e(B,{children:t(S,{$justifyContent:"space-between",$alignItems:"center",children:[e(v,{size:14,weight:500,children:r.targetServiceName}),a&&t(L,{onClick:n,children:[e(i?$:C,{size:12}),i?"hide attributes":`${r.details.length} attribute${r.details.length>1?"s":""}`]})]})})},U=({conn:t})=>{const n=z();return e(r,{children:t.details.map(t=>e(F,{children:e(v,{size:12,color:n.text.secondary,style:{flex:1},children:t.value})},t.value))})},H=({connections:i,isVirtual:a,attributes:o})=>{const[s,c]=n(new Set),d=z();if(a){const n=Object.entries(o||{});return t(r,{children:[e(v,{size:12,color:d.text.info,children:"This service is not instrumented. It was detected from client-side spans of services that communicate with it."}),n.length>0&&t(r,{children:[e(W,{style:{paddingTop:16},children:e(v,{size:11,color:d.text.info,children:"Attributes"})}),n.map(([r,n])=>t(F,{children:[e(v,{size:12,color:d.text.secondary,children:r}),e(v,{size:12,children:n})]},r))]})]})}return i.length?t(r,{children:[e(W,{children:e(v,{size:11,color:d.text.info,children:"Connected services"})}),i.map(r=>t("div",{children:[e(P,{conn:r,isExpanded:s.has(r.targetGraphKey),onToggle:()=>{return e=r.targetGraphKey,void c(t=>{const r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r});var e}}),s.has(r.targetGraphKey)&&e(U,{conn:r}),e(x,{})]},r.targetGraphKey))]}):e(v,{size:12,color:d.text.info,children:"No outgoing connections"})},X=({conn:n})=>{const i=z();return n?e(r,{children:n.details.length>0?t(r,{children:[e(W,{children:e(v,{size:11,color:i.text.info,children:"Attribute breakdown"})}),n.details.map(t=>e(F,{children:e(v,{size:12,style:{flex:1},children:t.value})},t.value))]}):e(v,{size:12,color:i.text.info,style:{padding:"8px 0"},children:"No attribute breakdown"})}):e(v,{size:12,color:i.text.info,children:"No data for this connection"})},J=({drawerState:t,aggregatedData:r,onClose:n})=>{if(!t)return null;const i=new Map(r.map(e=>[e.graphKey,e]));let a="",o="",s=null;if("node"===t.type){const r=i.get(t.graphKey);a=r?.serviceName||t.graphKey,o=r?.isVirtual?"Virtual service (uninstrumented)":"Outgoing connections",s=e(H,{connections:r?.connections||[],isVirtual:r?.isVirtual,attributes:r?.attributes})}else{const r=i.get(t.sourceKey),n=r?.connections.find(e=>e.targetGraphKey===t.targetKey);a=`${r?.serviceName||t.sourceKey} → ${n?.targetServiceName||t.targetKey}`,o="Connection details",s=e(X,{conn:n})}return e(f,{isOpen:!0,width:"420px",position:"right",header:{title:a,subTitle:o,onClose:n},children:s})},Q=I.div`
|
|
25
25
|
width: 100%;
|
|
26
|
-
|
|
26
|
+
flex: 1;
|
|
27
|
+
align-self: stretch;
|
|
28
|
+
min-height: 0;
|
|
29
|
+
height: 100%;
|
|
27
30
|
position: relative;
|
|
28
|
-
`,Y={id:{namespace:"",name:"",kind:""},serviceName:"user",markedForInstrumentation:{markedForInstrumentation:!0}},Z=`${u.Source}-`,ee=`-${l.MapItem}`,te=.15,re=({
|
|
31
|
+
`,Y={id:{namespace:"",name:"",kind:""},serviceName:"user",markedForInstrumentation:{markedForInstrumentation:!0}},Z=`${u.Source}-`,ee=`-${l.MapItem}`,te=.15,re=({serviceMap:r,onRefresh:s})=>{const g=z(),h=N(e=>e.sources),[m,y,f]=c([]),[v,x,S]=d([]),[K,w]=n(0),[k,T]=n(null),M=i([]);M.current=m;const $=i(g);$.current=g;const C=i([]),I=i([]),E=a(()=>w(e=>e+1),[]),{activeNodeId:B,setActiveNodeType:F,setActiveNodeId:L}=b();o(()=>{if(!B)return;const e=(t=B).startsWith(Z)&&t.endsWith(ee)?t.slice(Z.length,-ee.length):null;var t;e&&T({type:"node",graphKey:e})},[B]);const W=a((e,t)=>{const{sourceGraphKey:r,targetGraphKey:n}=t.data||{};r&&n&&(F(null),L(null),T({type:"edge",sourceKey:r,targetKey:n}))},[F,L]),P=a(()=>{T(null),F(null),L(null)},[F,L]),U=a((e,t)=>{const r=t.id;x(e=>e.map(e=>e.source===r||e.target===r?{...e,animated:!0,style:{...e.style,strokeWidth:2.5},labelStyle:{...e.labelStyle,opacity:1},labelBgStyle:{...e.labelBgStyle,opacity:1}}:{...e,style:{...e.style,opacity:te},labelStyle:{...e.labelStyle,opacity:te},labelBgStyle:{...e.labelBgStyle,opacity:te}}))},[x]),H=a(()=>{x(I.current)},[x]);return o(()=>{let e=!1;const t=(e=>{const t=new Map,r=new Set,n=(e,r,n=!1)=>{let i=t.get(e);return i||(i={serviceName:r,isVirtual:n,attributes:{},connectionMap:new Map},t.set(e,i)),i},i=(e,t)=>{if(t)for(const{key:r,value:n}of t)r in e||(e[r]=n)};for(const t of e){const{graphKey:e}=j(t.nodeId),a=n(e,t.serviceName);a.isVirtual=!1;for(const e of t.services){const{graphKey:t,detail:o}=j(e?.nodeId??"");e.isVirtual&&(r.add(t),i(n(t,e.serviceName,!0).attributes,e.nodeAttributes));let s=a.connectionMap.get(t);if(s||(s={targetGraphKey:t,targetServiceName:e.serviceName,totalRequests:0,lastDateTime:e.dateTime,details:[]},a.connectionMap.set(t,s)),s.totalRequests+=e.requests,e.dateTime>s.lastDateTime&&(s.lastDateTime=e.dateTime),o){const t=s.details.find(e=>e.value===o);t?(t.requests+=e.requests,e.dateTime>t.dateTime&&(t.dateTime=e.dateTime)):s.details.push({value:o,requests:e.requests,dateTime:e.dateTime})}}}const a=[...t.entries()];for(const[,{connectionMap:e}]of a)for(const[i,a]of e)t.has(i)||n(i,a.targetServiceName,r.has(i));const o=[];for(const[e,{serviceName:r,isVirtual:n,attributes:i,connectionMap:a}]of t){const t=[...a.values()];t.sort((e,t)=>e.targetGraphKey.localeCompare(t.targetGraphKey)),o.push({graphKey:e,serviceName:r,isVirtual:n,connections:t,attributes:i})}return o.sort((e,t)=>e.graphKey.localeCompare(t.graphKey)),o})(r);C.current=t;const n=(({sources:e,aggregatedServiceMap:t})=>{const r=[],n={x:0,y:0};if(t.length&&e.length)for(const i of t){const t=V(i.graphKey),a=e.find(e=>i.serviceName===e.serviceName||i.serviceName===e.id.name);r.push({id:t,type:l.MapItem,position:n,data:D(i,a,R(a)),measured:{width:80,height:80}})}else r.push({id:`${u.Source}-${l.NoData}`,type:l.NoData,position:n,data:{subTitle:p.ARE_SERVICES_INSTRUMENTED_AND_PRODUCING_TRAFFIC}});return r})({aggregatedServiceMap:t,sources:[Y].concat(h)});if(1===n.length&&n[0].id===`${u.Source}-${l.NoData}`)return y(n),x([]),void(I.current=[]);const i=new Set(M.current.map(e=>e.id)),a=new Set(n.map(e=>e.id)),o=n.some(e=>!i.has(e.id)),s=M.current.some(e=>!a.has(e.id));if(!(o||s)){const e=new Map(M.current.map(e=>[e.id,e.position]));y(n.map(t=>({...t,position:e.get(t.id)??t.position})));const r=A({theme:$.current,nodes:n,aggregatedServiceMap:t});return I.current=r,void x(r)}return(async(e,t,r={})=>{const n={id:"root",layoutOptions:{...q,...r},children:e.map(e=>({id:e.id,width:80,height:80,...e.id===_?{layoutOptions:{"elk.layered.layering.layerConstraint":"FIRST","elk.alignment":"CENTER"}}:{}})),edges:t.map(e=>({id:e.id,sources:[e.source],targets:[e.target]}))},i=await O.layout(n),a=new Map;return i.children?.forEach(e=>{a.set(e.id,{x:e.x??0,y:e.y??0})}),{nodes:e.map(e=>({...e,position:a.get(e.id)??e.position})),edges:t}})(n,A({theme:$.current,nodes:n,aggregatedServiceMap:t})).then(({nodes:t})=>{if(e)return;y(t);const r=A({theme:$.current,nodes:t,aggregatedServiceMap:C.current});I.current=r,x(r),E()}),()=>{e=!0}},[r,h]),o(()=>{if(!M.current.length)return;const e=A({theme:g,nodes:M.current,aggregatedServiceMap:C.current});I.current=e,x(e)},[g]),t(Q,{children:[e(G,{nodes:m,edges:v,onNodesChange:f,onEdgesChange:S,onEdgeClick:W,onNodeMouseEnter:U,onNodeMouseLeave:H,onRefresh:s,fitViewTrigger:K,zoomOnScroll:!0}),e(J,{drawerState:k,aggregatedData:C.current,onClose:P})]})},ne=I.div`
|
|
29
32
|
position: fixed;
|
|
30
33
|
bottom: 12px;
|
|
31
34
|
left: 12px;
|
|
@@ -34,4 +37,4 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useState
|
|
|
34
37
|
flex-direction: column-reverse;
|
|
35
38
|
gap: 6px;
|
|
36
39
|
max-width: 600px;
|
|
37
|
-
`,ie=()=>{const{notifications:t,markAsDismissed:r,markAsSeen:n}=K(),{onClickNotification:i}=
|
|
40
|
+
`,ie=()=>{const{notifications:t,markAsDismissed:r,markAsSeen:n}=K(),{onClickNotification:i}=w(),a=t.filter(({dismissed:e})=>!e);return e(ne,{children:a.map(({id:t,type:o,title:s,message:c,crdType:d,target:l},p)=>{const u=c||s;if(!u)return null;const g=a.length-p;return e(k,{status:o,message:u,action:d&&l?{label:"go to details",onClick:()=>i({id:t,crdType:d,target:l},{dismissToast:!0})}:void 0,onClose:({asSeen:e})=>(({id:e,asSeen:t})=>{r(e),t&&n(e)})({id:t,asSeen:e}),zIndex:g},`toast-${t}`)})})};export{re as ServiceMap,ie as ToastList};
|
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
import { type FC, type ReactNode } from 'react';
|
|
2
|
+
import type { AutocompleteOption } from '@/components/_v2';
|
|
2
3
|
import { type GenericFormResult } from '@/hooks/useGenericForm';
|
|
3
|
-
import { type InstrumentationRule, type InstrumentationRuleFormData, type InstrumentationRuleOption } from '@/types';
|
|
4
|
+
import { type InstrumentationRule, type InstrumentationRuleFormData, type InstrumentationRuleOption, type SourcesScopes } from '@/types';
|
|
5
|
+
type FormState = Omit<InstrumentationRuleFormData, 'sourceScopes'> & {
|
|
6
|
+
sourceScopes: SourcesScopes;
|
|
7
|
+
};
|
|
4
8
|
interface RuleFormContextValue {
|
|
5
9
|
selectedOption: InstrumentationRuleOption | null;
|
|
6
10
|
onSelectOption: (option: InstrumentationRuleOption | null) => void;
|
|
7
11
|
loadRule: (rule: InstrumentationRule) => void;
|
|
8
|
-
genericForm?: GenericFormResult<
|
|
12
|
+
genericForm?: GenericFormResult<FormState>;
|
|
9
13
|
validateFormData: () => {
|
|
10
14
|
errorMessage?: string;
|
|
11
15
|
preparedFormData: InstrumentationRuleFormData;
|
|
12
16
|
};
|
|
17
|
+
sourceOptions: AutocompleteOption[];
|
|
18
|
+
namespaceOptions: AutocompleteOption[];
|
|
13
19
|
}
|
|
14
|
-
export
|
|
20
|
+
export interface RuleFormContextProviderProps {
|
|
15
21
|
children: ReactNode;
|
|
16
|
-
|
|
22
|
+
sourceOptions?: AutocompleteOption[];
|
|
23
|
+
namespaceOptions?: AutocompleteOption[];
|
|
24
|
+
}
|
|
25
|
+
export declare const RuleFormContextProvider: FC<RuleFormContextProviderProps>;
|
|
17
26
|
export declare const useRuleFormContext: () => RuleFormContextValue;
|
|
18
27
|
export {};
|
package/lib/contexts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{A as ActionFormContextProvider,D as DataStreamFormContextProvider,a as DestinationFormContextProvider,R as RuleFormContextProvider,S as SamplingRuleFormType,b as SamplingRulesFormProvider,c as SourceEditFormContextProvider,d as SourceInstrumentFormContextProvider,u as useActionFormContext,e as useDataStreamFormContext,f as useDestinationFormContext,g as useRuleFormContext,h as useSamplingRulesFormContext,i as useSourceEditFormContext,j as useSourceInstrumentFormContext}from"./chunks/source-instrument-form-context-
|
|
1
|
+
export{A as ActionFormContextProvider,D as DataStreamFormContextProvider,a as DestinationFormContextProvider,R as RuleFormContextProvider,S as SamplingRuleFormType,b as SamplingRulesFormProvider,c as SourceEditFormContextProvider,d as SourceInstrumentFormContextProvider,u as useActionFormContext,e as useDataStreamFormContext,f as useDestinationFormContext,g as useRuleFormContext,h as useSamplingRulesFormContext,i as useSourceEditFormContext,j as useSourceInstrumentFormContext}from"./chunks/source-instrument-form-context-n8N3zC_-.js";export{O as OdigosProvider,c as checkVersionSupport,u as useOdigos}from"./chunks/helpers-BFZzc68M.js";import{jsx as r}from"react/jsx-runtime";import{useMemo as o,useContext as t,createContext as s}from"react";import"./chunks/ui-components-DNrEjxrR.js";import"styled-components";import"./icons.js";import"zustand";import"javascript-time-ago";import"./chunks/vendor-Be0cOokr.js";import"prism-react-renderer";import"react-error-boundary";import"react-dom";import"virtua";const m=s({formType:void 0}),n=({children:e,formType:t})=>{const s=o(()=>({formType:t}),[t]);return r(m.Provider,{value:s,children:e})},p=()=>t(m);export{n as StorybookProvider,p as useStorybook};
|
package/lib/functions/index.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export * from './get-virtual-service-icon';
|
|
|
41
41
|
export * from './get-workload-id';
|
|
42
42
|
export * from './get-yaml-fields-for-destination';
|
|
43
43
|
export * from './has-unhealthy-instances';
|
|
44
|
+
export * from './instrumentation-rule-source-scopes';
|
|
44
45
|
export * from './is-emtpy';
|
|
45
46
|
export * from './is-legal-k8s-label';
|
|
46
47
|
export * from './is-over-time';
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { type InstrumentationRule, type InstrumentationRuleFormData, type SourcesScopes } from '@/types';
|
|
2
|
+
/**
|
|
3
|
+
* Wire shape of an `InstrumentationRule.sourcesScopes` row.
|
|
4
|
+
*
|
|
5
|
+
* The InstrumentationRule GraphQL type uses a row-per-criterion array
|
|
6
|
+
* (`InstrumentationRuleSourcesScope[]`) instead of the spec's
|
|
7
|
+
* `{ sources, namespaces, languages }` tri-list. Each row carries at most one
|
|
8
|
+
* source/namespace identity, plus optionally one language; the server folds the
|
|
9
|
+
* array back into the spec shape when writing to the CRD.
|
|
10
|
+
*
|
|
11
|
+
* `containerName` exists in the schema but is never populated by the kit form,
|
|
12
|
+
* so it's intentionally omitted here — keep this type narrow to what we send.
|
|
13
|
+
*/
|
|
14
|
+
export interface InstrumentationRuleSourcesScopeWire {
|
|
15
|
+
workloadName?: string | null;
|
|
16
|
+
workloadKind?: string | null;
|
|
17
|
+
workloadNamespace?: string | null;
|
|
18
|
+
workloadLanguage?: string | null;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Convert the row-per-criterion wire array (as returned by the
|
|
22
|
+
* InstrumentationRule GraphQL field) into the kit's spec-shape `SourcesScopes`.
|
|
23
|
+
*
|
|
24
|
+
* Folding rules mirror `convertSourcesScopeInput` on the odigos backend:
|
|
25
|
+
* - row.workloadName OR row.workloadKind set → push to `sources`
|
|
26
|
+
* - else if row.workloadNamespace set → push to `namespaces`
|
|
27
|
+
* - row.workloadLanguage set → push to `languages`
|
|
28
|
+
*
|
|
29
|
+
* Returns `null` when the input is null/empty so callers can pass the result
|
|
30
|
+
* straight to a field typed `SourcesScopes | null`.
|
|
31
|
+
*/
|
|
32
|
+
export declare function instrumentationRuleSourceScopesFromWire(rows: InstrumentationRuleSourcesScopeWire[] | null | undefined): SourcesScopes | null;
|
|
33
|
+
/**
|
|
34
|
+
* Convert the kit's spec-shape `SourcesScopes` into the row-per-criterion wire
|
|
35
|
+
* array expected by `InstrumentationRuleInput.sourcesScopes`.
|
|
36
|
+
*
|
|
37
|
+
* Inverse of `instrumentationRuleSourceScopesFromWire`: one row per source,
|
|
38
|
+
* one per namespace, one per language. Returns `null` when the input has no
|
|
39
|
+
* non-empty dimension so the caller can omit the field on the wire (which the
|
|
40
|
+
* server treats as "match all").
|
|
41
|
+
*/
|
|
42
|
+
export declare function instrumentationRuleSourceScopesToWire(scopes: SourcesScopes | null | undefined): InstrumentationRuleSourcesScopeWire[] | null;
|
|
43
|
+
/**
|
|
44
|
+
* Wire shape of the `InstrumentationRule` payload — same as the kit's
|
|
45
|
+
* `InstrumentationRule`, but with the row-array `sourcesScopes` field instead
|
|
46
|
+
* of the kit's spec-shape `sourceScopes`. Note the spelling difference: the
|
|
47
|
+
* GraphQL field is `sourcesScopes` (sampling uses `sourceScopes`), while the
|
|
48
|
+
* kit field follows sampling's naming. The field rename is handled by the
|
|
49
|
+
* adapter helpers below.
|
|
50
|
+
*/
|
|
51
|
+
export type InstrumentationRuleWire = Omit<InstrumentationRule, 'sourceScopes'> & {
|
|
52
|
+
sourcesScopes?: InstrumentationRuleSourcesScopeWire[] | null;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Wire shape of the `InstrumentationRuleInput` mutation variable.
|
|
56
|
+
*/
|
|
57
|
+
export type InstrumentationRuleInputWire = Omit<InstrumentationRuleFormData, 'sourceScopes'> & {
|
|
58
|
+
sourcesScopes?: InstrumentationRuleSourcesScopeWire[] | null;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Adapt a GraphQL `InstrumentationRule` response into the kit's shape:
|
|
62
|
+
* folds the row-per-criterion `sourcesScopes` array into the spec-shape
|
|
63
|
+
* `sourceScopes` object, and renames the field along the way.
|
|
64
|
+
*
|
|
65
|
+
* Use this in consumer hooks at the wire boundary (typically right after
|
|
66
|
+
* `useQuery`/`useMutation` resolves) so the rest of the app — including the
|
|
67
|
+
* kit's drawers and forms — sees only the spec shape.
|
|
68
|
+
*/
|
|
69
|
+
export declare function adaptInstrumentationRuleFromWire(wire: InstrumentationRuleWire): InstrumentationRule;
|
|
70
|
+
/**
|
|
71
|
+
* Inverse of `adaptInstrumentationRuleFromWire` for mutation inputs: unfolds
|
|
72
|
+
* the spec-shape `sourceScopes` back to the row-per-criterion
|
|
73
|
+
* `sourcesScopes` wire array, and renames the field. Used when sending
|
|
74
|
+
* create/update mutations from the consumer apps.
|
|
75
|
+
*/
|
|
76
|
+
export declare function adaptInstrumentationRuleInputForWire(input: InstrumentationRuleFormData): InstrumentationRuleInputWire;
|
package/lib/functions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{fb as adaptInstrumentationRuleFromWire,fc as adaptInstrumentationRuleInputForWire,b1 as buildBadgeForDesiredStatus,fd as capitalizeFirstLetter,fe as cleanObjectEmptyStringsValues,ah as compareCondition,ff as decimalsOnly,p as deepClone,di as entityIdKey,dm as filterActions,dl as filterDestinations,aW as filterDestinationsByStream,dk as filterSources,d7 as filterSourcesByStream,fg as flattenObjectKeys,bh as formatBytes,fh as formatDuration,bR as generateId,aU as getActionIcon,e as getConditionsBooleans,bu as getContainersIcons,fi as getContainersInstrumentedCount,fj as getDeepValue,aH as getDestinationIcon,fk as getDetectedLanguageIcons,b6 as getEffectiveLanguage,bp as getEffectiveRuntimeVersion,dd as getEntityIcon,aP as getEntityId,dh as getEntityIdKey,dc as getEntityLabel,bj as getHealthBadgeLabel,fl as getIdFromSseTarget,a_ as getInstrumentationRuleIcon,fm as getMainContainerLanguage,fn as getMetricForEntity,fo as getMonitorIcon,fp as getPlatformIcon,fq as getPlatformLabel,ao as getProgrammingLanguageIcon,fr as getRecursiveValues,d as getSourceLanguageIcons,fs as getSseTargetFromId,ft as getStatusColor,ds as getStatusFromPodStatus,dg as getStatusIcon,bk as getStatusTypeFromOdigosHealth,fu as getValueForRange,g as getVirtualServiceIcon,be as getWorkloadId,aX as getYamlFieldsForDestination,fv as hasUnhealthyInstances,fw as instrumentationRuleSourceScopesFromWire,fx as instrumentationRuleSourceScopesToWire,s as isEmpty,x as isLegalK8sLabel,bN as isOverTime,fy as isStringABoolean,fz as isTimeElapsed,bo as isValidVersion,fA as mapConditions,b4 as mapDesiredStatusToConditionStatus,aV as mapDestinationFieldsForDisplay,G as mapExportedSignals,z as mapSupportedSignals,fB as numbersOnly,fC as parseBooleanFromString,fD as parseJsonStringToPrettyString,ai as prepareDestinationFormData,fE as removeEmptyValuesFromObject,C as safeJsonParse,fF as safeJsonStringify,fG as setDeepValue,fH as sleep,aY as splitCamelString,fI as stringifyNonStringValues,t as trimVersion}from"./chunks/ui-components-DNrEjxrR.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-Be0cOokr.js";import"prism-react-renderer";import"react-error-boundary";import"react-dom";import"virtua";
|
package/lib/hooks/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from './useGenericForm';
|
|
|
10
10
|
export * from './useInstrumentationRuleFormData';
|
|
11
11
|
export * from './useKeyDown';
|
|
12
12
|
export * from './useOnClickOutside';
|
|
13
|
+
export * from './useOverflow';
|
|
13
14
|
export * from './useScrollIntoViewWhen';
|
|
14
15
|
export * from './useScrollTo';
|
|
15
16
|
export * from './usePopup';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type InstrumentationRule, type InstrumentationRuleFormData } from '@/types';
|
|
2
2
|
export declare const useInstrumentationRuleFormData: () => {
|
|
3
3
|
formData: InstrumentationRuleFormData;
|
|
4
|
-
formErrors: Partial<Record<"disabled" | "conditions" | "notes" | "ruleName" | "workloads" | "instrumentationLibraries" | "codeAttributes" | "headersCollection" | "payloadCollection" | "customInstrumentations", string>>;
|
|
4
|
+
formErrors: Partial<Record<"disabled" | "conditions" | "notes" | "sourceScopes" | "ruleName" | "workloads" | "instrumentationLibraries" | "codeAttributes" | "headersCollection" | "payloadCollection" | "customInstrumentations", string>>;
|
|
5
5
|
handleFormChange: (key?: string | undefined, val?: any, obj?: InstrumentationRuleFormData | undefined) => void;
|
|
6
6
|
resetFormData: (overrideForm?: InstrumentationRuleFormData | undefined) => void;
|
|
7
7
|
validateForm: () => boolean;
|
|
8
|
-
loadFormWithDrawerItem: ({ ruleName, notes, disabled, payloadCollection, codeAttributes, headersCollection, customInstrumentations }: InstrumentationRule) => void;
|
|
8
|
+
loadFormWithDrawerItem: ({ ruleName, notes, disabled, sourceScopes, payloadCollection, codeAttributes, headersCollection, customInstrumentations }: InstrumentationRule) => void;
|
|
9
9
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type DependencyList, type RefObject } from 'react';
|
|
2
|
+
type OverflowAxis = 'horizontal' | 'vertical';
|
|
3
|
+
interface UseOverflowOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Which axis to measure. `'horizontal'` checks `scrollWidth > clientWidth` (single-line
|
|
6
|
+
* ellipsis); `'vertical'` checks `scrollHeight > clientHeight` (multi-line `-webkit-line-clamp`).
|
|
7
|
+
* Defaults to `'horizontal'`.
|
|
8
|
+
*/
|
|
9
|
+
axis?: OverflowAxis;
|
|
10
|
+
/**
|
|
11
|
+
* Re-measure whenever any of these change (e.g. the rendered text). Size changes are
|
|
12
|
+
* already covered by `ResizeObserver`, so only pass values that affect content, not layout.
|
|
13
|
+
*/
|
|
14
|
+
deps?: DependencyList;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Reports whether the referenced element's content overflows along the given axis.
|
|
18
|
+
*
|
|
19
|
+
* - Reacts to size changes via `ResizeObserver`.
|
|
20
|
+
* - Re-checks after `document.fonts.ready` because custom fonts can shift text metrics
|
|
21
|
+
* between first paint and font-ready, leading to false negatives initially.
|
|
22
|
+
* - Uses a `+1` subpixel guard so rounding doesn't report overflow when there is no
|
|
23
|
+
* visual truncation.
|
|
24
|
+
*/
|
|
25
|
+
export declare const useOverflow: <T extends HTMLElement>(ref: RefObject<T | null>, { axis, deps }?: UseOverflowOptions) => boolean;
|
|
26
|
+
export {};
|
package/lib/hooks.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{fT as IGNORE_OUTSIDE_CLICK_ATTR,fU as useActionFormData,fV as useBodyScroll,db as useClickNode,m as useClickNotification,dj as useContainerSize,bi as useCopy,fW as useDataStreamFormData,fX as useDestinationFormData,o as useGenericForm,fY as useInstrumentationRuleFormData,bM as useKeyDown,bl as useOnClickOutside,fZ as useOverflow,u as usePopup,b0 as useScrollIntoViewWhen,dO as useScrollTo,da as useSessionStorage,f_ as useSourceFormData,a$ as useTimeAgo}from"./chunks/ui-components-DNrEjxrR.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-Be0cOokr.js";import"prism-react-renderer";import"react-error-boundary";import"react-dom";import"virtua";
|
|
@@ -3,6 +3,7 @@ export * from './cancel-modal';
|
|
|
3
3
|
export * from './colored-span';
|
|
4
4
|
export * from './delete-modal';
|
|
5
5
|
export * from './dynamic-field';
|
|
6
|
+
export * from './instrumentation-rule-form-sections';
|
|
6
7
|
export * from './odigos-logo-text-by-tier';
|
|
7
8
|
export * from './rich-title';
|
|
8
9
|
export * from './sampling-rule-form-sections';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './instrumentation-preview';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { type FC } from 'react';
|
|
2
|
+
import { type InstrumentationRuleFormData, type InstrumentationRuleOption, type SourcesScopes } from '@/types';
|
|
3
|
+
export interface InstrumentationPreviewSectionProps {
|
|
4
|
+
option: InstrumentationRuleOption | null;
|
|
5
|
+
formState: Omit<InstrumentationRuleFormData, 'sourceScopes'> & {
|
|
6
|
+
sourceScopes: SourcesScopes;
|
|
7
|
+
};
|
|
8
|
+
renderAction?: () => React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const InstrumentationPreviewSection: FC<InstrumentationPreviewSectionProps>;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { ReactNode, type FC } from 'react';
|
|
2
2
|
import type { SVG } from '@/types';
|
|
3
3
|
import { type BadgeProps } from '@/components/_v2/badge';
|
|
4
|
-
import { TypographySize } from '@/components/_v2/typography';
|
|
4
|
+
import { TypographyColor, TypographySize } from '@/components/_v2/typography';
|
|
5
5
|
export interface RichTitleProps {
|
|
6
6
|
icon?: SVG;
|
|
7
7
|
iconWithWrapper?: boolean;
|
|
8
8
|
title?: string;
|
|
9
9
|
titleSize?: TypographySize;
|
|
10
|
+
titleColor?: TypographyColor;
|
|
11
|
+
titleWrap?: boolean;
|
|
10
12
|
subTitle?: string;
|
|
11
13
|
subTitleSize?: TypographySize;
|
|
14
|
+
subTitleColor?: TypographyColor;
|
|
15
|
+
subTitleWrap?: boolean;
|
|
12
16
|
tooltip?: string;
|
|
13
17
|
withCopy?: boolean;
|
|
14
18
|
badge?: BadgeProps;
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ProgrammingLanguages, type SourcesScopes } from '@/types';
|
|
3
3
|
import { type AutocompleteOption } from '@/components/_v2';
|
|
4
|
-
|
|
5
|
-
readOnly: true;
|
|
4
|
+
interface ReadOnlySourceScopeProps {
|
|
6
5
|
scopes: SourcesScopes | null;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
titleNumber?: number;
|
|
7
|
+
}
|
|
8
|
+
interface EditableSourceScopeProps {
|
|
9
|
+
scopes: SourcesScopes;
|
|
10
|
+
onChange: (next: SourcesScopes) => void;
|
|
11
11
|
sourceOptions?: AutocompleteOption[];
|
|
12
12
|
namespaceOptions?: AutocompleteOption[];
|
|
13
|
-
|
|
13
|
+
supportedLanguages?: ProgrammingLanguages[];
|
|
14
|
+
titleNumber?: number;
|
|
15
|
+
dataIdPrefix?: string;
|
|
16
|
+
slim?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export type SourceScopeSectionProps = ({
|
|
19
|
+
readOnly: true;
|
|
20
|
+
} & ReadOnlySourceScopeProps) | ({
|
|
21
|
+
readOnly?: false;
|
|
22
|
+
} & EditableSourceScopeProps);
|
|
14
23
|
export declare const SourceScopeSection: FC<SourceScopeSectionProps>;
|
|
24
|
+
export {};
|
package/lib/snippets/v2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{ba as ActionType,dr as Actions,dq as RichTitle}from"../chunks/ui-components-DNrEjxrR.js";export{C as CancelModal,j as DURATION_OPTIONS,g as DeleteModal,e as DurationErrorsSection,D as DynamicField,I as InstrumentationPreviewSection,N as NOISY_PERCENTAGE_OPTIONS,h as OdigosLogoTextByTier,O as OperationSection,b as PERCENTAGE_OPTIONS,f as PercentageSection,P as PresetWithCustomInput,R as RuleInfoSection,d as RuleTypeSection,c as SamplingPreviewSection,S as SignalsCheckboxList,a as SourceScopeSection,U as UpgradeModal,i as WIDE_DRAWER_WIDTH,W as WideDrawer,Y as YamlSectionCard}from"../chunks/index-BrSebk-Z.js";export{C as ColoredSpan,y as ColoredSpanVariant}from"../chunks/helpers-BFZzc68M.js";import"react/jsx-runtime";import"styled-components";import"../icons.js";import"zustand";import"react";import"javascript-time-ago";import"../chunks/vendor-Be0cOokr.js";import"prism-react-renderer";import"react-error-boundary";import"react-dom";import"virtua";
|
package/lib/snippets.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{memo as r,useRef as i,useEffect as n}from"react";import"./chunks/vendor-Be0cOokr.js";import d,{useTheme as s}from"styled-components";import{
|
|
1
|
+
import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{memo as r,useRef as i,useEffect as n}from"react";import"./chunks/vendor-Be0cOokr.js";import d,{useTheme as s}from"styled-components";import{ac as a,R as l,eK as c,h as p,S as m,dg as u,db as h,k as g,N as b}from"./chunks/ui-components-DNrEjxrR.js";import{Handle as x,Position as f,ReactFlowProvider as v,ReactFlow as y,Controls as w,ControlButton as N,useReactFlow as k}from"@xyflow/react";import{RefreshIcon as $}from"./icons.js";import"javascript-time-ago";import"zustand";import"prism-react-renderer";import"react-error-boundary";import"react-dom";import"virtua";const C=d(l)`
|
|
2
2
|
max-width: 300px;
|
|
3
3
|
padding: 12px;
|
|
4
4
|
border-radius: 12px;
|
|
@@ -46,4 +46,4 @@ import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{memo as r
|
|
|
46
46
|
transform: scale(1.4);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
`,
|
|
49
|
+
`,I={[b.MapItem]:z,[b.NoData]:E},L=({trigger:e})=>{const{fitView:o}=k(),t=i(!0);return n(()=>{t.current?t.current=!1:e>0&&requestAnimationFrame(()=>o(M))},[e,o]),null},O=({nodes:t,edges:r,onNodesChange:i,onEdgesChange:n,fitViewTrigger:d=0,zoomOnScroll:s=!1,onEdgeClick:a,onNodeMouseEnter:l,onNodeMouseLeave:c,onRefresh:p})=>{const{onClickNode:m}=h(),{setActiveNodeType:u,setActiveNodeId:b}=g();return o(y,{zoomOnScroll:s,nodes:t,nodeTypes:I,edges:r,onNodeClick:m,onEdgeClick:a,onNodeMouseEnter:l,onNodeMouseLeave:c,onNodesChange:i,onEdgesChange:n,onBlur:()=>{u(null),b(null)},children:[e(L,{trigger:d}),e(A,{children:e(w,{position:"bottom-right",orientation:"horizontal",showInteractive:!1,showZoom:!0,showFitView:!0,fitViewOptions:M,children:p&&e(N,{onClick:p,children:e($,{size:20})})})})]})},R=o=>e(T,{children:e(v,{children:e(O,{...o})})});export{R as Flow,z as MapItemNode,E as NoDataNode};
|
package/lib/store.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{aM as ProgressKeys,k as useActiveNodeStore,fS as useDarkMode,w as useDataStreamStore,bd as useDrawerStore,j as useEntityStore,d6 as useFilterStore,bS as useModalStore,l as useNotificationStore,aL as useProgressStore,df as useSelectedStore,dn as useSetupStore}from"./chunks/ui-components-DNrEjxrR.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-Be0cOokr.js";import"prism-react-renderer";import"react-error-boundary";import"react-dom";import"virtua";
|
package/lib/theme.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{f$ as Provider,g0 as animations,g1 as opacity,g2 as palettes}from"./chunks/ui-components-DNrEjxrR.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-Be0cOokr.js";import"prism-react-renderer";import"react-error-boundary";import"react-dom";import"virtua";
|
|
@@ -6,7 +6,8 @@ export declare enum ActionType {
|
|
|
6
6
|
DeleteAttributes = "DeleteAttribute",
|
|
7
7
|
RenameAttributes = "RenameAttribute",
|
|
8
8
|
PiiMasking = "PiiMasking",
|
|
9
|
-
URLTemplatization = "URLTemplatization"
|
|
9
|
+
URLTemplatization = "URLTemplatization",
|
|
10
|
+
ExtractAttribute = "ExtractAttribute"
|
|
10
11
|
}
|
|
11
12
|
export declare enum ActionKeyTypes {
|
|
12
13
|
CollectContainerAttributes = "collectContainerAttributes",
|
|
@@ -20,7 +21,8 @@ export declare enum ActionKeyTypes {
|
|
|
20
21
|
AttributeNamesToDelete = "attributeNamesToDelete",
|
|
21
22
|
Renames = "renames",
|
|
22
23
|
PiiCategories = "piiCategories",
|
|
23
|
-
UrlTemplatizationRulesGroups = "urlTemplatizationRulesGroups"
|
|
24
|
+
UrlTemplatizationRulesGroups = "urlTemplatizationRulesGroups",
|
|
25
|
+
ExtractAttribute = "extractAttribute"
|
|
24
26
|
}
|
|
25
27
|
export interface ActionOption {
|
|
26
28
|
type?: ActionType;
|
|
@@ -64,6 +66,7 @@ export interface ActionFields {
|
|
|
64
66
|
} | null;
|
|
65
67
|
[ActionKeyTypes.PiiCategories]?: string[] | null;
|
|
66
68
|
[ActionKeyTypes.UrlTemplatizationRulesGroups]?: UrlTemplatizationRulesGroup[] | null;
|
|
69
|
+
[ActionKeyTypes.ExtractAttribute]?: ExtractAttribute | null;
|
|
67
70
|
}
|
|
68
71
|
export declare enum K8sAttributesFrom {
|
|
69
72
|
Pod = "pod",
|
|
@@ -166,6 +169,20 @@ export interface TemplatizationWorkloadFilter {
|
|
|
166
169
|
kind?: WorkloadKind;
|
|
167
170
|
name?: string;
|
|
168
171
|
}
|
|
172
|
+
export declare enum ExtractionDataFormat {
|
|
173
|
+
JSON = "json",
|
|
174
|
+
SQL = "sql",
|
|
175
|
+
ResourcePath = "resource_path"
|
|
176
|
+
}
|
|
177
|
+
export interface Extraction {
|
|
178
|
+
targetAttributeName: string;
|
|
179
|
+
lookupKey?: string;
|
|
180
|
+
dataFormat?: ExtractionDataFormat | '';
|
|
181
|
+
regex?: string;
|
|
182
|
+
}
|
|
183
|
+
export interface ExtractAttribute {
|
|
184
|
+
extractions: Extraction[];
|
|
185
|
+
}
|
|
169
186
|
export interface UrlTemplatizationRulesGroup {
|
|
170
187
|
filterK8sNamespace?: string;
|
|
171
188
|
/** @deprecated Use workloadFilters instead. Kept for backward compatibility with existing CRs. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { WorkloadId } from '../workload';
|
|
2
|
+
import type { SourcesScopes } from '../sampling';
|
|
2
3
|
import type { Condition, ProgrammingLanguages, SVG } from '../common';
|
|
3
4
|
export declare enum InstrumentationRuleType {
|
|
4
5
|
CodeAttributes = "CodeAttributes",
|
|
@@ -15,6 +16,19 @@ export interface InstrumentationRule {
|
|
|
15
16
|
disabled: boolean;
|
|
16
17
|
mutable: boolean;
|
|
17
18
|
profileName: string;
|
|
19
|
+
/**
|
|
20
|
+
* Targets a subset of cluster sources for this rule. Empty/missing lists act as wildcards
|
|
21
|
+
* for that dimension; entries in different lists combine with AND, entries within the same
|
|
22
|
+
* list combine with OR. See PLAT-1101 for the full semantics.
|
|
23
|
+
*
|
|
24
|
+
* Replaces the legacy `workloads` field below — the server ignores `workloads` once
|
|
25
|
+
* `sourceScopes` is populated.
|
|
26
|
+
*/
|
|
27
|
+
sourceScopes?: SourcesScopes | null;
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated Use `sourceScopes` instead. The server still accepts this field on input
|
|
30
|
+
* for backwards compatibility but ignores it. Will be removed once all consumers migrate.
|
|
31
|
+
*/
|
|
18
32
|
workloads?: WorkloadId[] | null;
|
|
19
33
|
instrumentationLibraries?: {
|
|
20
34
|
language: string;
|
package/lib/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{q as ActionKeyTypes,r as ActionType,
|
|
1
|
+
export{q as ActionKeyTypes,r as ActionType,eL as AddNodeTypes,eM as AgentInjectedReason,eN as BooleanOperation,aj as CodeAttributesKeyTypes,eO as ConditionType,eP as Crud,K as CustomInstrumentationsKeyTypes,b2 as DesiredStateProgress,eQ as DestinationTypes,eR as EdgeTypes,E as EntityTypes,a7 as ExtractionDataFormat,H as FieldTypes,L as GolangCustomProbe,J as HeadersCollectionKeyTypes,dQ as InputTypes,eS as InstallationMethod,O as InstrumentationRuleType,eT as IntrumentationStatus,M as JavaCustomProbe,eU as JsonOperation,Y as K8sAttributesFrom,Q as K8sResourceKind,eV as K8sWorkloadContainerAgentConfigTracesHeadSamplingCheckConditionOperator,eW as ListDirection,N as NodeTypes,eX as NumberOperation,eY as OtelDistroName,eZ as OtherEntityTypes,b7 as OtherStatus,aI as OtherStatusType,al as PayloadCollectionKeyTypes,P as PlatformType,e_ as PodContainerLifecycleStatus,e$ as PodContainerStatus,f0 as PodPhase,f1 as Profile,br as ProgrammingLanguages,f2 as SIGNAL_KEY_TO_TYPE,f3 as SIGNAL_TYPE_TO_KEY,f4 as SignalKey,B as SignalType,f5 as SortDirection,S as StatusType,f6 as StringOperation,T as Tier,f7 as WorkloadRolloutReason,dt as WorkloadRolloutStatus}from"./chunks/ui-components-DNrEjxrR.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-Be0cOokr.js";import"prism-react-renderer";import"react-error-boundary";import"react-dom";import"virtua";
|
package/lib/visuals.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{f8 as VISUAL_ODIGOS_LOGO_HEIGHT,f9 as VISUAL_ODIGOS_LOGO_WIDTH,eI as VisualGreenRings,fa as VisualOdigosLogo,c1 as VisualPurpleRings}from"./chunks/ui-components-DNrEjxrR.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-Be0cOokr.js";import"prism-react-renderer";import"react-error-boundary";import"react-dom";import"virtua";
|
package/package.json
CHANGED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{useMemo as n,useContext as o,createContext as a,Fragment as s}from"react";import{t as i,T as u,P as l,u as c,a as p,b as d,c as f}from"./ui-components-Dnqp-MQm.js";import h from"styled-components";const m=a({platformType:l.K8s,tier:u.Community,version:"v0.0.0"}),v=({children:t,platformType:r,tier:o,version:a})=>{const s=n(()=>({platformType:r,tier:o,version:a}),[r,o,a]);return e(m.Provider,{value:s,children:t})},g=(e,t)=>!t||i(e)>=i(t),y=e=>{const t=o(m),r=g(t.version,e),n=t.platformType===l.Vm;return{...t,isVersionSupported:r,isVm:n,isEnterprise:t.tier===u.Onprem}};function x(e){return!e||!e.sources?.length&&!e.namespaces?.length&&!e.languages?.length}function k(e){return e?{sources:e.sources?[...e.sources]:[],namespaces:e.namespaces?[...e.namespaces]:[],languages:e.languages?[...e.languages]:[]}:{sources:[],namespaces:[],languages:[]}}function S(e){return null==e||0===e}function A(e){return{name:"",notes:"",disabled:!1,ruleType:"Relevance",sourceScopes:{sources:[],namespaces:[],languages:[]},operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:"",durationPreset:"500",customDurationMs:"",keepErrors:!1,percentageMode:"costReduction"===e?"sample":"all",percentagePreset:"0",customPercentage:""}}function T(e){return x(e.sourceScopes)?null:e.sourceScopes}function P(e){return T(e)}function R(e){if("all"===e.percentageMode)return null;if("custom"===e.percentagePreset){const t=parseFloat(e.customPercentage);return isNaN(t)?null:t}return parseFloat(e.percentagePreset)}function b(e){if("custom"===e.durationPreset){const t=parseFloat(e.customDurationMs);return isNaN(t)?null:t}return parseInt(e.durationPreset,10)}function M(e){return{httpServer:{[e.routeType]:e.route||null,method:e.method||null}}}function D(e){return"all"===e.operationType?null:"httpServer"===e.operationType?M(e):"httpClient"===e.operationType?{httpClient:{serverAddress:e.serverAddress||null,["route"===e.routeType?"templatedPath":"templatedPathPrefix"]:e.route||null,method:e.method||null}}:null}function I(e){return"all"===e.operationType?null:"httpServer"===e.operationType?M(e):"kafkaConsumer"===e.operationType?{kafkaConsumer:{kafkaTopic:e.kafkaTopic||null}}:"kafkaProducer"===e.operationType?{kafkaProducer:{kafkaTopic:e.kafkaTopic||null}}:null}function $(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:T(e),percentageAtMost:R(e),operation:D(e)}}function C(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:T(e),error:e.keepErrors,durationAtLeastMs:"Duration"===e.ruleType?b(e):null,percentageAtLeast:R(e),operation:I(e)}}function E(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:T(e),percentageAtMost:R(e)??0,operation:I(e)}}function w(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:P(e),operation:D(e),percentageAtMost:R(e),notes:e.notes||null}}function L(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:P(e),error:"Error"===e.ruleType,durationAtLeastMs:"Duration"===e.ruleType?b(e):null,operation:I(e),percentageAtLeast:R(e),notes:e.notes||null}}function O(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:P(e),operation:I(e),percentageAtMost:R(e)??0,notes:e.notes||null}}const N=["5000","1000","500","100","50"],H=["50","25","10","1","0.5","0.1","0"];function K(e){if(null==e)return{percentageMode:"all",percentagePreset:"0",customPercentage:""};const t=H.find(t=>Number(t)===e);return t?{percentageMode:"sample",percentagePreset:t,customPercentage:""}:{percentageMode:"sample",percentagePreset:"custom",customPercentage:String(e)}}function j(e){if(!e)return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""};const t=e;if(t.httpServer){return{operationType:"httpServer",routeType:t.httpServer.routePrefix?"routePrefix":"route",route:t.httpServer.route||t.httpServer.routePrefix||"",serverAddress:"",method:t.httpServer.method||"",kafkaTopic:""}}return t.kafkaConsumer?{operationType:"kafkaConsumer",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:t.kafkaConsumer.kafkaTopic||""}:t.kafkaProducer?{operationType:"kafkaProducer",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:t.kafkaProducer.kafkaTopic||""}:{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}}function z(e){const t=A(),r=k(e.rule.sourceScopes);const n=function(e){return"highlyRelevant"!==e.category?"Relevance":e.rule.error?"Error":null!=e.rule.durationAtLeastMs?"Duration":"Relevance"}(e);let o,a,s={durationPreset:"500",customDurationMs:""},i=!1;switch(e.category){case"noisy":o=function(e){const t=e.rule.operation;if(!t)return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""};if(t.httpServer)return{operationType:"httpServer",routeType:t.httpServer.routePrefix?"routePrefix":"route",route:t.httpServer.route||t.httpServer.routePrefix||"",serverAddress:"",method:t.httpServer.method||"",kafkaTopic:""};if(t.httpClient)return{operationType:"httpClient",routeType:t.httpClient.templatedPathPrefix?"routePrefix":"route",route:t.httpClient.templatedPath||t.httpClient.templatedPathPrefix||"",serverAddress:t.httpClient.serverAddress||"",method:t.httpClient.method||"",kafkaTopic:""};return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}}(e),a=S(u=e.rule.percentageAtMost)?{percentageMode:"all",percentagePreset:"0",customPercentage:""}:K(u);break;case"highlyRelevant":o=j(e.rule.operation),a=K(e.rule.percentageAtLeast),s=function(e){if(null==e)return{durationPreset:"500",customDurationMs:""};const t=N.find(t=>Number(t)===e);return t?{durationPreset:t,customDurationMs:""}:{durationPreset:"custom",customDurationMs:String(e)}}(e.rule.durationAtLeastMs),i=e.rule.error;break;case"costReduction":o=j(e.rule.operation),a=K(e.rule.percentageAtMost)}var u;return{...t,name:e.rule.name||"",notes:e.rule.notes||"",disabled:e.rule.disabled,ruleType:n,sourceScopes:r,...o,...s,keepErrors:i,...a}}var F;!function(e){e.Default="default",e.Action="action",e.Endpoint="endpoint",e.Scope="scope",e.Duration="duration"}(F||(F={}));const X=[F.Action,F.Endpoint,F.Scope,F.Duration],J=h.span`
|
|
2
|
-
font-family: ${({theme:e,$isMono:t})=>t?e.font_family.secondary:e.font_family.primary};
|
|
3
|
-
font-size: ${({theme:e})=>e.v2.text.size.xxs}px;
|
|
4
|
-
line-height: 20px;
|
|
5
|
-
color: ${({theme:e,$variant:t})=>{const r=e.v2.colors;switch(t){case"action":return r.green[400];case"endpoint":return r.purple[300];case"scope":return r.yellow[400];case"duration":return r.orange[600];default:return r.white[500]}}};
|
|
6
|
-
`,V=h.span`
|
|
7
|
-
display: inline;
|
|
8
|
-
cursor: help;
|
|
9
|
-
text-decoration: underline dotted;
|
|
10
|
-
text-underline-offset: 3px;
|
|
11
|
-
`,B=h.div`
|
|
12
|
-
display: flex;
|
|
13
|
-
flex-direction: column;
|
|
14
|
-
gap: 4px;
|
|
15
|
-
background-color: ${({theme:e})=>e.v2.colors.black[500]};
|
|
16
|
-
border-radius: 4px;
|
|
17
|
-
padding: 8px;
|
|
18
|
-
max-width: 300px;
|
|
19
|
-
`,W=({items:t,children:n})=>{const{popupRef:o,popupOpen:a,setPopupOpen:s,popupPosition:i,handlePosition:u}=c({positionMode:"viewport",defaultClientHeight:48,defaultClientwidth:240}),l=e=>{u(e.clientX,e.clientY),s("mouseleave"!==e.type)};return r(V,{onMouseEnter:l,onMouseMove:l,onMouseLeave:l,children:[n,e(p,{ref:o,isOpen:a,top:i.top,left:i.left,asPortal:!0,style:{backgroundColor:"transparent",border:"none"},borderRadius:"0",padding:"0",maxWidth:"300px",children:e(B,{children:t.map((t,r)=>e(d,{size:f.XXXS,children:t},r))})})]})},_=({parts:n})=>{const o=n.map(e=>({...e,text:e.text.trim()})).filter(e=>e.text.length>0);return e(t,{children:o.map((n,o)=>{const a=e(J,{$variant:n.variant,$isMono:X.includes(n.variant),children:n.text});return r(s,{children:[0!==o&&e(t,{children:" "}),n.tooltipItems?.length?e(W,{items:n.tooltipItems,children:a}):a]},`${n.variant}-${o}`)})})};var q;!function(e){e.Noisy="noisy",e.HighlyRelevant="highly-relevant",e.CostReduction="cost-reduction"}(q||(q={}));const Y=[{value:q.Noisy,label:"1. Noisy Operations",tooltip:"Rules that reduce noise from high-volume, low-value operations"},{value:q.HighlyRelevant,label:"2. Highly Relevant Operations",tooltip:"Rules that prioritize important traces for retention"},{value:q.CostReduction,label:"3. Cost Reduction",tooltip:"Rules that optimize costs by sampling less critical data"}],G={[q.Noisy]:"This is the most efficient way to sample (with Head Sampling). Prefer to use it where possible.",[q.HighlyRelevant]:'Any trace from the "Noisy Operations" category is sampled prior to checking highly relevance.',[q.CostReduction]:"Cost reduction rules use Tail Sampling to drop traces that are unlikely to be useful for debugging or monitoring."},Q={[q.Noisy]:"Noisy Operations rules list",[q.HighlyRelevant]:"Highly Relevant Operations rules list",[q.CostReduction]:"Cost Reduction rules list"},U={[q.Noisy]:"noisy",[q.HighlyRelevant]:"highlyRelevant",[q.CostReduction]:"costReduction"};function Z(e){const t=e.kind?String(e.kind).toLowerCase():"deployment";return e.namespace&&e.name?`${t} '${e.name}' in namespace '${e.namespace}'`:e.name?`${t} '${e.name}'`:e.namespace?`any service in namespace '${e.namespace}'`:""}function ee(e){return`any service in namespace '${e}'`}function te(e){return`${e} services`}function re(e){const t=function(e){if(!e)return[];const t=[];for(const r of e.sources??[]){const e=Z(r);e&&t.push(e)}for(const r of e.namespaces??[])r&&t.push(ee(r));for(const r of e.languages??[])r&&t.push(te(r));return t}(e);if(!t.length)return[{text:" in ",variant:F.Default},{text:"any service in the cluster",variant:F.Scope}];const r=[{text:" in ",variant:F.Default}],n=t.slice(0,2),o=t.slice(2);return n.forEach((e,t)=>{t>0&&r.push({text:", ",variant:F.Default}),r.push({text:e,variant:F.Scope})}),o.length>0&&r.push({text:` + ${o.length} more`,variant:F.Default,tooltipItems:o}),r}function ne(e,t){const r=(n=e).startsWith("/")?n.slice(1):n;var n;return t?`${t} /${r}`:`/${r}`}function oe(e){const t=e.method;return e.route?[{text:" for server endpoint ",variant:F.Default},{text:ne(e.route,t),variant:F.Endpoint}]:e.routePrefix?[{text:" for endpoints under ",variant:F.Default},{text:ne(e.routePrefix,t),variant:F.Endpoint}]:[]}function ae(e){const t=[];if(S(e.percentageAtMost)?t.push({text:"Drop all traces",variant:F.Action}):(t.push({text:`Keep at most ${e.percentageAtMost}%`,variant:F.Action}),t.push({text:" of traces",variant:F.Default})),e.operation){const r=e.operation.httpServer,n=r?function(e){const t=e.method;return e.route?[{text:" where the root span is ",variant:F.Default},{text:ne(e.route,t),variant:F.Endpoint}]:e.routePrefix?[{text:" where the root span is under ",variant:F.Default},{text:ne(e.routePrefix,t),variant:F.Endpoint}]:[]}(r):[];n.length>0&&t.push(...n);const o=e.operation.httpClient,a=o?.templatedPath||o?.templatedPathPrefix,s=o?.serverAddress;if((a||s)&&0===n.length){const e=o?.method,r=a&&s?`${s}/${a}`:a||s;t.push({text:" to ",variant:F.Default}),e?t.push({text:`${e} /${r}`,variant:F.Endpoint}):t.push({text:`/${r}`,variant:F.Endpoint})}}else t.push({text:" on ",variant:F.Default}),t.push({text:"any operation",variant:F.Endpoint});return t.push(...re(e.sourceScopes)),t}function se(e){const t=[];if(null!=e.percentageAtLeast?(t.push({text:`Keep ${e.percentageAtLeast}%`,variant:F.Action}),t.push({text:" of traces",variant:F.Default})):t.push({text:"Keep all traces",variant:F.Action}),e.operation){const r=e.operation.httpServer;r&&t.push(...oe(r))}else t.push({text:" on ",variant:F.Default}),t.push({text:"any operation",variant:F.Endpoint});return t.push(...re(e.sourceScopes)),!e.error&&null!=e.durationAtLeastMs&&e.durationAtLeastMs>0&&(t.push({text:" with duration > ",variant:F.Default}),t.push({text:`${e.durationAtLeastMs}ms`,variant:F.Duration})),t}function ie(e){const t=[];if(t.push({text:`Keep at most ${e.percentageAtMost}%`,variant:F.Action}),t.push({text:" of traces",variant:F.Default}),e.operation){const r=e.operation.httpServer,n=r?oe(r):[];n.length>0&&t.push(...n);const o=e.operation.kafkaConsumer?.kafkaTopic;o&&0===n.length&&(t.push({text:" from ",variant:F.Default}),t.push({text:`topic '${o}'`,variant:F.Endpoint}))}else t.push({text:" on ",variant:F.Default}),t.push({text:"any operation",variant:F.Endpoint});return t.push(...re(e.sourceScopes)),t}function ue(e){return e.error?"Error":null!=e.durationAtLeastMs?"Duration":"Relevance"}function le(e,t,r){const n=U[t],o=[];for(const a of e)switch(t){case q.Noisy:for(const e of a.noisyOperations)r?.has(e.ruleId)||o.push({ruleId:e.ruleId,samplingId:a.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:ae(e),category:n});break;case q.HighlyRelevant:for(const e of a.highlyRelevantOperations)r?.has(e.ruleId)||o.push({ruleId:e.ruleId,samplingId:a.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:se(e),category:n,typeBadge:ue(e)});break;case q.CostReduction:for(const e of a.costReductionRules)r?.has(e.ruleId)||o.push({ruleId:e.ruleId,samplingId:a.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:ie(e),category:n})}return o}function ce(e,t){switch(e){case"noisy":return ae(t);case"highlyRelevant":return se(t);case"costReduction":return ie(t)}}function pe(e,t,r,n){for(const o of e)if(o.id===t)switch(n){case"noisy":{const e=o.noisyOperations.find(e=>e.ruleId===r);if(e)return{category:"noisy",samplingId:o.id,rule:e};break}case"highlyRelevant":{const e=o.highlyRelevantOperations.find(e=>e.ruleId===r);if(e)return{category:"highlyRelevant",samplingId:o.id,rule:e};break}case"costReduction":{const e=o.costReductionRules.find(e=>e.ruleId===r);if(e)return{category:"costReduction",samplingId:o.id,rule:e};break}}return null}function de(e,t){const r=pe(e,t.samplingId,t.rule.ruleId,t.category);return r?{...r,summary:ce(r.category,r.rule)}:null}function fe(e,t){const r=pe(e,t.samplingId,t.ruleId,t.category);return r?{...r,summary:ce(r.category,r.rule)}:null}function he(e){if(!e)return null;const t=(e.sources??[]).map(e=>`${e.namespace}/${e.kind}/${e.name}`).sort(),r=(e.namespaces??[]).slice().sort(),n=(e.languages??[]).slice().sort();return t.length||r.length||n.length?[t.join("|"),r.join("|"),n.join("|")].join("::"):null}function me(e){return null==e?null:e}function ve(e,t){return JSON.stringify({sourceScopes:he(e),operation:me(t)})}function ge(e,t,r,n){return JSON.stringify({sourceScopes:he(e),error:t??!1,durationAtLeastMs:(o=r,null==o?null:o),operation:me(n)});var o}function ye(e,t){return JSON.stringify({sourceScopes:he(e),operation:me(t)})}function xe(e,t,r,n){switch(t){case"noisy":{const t=ve(r.sourceScopes,r.operation);for(const r of e)for(const e of r.noisyOperations)if((!n||e.ruleId!==n)&&ve(e.sourceScopes,e.operation)===t)return e.ruleId;return null}case"highlyRelevant":{const t=ge(r.sourceScopes,r.error,r.durationAtLeastMs,r.operation);for(const r of e)for(const e of r.highlyRelevantOperations)if((!n||e.ruleId!==n)&&ge(e.sourceScopes,e.error,e.durationAtLeastMs,e.operation)===t)return e.ruleId;return null}case"costReduction":{const t=ye(r.sourceScopes,r.operation);for(const r of e)for(const e of r.costReductionRules)if((!n||e.ruleId!==n)&&ye(e.sourceScopes,e.operation)===t)return e.ruleId;return null}}}function ke(e){if(!e||!e.enabled)return[{text:"Auto rule is ",variant:F.Default},{text:"disabled",variant:F.Action}];return[{text:`Keep ${e.keepPercentage??0}%`,variant:F.Action},{text:" of ",variant:F.Default},{text:"traces for kubelet health probes in the entire cluster",variant:F.Scope}]}function Se(e){return!0===e.error&&x(e.sourceScopes)&&!e.operation&&(null==e.percentageAtLeast||100===e.percentageAtLeast)}function Ae(e){for(const t of e){const e=t.highlyRelevantOperations.find(Se);if(e)return{rule:e,samplingId:t.id}}return null}function Te(e){return!e||e.disabled?[{text:"Auto rule is ",variant:F.Default},{text:"disabled",variant:F.Action}]:[{text:"Keep all traces",variant:F.Action},{text:" of ",variant:F.Default},{text:"error traces across the entire cluster",variant:F.Scope}]}function Pe(e){return x(e.sourceScopes)&&!e.operation}function Re(e){for(const t of e){const e=t.costReductionRules.find(Pe);if(e)return{rule:e,samplingId:t.id}}return null}function be(e){return!e||e.disabled?[{text:" is ",variant:F.Default},{text:"disabled",variant:F.Action}]:[{text:`Keep at most ${e.percentageAtMost}%`,variant:F.Action},{text:" of ",variant:F.Default},{text:"traces across the entire cluster",variant:F.Scope}]}export{ae as A,E as B,_ as C,C as D,$ as E,x as F,v as O,q as S,be as a,Te as b,g as c,ke as d,Re as e,Ae as f,A as g,le as h,O as i,L as j,w as k,fe as l,ce as m,k as n,U as o,xe as p,Y as q,de as r,G as s,Q as t,y as u,z as v,S as w,F as x,ie as y,se as z};
|