@odigos/ui-kit 0.0.233 → 0.0.234
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 +7 -0
- package/lib/chunks/{index-BaKzgedB.js → index-Coer-PRZ.js} +1 -1
- package/lib/chunks/{index-Di5tcvgi.js → index-EPaudVws.js} +7 -7
- package/lib/chunks/{index-D65aqUr3.js → index-eOSrP07c.js} +1 -1
- package/lib/chunks/ui-components-BogDd0Qc.js +2696 -0
- package/lib/components/v2.js +1 -1
- package/lib/components.js +1 -1
- package/lib/constants.js +1 -1
- package/lib/containers/v2.js +2 -2
- package/lib/containers.js +4 -4
- package/lib/contexts.js +1 -1
- package/lib/functions.js +1 -1
- package/lib/hooks.js +1 -1
- package/lib/icons/destinations/index.d.ts +1 -0
- package/lib/icons/destinations/pyroscope-logo/index.d.ts +2 -0
- package/lib/icons.js +1 -1
- package/lib/snippets/v2.js +1 -1
- package/lib/snippets.js +1 -1
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types/destinations/index.d.ts +6 -1
- package/lib/types/signals/index.d.ts +4 -2
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +1 -1
- package/lib/chunks/ui-components-DD1EWBzE.js +0 -2696
package/lib/components/v2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{gk as Autocomplete,x as Badge,m as Button,B as ButtonSize,hB as ButtonTab,hC as ButtonTabList,a as ButtonVariants,cn as Checkbox,hD as CheckboxList,eL as CheckboxSize,eR as CliCommand,hE as Condition,c_ as Conditions,hF as DEFAULT_TIME_UNITS,D as DataCard,c4 as Drawer,di as DropData,dk as DropDataAlignX,dj as DropDataAlignY,cP as DropDown,co as FieldMessage,cm as FieldTitle,eU as GaugeChart,hG as GaugeChartVariant,hH as Header,_ as HoverActions,cQ as IconButton,cf as IconButtonSize,cp as Input,cr as InputList,cq as InputTable,eJ as Island,L as Loader,eC as Modal,hI as Navbar,N as NoData,cw as Note,e5 as Radio,hJ as RadioGroup,e6 as RadioSize,w as Search,cL as SectionCard,hK as SectionCardSize,S as Segment,s as SegmentSize,r as SegmentVariant,eT as StatusCard,eK as Stepper,t as Table,v as TableVariant,c$ as Tag,cu as TextArea,eV as TextCard,fs as TimeInput,j as Toggle,l as ToggleLabelAlign,hL as ToggleList,k as ToggleSize,hM as ToggleVariant,eM as TruncatableTypography,n as Typography,o as TypographyColor,p as TypographySize,cT as TypographyVariants,cA as WarningModal}from"../chunks/ui-components-
|
|
1
|
+
export{gk as Autocomplete,x as Badge,m as Button,B as ButtonSize,hB as ButtonTab,hC as ButtonTabList,a as ButtonVariants,cn as Checkbox,hD as CheckboxList,eL as CheckboxSize,eR as CliCommand,hE as Condition,c_ as Conditions,hF as DEFAULT_TIME_UNITS,D as DataCard,c4 as Drawer,di as DropData,dk as DropDataAlignX,dj as DropDataAlignY,cP as DropDown,co as FieldMessage,cm as FieldTitle,eU as GaugeChart,hG as GaugeChartVariant,hH as Header,_ as HoverActions,cQ as IconButton,cf as IconButtonSize,cp as Input,cr as InputList,cq as InputTable,eJ as Island,L as Loader,eC as Modal,hI as Navbar,N as NoData,cw as Note,e5 as Radio,hJ as RadioGroup,e6 as RadioSize,w as Search,cL as SectionCard,hK as SectionCardSize,S as Segment,s as SegmentSize,r as SegmentVariant,eT as StatusCard,eK as Stepper,t as Table,v as TableVariant,c$ as Tag,cu as TextArea,eV as TextCard,fs as TimeInput,j as Toggle,l as ToggleLabelAlign,hL as ToggleList,k as ToggleSize,hM as ToggleVariant,eM as TruncatableTypography,n as Typography,o as TypographyColor,p as TypographySize,cT as TypographyVariants,cA as WarningModal}from"../chunks/ui-components-BogDd0Qc.js";import"react/jsx-runtime";import"styled-components";import"../icons.js";import"zustand";import"react";import"javascript-time-ago";import"../chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
|
package/lib/components.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{aJ as AutocompleteInput,a_ as Badge,b0 as Button,i as CancelWarning,b as CenterThis,ai as Checkbox,C as Code,aa as ConditionDetails,Z as DataCard,G as DataCardFieldTypes,bM as DataCardFields,hp as DataFinger,b2 as DataTab,h as DeleteWarning,X as DescribeRow,W as Divider,aw as DocsButton,f as Drawer,hq as DrawerFooter,hr as DrawerHeader,bp as Dropdown,hs as ErrorBoundary,bx as ExtendArrow,M as FadeLoader,aj as FieldError,ah as FieldLabel,y as FlexColumn,F as FlexRow,ht as Header,aq as IconButton,cb as IconGroup,aV as IconTitleBadge,aQ as IconWrapped,c9 as IconsNav,hu as ImageControlled,I as Input,ap as InputList,am as InputTable,aY as InteractiveTable,ao as KeyValueInputsList,hv as LoadingText,aG as Modal,aH as ModalBody,ax as MonitorsCheckboxes,aS as MonitorsIcons,aK as NavigationButtons,Q as NoDataFound,a0 as NotificationNote,hw as Overlay,cZ as Padding,eE as PageContent,bl as Popup,cg as PopupForm,cl as ScrollX,b6 as ScrollY,av as SectionTitle,at as Segment,bn as SelectionButton,be as SkeletonLoader,J as Status,bL as Stepper,hx as TabList,aT as TableContainer,aU as TableTitleWrap,aX as TableWrap,bV as Tag,T as Text,ay as TextArea,an as Toggle,cj as ToggleCodeComponent,q as Tooltip,aZ as TraceLoader,eW as UpgradeRequiredWrapper,bm as VerticalScroll,ac as WarningModal,hy as getLinksFromText,hz as getStrongsFromText,hA as renderText}from"./chunks/ui-components-
|
|
1
|
+
export{aJ as AutocompleteInput,a_ as Badge,b0 as Button,i as CancelWarning,b as CenterThis,ai as Checkbox,C as Code,aa as ConditionDetails,Z as DataCard,G as DataCardFieldTypes,bM as DataCardFields,hp as DataFinger,b2 as DataTab,h as DeleteWarning,X as DescribeRow,W as Divider,aw as DocsButton,f as Drawer,hq as DrawerFooter,hr as DrawerHeader,bp as Dropdown,hs as ErrorBoundary,bx as ExtendArrow,M as FadeLoader,aj as FieldError,ah as FieldLabel,y as FlexColumn,F as FlexRow,ht as Header,aq as IconButton,cb as IconGroup,aV as IconTitleBadge,aQ as IconWrapped,c9 as IconsNav,hu as ImageControlled,I as Input,ap as InputList,am as InputTable,aY as InteractiveTable,ao as KeyValueInputsList,hv as LoadingText,aG as Modal,aH as ModalBody,ax as MonitorsCheckboxes,aS as MonitorsIcons,aK as NavigationButtons,Q as NoDataFound,a0 as NotificationNote,hw as Overlay,cZ as Padding,eE as PageContent,bl as Popup,cg as PopupForm,cl as ScrollX,b6 as ScrollY,av as SectionTitle,at as Segment,bn as SelectionButton,be as SkeletonLoader,J as Status,bL as Stepper,hx as TabList,aT as TableContainer,aU as TableTitleWrap,aX as TableWrap,bV as Tag,T as Text,ay as TextArea,an as Toggle,cj as ToggleCodeComponent,q as Tooltip,aZ as TraceLoader,eW as UpgradeRequiredWrapper,bm as VerticalScroll,ac as WarningModal,hy as getLinksFromText,hz as getStrongsFromText,hA as renderText}from"./chunks/ui-components-BogDd0Qc.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
|
package/lib/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{cN as ACTION_ATTRIBUTE_OPTIONS,aB as ACTION_OPTIONS,cO as ACTION_SAMPLER_OPTIONS,h3 as ALL_SOURCES,d0 as BTN_CANCEL,e_ as BTN_CREATE_FIRST_RULE,d8 as BTN_CREATE_RULE,d3 as BTN_DELETE_RULE,g7 as BTN_EDIT_AUTO_RULE,d2 as BTN_EDIT_RULE,dg as BTN_SAVE,d1 as BTN_SAVE_RULE,e as BUTTON_TEXTS,d5 as CATEGORY_DESCRIPTIONS,g4 as CATEGORY_LABELS,d9 as CATEGORY_TITLES,h4 as CREATE_COST_REDUCTION_AUTO_RULE_DRAWER_TITLE,h5 as CREATE_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_TITLE,h6 as CREATE_NOISY_AUTO_RULE_DRAWER_TITLE,cY as DEFAULT_CLUSTER_ID,cX as DEFAULT_CLUSTER_NAME,bw as DEFAULT_DATA_STREAM_NAME,cF as DESC_DROP_PERCENTAGE,fy as DESC_DURATION,fx as DESC_ERRORS,fS as DESC_KEEP_PERCENTAGE,fB as DESC_OPERATION,g5 as DESC_RULE_TYPE,gi as DESC_SOURCE_SCOPE,bJ as DESTINATION_CATEGORIES,bq as DISPLAY_LANGUAGES,z as DISPLAY_TITLES,ct as DOCS_BASE_URL,bI as DestinationCategoryTypes,dc as EDIT_COST_REDUCTION_AUTO_RULE_DRAWER_SUBTITLE,dd as EDIT_COST_REDUCTION_AUTO_RULE_DRAWER_TITLE,da as EDIT_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_SUBTITLE,db as EDIT_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_TITLE,de as EDIT_NOISY_AUTO_RULE_DRAWER_SUBTITLE,df as EDIT_NOISY_AUTO_RULE_DRAWER_TITLE,d6 as EDIT_TITLES,fN as EMPTY_VALUE,eY as FILTER_TYPE_ALL,aI as FORM_ALERTS,bZ as INSTRUMENTATION_RULE_OPTIONS,fz as LABEL_CUSTOM_DURATION,cM as LABEL_CUSTOM_PERCENTAGE,cK as LABEL_DISABLED,eX as LABEL_DISABLED_RULE,fY as LABEL_DROP_ALL,cE as LABEL_DROP_AT_MOST,fU as LABEL_DROP_PERCENTAGE,cJ as LABEL_ENABLED,fG as LABEL_HTTP_ROUTE,fI as LABEL_HTTP_ROUTE_PREFIX,fK as LABEL_KAFKA_TOPIC,fZ as LABEL_KEEP_ALL,fV as LABEL_KEEP_AT_LEAST,fW as LABEL_KEEP_AT_MOST,fT as LABEL_KEEP_PERCENTAGE,fw as LABEL_KEEP_TRACES_DURATION,fu as LABEL_KEEP_TRACES_ERRORS,fJ as LABEL_METHOD,g0 as LABEL_NOTE,gf as LABEL_NO_PREVIEW,fM as LABEL_OPERATION_TYPE,h7 as LABEL_RULE_DISABLED,h8 as LABEL_RULE_ENABLED,f_ as LABEL_RULE_NAME,f$ as LABEL_RULE_TYPE,fX as LABEL_SAMPLE,fD as LABEL_SERVER_ADDRESS,fF as LABEL_TEMPLATED_PATH,fH as LABEL_TEMPLATED_PATH_PREFIX,h9 as LANGUAGE_OPTIONS,br as MONITORS_OPTIONS,gh as NOTE_ENTIRE_CLUSTER,gj as NOTE_SOURCE_SCOPE_LOGIC,ha as OPENTELEMETRY_EBPF_DISTRO_OPTION,fP as OPERATION_ALL,fO as OPERATION_HTTP_CLIENT,fL as OPERATION_HTTP_SERVER,fQ as OPERATION_KAFKA_CONSUMER,fR as OPERATION_KAFKA_PRODUCER,hb as OTEL_DISTRO_NAME_OPTIONS,g2 as PLACEHOLDER_NOTE,fE as PLACEHOLDER_ROUTE,g1 as PLACEHOLDER_RULE_NAME,gl as PLACEHOLDER_SEARCH_SOURCE,fC as PLACEHOLDER_SERVER_ADDRESS,cI as SAMPLING_AUTO_RULE_TITLE,fh as SAMPLING_BTN_CREATE_RULE,ff as SAMPLING_BTN_DOCS,fg as SAMPLING_BTN_REFRESH,cH as SAMPLING_COST_REDUCTION_AUTO_RULE_TITLE,fn as SAMPLING_DELETE_MODAL_APPROVE,fo as SAMPLING_DELETE_MODAL_CANCEL,fp as SAMPLING_DELETE_MODAL_DESCRIPTION,fq as SAMPLING_DELETE_MODAL_TITLE,dh as SAMPLING_DRAWER_WIDTH,fe as SAMPLING_DUPLICATE_RULE_WARNING,cD as SAMPLING_HIGHLY_RELEVANT_AUTO_RULE_TITLE,e8 as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_1,e9 as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_2,ea as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_3,eb as SAMPLING_ONBOARDING_ADVANCED_LEFT_TITLE,ec as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_1,ed as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_2,ee as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_3,ef as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_4,eg as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_5,eh as SAMPLING_ONBOARDING_ADVANCED_RIGHT_TITLE,ej as SAMPLING_ONBOARDING_ADVANCED_SUBTITLE,ei as SAMPLING_ONBOARDING_ADVANCED_TITLE,eB as SAMPLING_ONBOARDING_AMBIENT_LABEL,dE as SAMPLING_ONBOARDING_BTN_GO_TO,dn as SAMPLING_ONBOARDING_BTN_NEXT,e7 as SAMPLING_ONBOARDING_BTN_READ_MORE,dP as SAMPLING_ONBOARDING_BTN_SKIP,dQ as SAMPLING_ONBOARDING_BTN_START,ek as SAMPLING_ONBOARDING_COMMON_BANNER,eA as SAMPLING_ONBOARDING_COMMON_RULES_SECTION,eo as SAMPLING_ONBOARDING_DROP_DESCRIPTION,en as SAMPLING_ONBOARDING_DROP_SUBTITLE,em as SAMPLING_ONBOARDING_DROP_TITLE,er as SAMPLING_ONBOARDING_ERROR_PRESET_NAME,eq as SAMPLING_ONBOARDING_ERROR_PRESET_TOGGLE_LABEL,eu as SAMPLING_ONBOARDING_KEEP_DESCRIPTION,et as SAMPLING_ONBOARDING_KEEP_SUBTITLE,es as SAMPLING_ONBOARDING_KEEP_TITLE,ev as SAMPLING_ONBOARDING_KEEP_USE_CASE_1,ew as SAMPLING_ONBOARDING_KEEP_USE_CASE_2,ex as SAMPLING_ONBOARDING_KEEP_USE_CASE_3,ey as SAMPLING_ONBOARDING_KEEP_USE_CASE_4,ez as SAMPLING_ONBOARDING_KEEP_USE_CASE_5,dw as SAMPLING_ONBOARDING_NOISY_BANNER,ds as SAMPLING_ONBOARDING_NOISY_DESCRIPTION,dv as SAMPLING_ONBOARDING_NOISY_PRESET_NAME,dt as SAMPLING_ONBOARDING_NOISY_PRESET_SECTION,du as SAMPLING_ONBOARDING_NOISY_PRESET_TOGGLE_LABEL,dr as SAMPLING_ONBOARDING_NOISY_SUBTITLE,dq as SAMPLING_ONBOARDING_NOISY_TITLE,ep as SAMPLING_ONBOARDING_PRESET_RULES_SECTION,dl as SAMPLING_ONBOARDING_RECOMMENDED_BADGE,e2 as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_BADGE,e3 as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_DESC,e4 as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_NAME,d$ as SAMPLING_ONBOARDING_STRATEGY_DROP_BADGE,dZ as SAMPLING_ONBOARDING_STRATEGY_DROP_BULLET_1,d_ as SAMPLING_ONBOARDING_STRATEGY_DROP_BULLET_2,e0 as SAMPLING_ONBOARDING_STRATEGY_DROP_DESC,e1 as SAMPLING_ONBOARDING_STRATEGY_DROP_NAME,dW as SAMPLING_ONBOARDING_STRATEGY_KEEP_BADGE,dU as SAMPLING_ONBOARDING_STRATEGY_KEEP_BULLET_1,dV as SAMPLING_ONBOARDING_STRATEGY_KEEP_BULLET_2,dX as SAMPLING_ONBOARDING_STRATEGY_KEEP_DESC,dY as SAMPLING_ONBOARDING_STRATEGY_KEEP_NAME,dT as SAMPLING_ONBOARDING_STRATEGY_KEEP_WARNING,dS as SAMPLING_ONBOARDING_STRATEGY_SUBTITLE,dR as SAMPLING_ONBOARDING_STRATEGY_TITLE,dB as SAMPLING_ONBOARDING_SUCCESS_BULLET_1,dC as SAMPLING_ONBOARDING_SUCCESS_BULLET_2,dD as SAMPLING_ONBOARDING_SUCCESS_BULLET_3,dA as SAMPLING_ONBOARDING_SUCCESS_INTRO,dz as SAMPLING_ONBOARDING_SUCCESS_SUBTITLE,dy as SAMPLING_ONBOARDING_SUCCESS_TITLE,dO as SAMPLING_ONBOARDING_WELCOME_BANNER,dH as SAMPLING_ONBOARDING_WELCOME_INTRO,dI as SAMPLING_ONBOARDING_WELCOME_STAGE_1_DESC,dJ as SAMPLING_ONBOARDING_WELCOME_STAGE_1_TITLE,dK as SAMPLING_ONBOARDING_WELCOME_STAGE_2_DESC,dL as SAMPLING_ONBOARDING_WELCOME_STAGE_2_TITLE,dM as SAMPLING_ONBOARDING_WELCOME_STAGE_3_DESC,dN as SAMPLING_ONBOARDING_WELCOME_STAGE_3_TITLE,dG as SAMPLING_ONBOARDING_WELCOME_SUBTITLE,dF as SAMPLING_ONBOARDING_WELCOME_TITLE,fi as SAMPLING_PAGE_DESCRIPTION,fj as SAMPLING_PAGE_TITLE,cG as SECTION_DROP_PERCENTAGE,fv as SECTION_DURATION,ft as SECTION_ERRORS,hc as SECTION_KEEP_PERCENTAGE,fA as SECTION_OPERATION,ge as SECTION_SAMPLING_PREVIEW,gg as SECTION_SOURCE_SCOPE,bs as STORAGE_KEYS,eZ as TITLE_NO_RESULTS,e$ as TITLE_NO_RULES,hd as TOKEN_ABOUT_TO_EXPIRE,g3 as TOOLTIP_NOTE,d7 as UNNAMED_RULE,f0 as getNoResultsSubTitle}from"./chunks/ui-components-
|
|
1
|
+
export{cN as ACTION_ATTRIBUTE_OPTIONS,aB as ACTION_OPTIONS,cO as ACTION_SAMPLER_OPTIONS,h3 as ALL_SOURCES,d0 as BTN_CANCEL,e_ as BTN_CREATE_FIRST_RULE,d8 as BTN_CREATE_RULE,d3 as BTN_DELETE_RULE,g7 as BTN_EDIT_AUTO_RULE,d2 as BTN_EDIT_RULE,dg as BTN_SAVE,d1 as BTN_SAVE_RULE,e as BUTTON_TEXTS,d5 as CATEGORY_DESCRIPTIONS,g4 as CATEGORY_LABELS,d9 as CATEGORY_TITLES,h4 as CREATE_COST_REDUCTION_AUTO_RULE_DRAWER_TITLE,h5 as CREATE_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_TITLE,h6 as CREATE_NOISY_AUTO_RULE_DRAWER_TITLE,cY as DEFAULT_CLUSTER_ID,cX as DEFAULT_CLUSTER_NAME,bw as DEFAULT_DATA_STREAM_NAME,cF as DESC_DROP_PERCENTAGE,fy as DESC_DURATION,fx as DESC_ERRORS,fS as DESC_KEEP_PERCENTAGE,fB as DESC_OPERATION,g5 as DESC_RULE_TYPE,gi as DESC_SOURCE_SCOPE,bJ as DESTINATION_CATEGORIES,bq as DISPLAY_LANGUAGES,z as DISPLAY_TITLES,ct as DOCS_BASE_URL,bI as DestinationCategoryTypes,dc as EDIT_COST_REDUCTION_AUTO_RULE_DRAWER_SUBTITLE,dd as EDIT_COST_REDUCTION_AUTO_RULE_DRAWER_TITLE,da as EDIT_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_SUBTITLE,db as EDIT_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_TITLE,de as EDIT_NOISY_AUTO_RULE_DRAWER_SUBTITLE,df as EDIT_NOISY_AUTO_RULE_DRAWER_TITLE,d6 as EDIT_TITLES,fN as EMPTY_VALUE,eY as FILTER_TYPE_ALL,aI as FORM_ALERTS,bZ as INSTRUMENTATION_RULE_OPTIONS,fz as LABEL_CUSTOM_DURATION,cM as LABEL_CUSTOM_PERCENTAGE,cK as LABEL_DISABLED,eX as LABEL_DISABLED_RULE,fY as LABEL_DROP_ALL,cE as LABEL_DROP_AT_MOST,fU as LABEL_DROP_PERCENTAGE,cJ as LABEL_ENABLED,fG as LABEL_HTTP_ROUTE,fI as LABEL_HTTP_ROUTE_PREFIX,fK as LABEL_KAFKA_TOPIC,fZ as LABEL_KEEP_ALL,fV as LABEL_KEEP_AT_LEAST,fW as LABEL_KEEP_AT_MOST,fT as LABEL_KEEP_PERCENTAGE,fw as LABEL_KEEP_TRACES_DURATION,fu as LABEL_KEEP_TRACES_ERRORS,fJ as LABEL_METHOD,g0 as LABEL_NOTE,gf as LABEL_NO_PREVIEW,fM as LABEL_OPERATION_TYPE,h7 as LABEL_RULE_DISABLED,h8 as LABEL_RULE_ENABLED,f_ as LABEL_RULE_NAME,f$ as LABEL_RULE_TYPE,fX as LABEL_SAMPLE,fD as LABEL_SERVER_ADDRESS,fF as LABEL_TEMPLATED_PATH,fH as LABEL_TEMPLATED_PATH_PREFIX,h9 as LANGUAGE_OPTIONS,br as MONITORS_OPTIONS,gh as NOTE_ENTIRE_CLUSTER,gj as NOTE_SOURCE_SCOPE_LOGIC,ha as OPENTELEMETRY_EBPF_DISTRO_OPTION,fP as OPERATION_ALL,fO as OPERATION_HTTP_CLIENT,fL as OPERATION_HTTP_SERVER,fQ as OPERATION_KAFKA_CONSUMER,fR as OPERATION_KAFKA_PRODUCER,hb as OTEL_DISTRO_NAME_OPTIONS,g2 as PLACEHOLDER_NOTE,fE as PLACEHOLDER_ROUTE,g1 as PLACEHOLDER_RULE_NAME,gl as PLACEHOLDER_SEARCH_SOURCE,fC as PLACEHOLDER_SERVER_ADDRESS,cI as SAMPLING_AUTO_RULE_TITLE,fh as SAMPLING_BTN_CREATE_RULE,ff as SAMPLING_BTN_DOCS,fg as SAMPLING_BTN_REFRESH,cH as SAMPLING_COST_REDUCTION_AUTO_RULE_TITLE,fn as SAMPLING_DELETE_MODAL_APPROVE,fo as SAMPLING_DELETE_MODAL_CANCEL,fp as SAMPLING_DELETE_MODAL_DESCRIPTION,fq as SAMPLING_DELETE_MODAL_TITLE,dh as SAMPLING_DRAWER_WIDTH,fe as SAMPLING_DUPLICATE_RULE_WARNING,cD as SAMPLING_HIGHLY_RELEVANT_AUTO_RULE_TITLE,e8 as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_1,e9 as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_2,ea as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_3,eb as SAMPLING_ONBOARDING_ADVANCED_LEFT_TITLE,ec as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_1,ed as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_2,ee as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_3,ef as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_4,eg as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_5,eh as SAMPLING_ONBOARDING_ADVANCED_RIGHT_TITLE,ej as SAMPLING_ONBOARDING_ADVANCED_SUBTITLE,ei as SAMPLING_ONBOARDING_ADVANCED_TITLE,eB as SAMPLING_ONBOARDING_AMBIENT_LABEL,dE as SAMPLING_ONBOARDING_BTN_GO_TO,dn as SAMPLING_ONBOARDING_BTN_NEXT,e7 as SAMPLING_ONBOARDING_BTN_READ_MORE,dP as SAMPLING_ONBOARDING_BTN_SKIP,dQ as SAMPLING_ONBOARDING_BTN_START,ek as SAMPLING_ONBOARDING_COMMON_BANNER,eA as SAMPLING_ONBOARDING_COMMON_RULES_SECTION,eo as SAMPLING_ONBOARDING_DROP_DESCRIPTION,en as SAMPLING_ONBOARDING_DROP_SUBTITLE,em as SAMPLING_ONBOARDING_DROP_TITLE,er as SAMPLING_ONBOARDING_ERROR_PRESET_NAME,eq as SAMPLING_ONBOARDING_ERROR_PRESET_TOGGLE_LABEL,eu as SAMPLING_ONBOARDING_KEEP_DESCRIPTION,et as SAMPLING_ONBOARDING_KEEP_SUBTITLE,es as SAMPLING_ONBOARDING_KEEP_TITLE,ev as SAMPLING_ONBOARDING_KEEP_USE_CASE_1,ew as SAMPLING_ONBOARDING_KEEP_USE_CASE_2,ex as SAMPLING_ONBOARDING_KEEP_USE_CASE_3,ey as SAMPLING_ONBOARDING_KEEP_USE_CASE_4,ez as SAMPLING_ONBOARDING_KEEP_USE_CASE_5,dw as SAMPLING_ONBOARDING_NOISY_BANNER,ds as SAMPLING_ONBOARDING_NOISY_DESCRIPTION,dv as SAMPLING_ONBOARDING_NOISY_PRESET_NAME,dt as SAMPLING_ONBOARDING_NOISY_PRESET_SECTION,du as SAMPLING_ONBOARDING_NOISY_PRESET_TOGGLE_LABEL,dr as SAMPLING_ONBOARDING_NOISY_SUBTITLE,dq as SAMPLING_ONBOARDING_NOISY_TITLE,ep as SAMPLING_ONBOARDING_PRESET_RULES_SECTION,dl as SAMPLING_ONBOARDING_RECOMMENDED_BADGE,e2 as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_BADGE,e3 as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_DESC,e4 as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_NAME,d$ as SAMPLING_ONBOARDING_STRATEGY_DROP_BADGE,dZ as SAMPLING_ONBOARDING_STRATEGY_DROP_BULLET_1,d_ as SAMPLING_ONBOARDING_STRATEGY_DROP_BULLET_2,e0 as SAMPLING_ONBOARDING_STRATEGY_DROP_DESC,e1 as SAMPLING_ONBOARDING_STRATEGY_DROP_NAME,dW as SAMPLING_ONBOARDING_STRATEGY_KEEP_BADGE,dU as SAMPLING_ONBOARDING_STRATEGY_KEEP_BULLET_1,dV as SAMPLING_ONBOARDING_STRATEGY_KEEP_BULLET_2,dX as SAMPLING_ONBOARDING_STRATEGY_KEEP_DESC,dY as SAMPLING_ONBOARDING_STRATEGY_KEEP_NAME,dT as SAMPLING_ONBOARDING_STRATEGY_KEEP_WARNING,dS as SAMPLING_ONBOARDING_STRATEGY_SUBTITLE,dR as SAMPLING_ONBOARDING_STRATEGY_TITLE,dB as SAMPLING_ONBOARDING_SUCCESS_BULLET_1,dC as SAMPLING_ONBOARDING_SUCCESS_BULLET_2,dD as SAMPLING_ONBOARDING_SUCCESS_BULLET_3,dA as SAMPLING_ONBOARDING_SUCCESS_INTRO,dz as SAMPLING_ONBOARDING_SUCCESS_SUBTITLE,dy as SAMPLING_ONBOARDING_SUCCESS_TITLE,dO as SAMPLING_ONBOARDING_WELCOME_BANNER,dH as SAMPLING_ONBOARDING_WELCOME_INTRO,dI as SAMPLING_ONBOARDING_WELCOME_STAGE_1_DESC,dJ as SAMPLING_ONBOARDING_WELCOME_STAGE_1_TITLE,dK as SAMPLING_ONBOARDING_WELCOME_STAGE_2_DESC,dL as SAMPLING_ONBOARDING_WELCOME_STAGE_2_TITLE,dM as SAMPLING_ONBOARDING_WELCOME_STAGE_3_DESC,dN as SAMPLING_ONBOARDING_WELCOME_STAGE_3_TITLE,dG as SAMPLING_ONBOARDING_WELCOME_SUBTITLE,dF as SAMPLING_ONBOARDING_WELCOME_TITLE,fi as SAMPLING_PAGE_DESCRIPTION,fj as SAMPLING_PAGE_TITLE,cG as SECTION_DROP_PERCENTAGE,fv as SECTION_DURATION,ft as SECTION_ERRORS,hc as SECTION_KEEP_PERCENTAGE,fA as SECTION_OPERATION,ge as SECTION_SAMPLING_PREVIEW,gg as SECTION_SOURCE_SCOPE,bs as STORAGE_KEYS,eZ as TITLE_NO_RESULTS,e$ as TITLE_NO_RULES,hd as TOKEN_ABOUT_TO_EXPIRE,g3 as TOOLTIP_NOTE,d7 as UNNAMED_RULE,f0 as getNoResultsSubTitle}from"./chunks/ui-components-BogDd0Qc.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
|
package/lib/containers/v2.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t,Fragment as a}from"react/jsx-runtime";import{useEffect as n,Fragment as i,forwardRef as o,useState as l,useImperativeHandle as s,useMemo as r,useCallback as c,useRef as d,Children as u}from"react";import p,{useTheme as h,css as m,keyframes as g}from"styled-components";import{ag as b,y as f,cm as v,cn as y,co as S,cp as C,ak as w,al as k,cq as x,af as $,j as T,l as A,cr as N,W as I,F as E,m as D,B as R,a as O,as as P,ae as M,cs as L,N as z,n as F,p as V,ct as B,S as _,cu as X,bB as j,cv as U,cw as W,R as H,bD as G,b7 as K,bH as q,cx as Y,o as J,bS as Q,q as Z,bO as ee,bT as te,bR as ae,bP as ne,bQ as ie,bU as oe,cy as le,x as se,bq as re,bW as ce,cz as de,cA as ue,z as pe,a5 as he,cB as me,cC as ge,cD as be,cE as fe,cF as ve,cG as ye,cH as Se,cI as Ce,cJ as we,cK as ke,s as xe,cL as $e,cM as Te,au as Ae,cN as Ne,cO as Ie,b as Ee,bI as De,cP as Re,cQ as Oe,cf as Pe,L as Me,bJ as Le,ba as ze,$ as Fe,bC as Ve,a3 as Be,bZ as _e,a4 as Xe,cR as je,c7 as Ue,cS as We,b_ as He,k as Ge,cT as Ke,cU as qe,cV as Ye,bc as Je,cW as Qe,E as Ze,bd as et,cX as tt,cY as at,aA as nt,c4 as it,e as ot,cZ as lt,D as st,c_ as rt,aC as ct,ce as dt,bA as ut,bg as pt,bF as ht,H as mt,bX as gt,aI as bt,c$ as ft,b9 as vt,d0 as yt,d1 as St,d2 as Ct,d3 as wt,d4 as kt,d5 as xt,d6 as $t,d7 as Tt,d8 as At,d9 as Nt,da as It,db as Et,dc as Dt,dd as Rt,de as Ot,df as Pt,dg as Mt,dh as Lt,u as zt,d as Ft,c0 as Vt,cd as Bt,di as _t,dj as Xt,dk as jt,g as Ut,dl as Wt,dm as Ht,dn as Gt,dp as Kt,dq as qt,dr as Yt,ds as Jt,dt as Qt,du as Zt,dv as ea,dw as ta,dx as aa,dy as na,dz as ia,dA as oa,dB as la,dC as sa,dD as ra,dE as ca,dF as da,dG as ua,dH as pa,dI as ha,dJ as ma,dK as ga,dL as ba,dM as fa,dN as va,dO as ya,dP as Sa,dQ as Ca,dR as wa,dS as ka,dT as xa,dU as $a,dV as Ta,dW as Aa,dX as Na,dY as Ia,dZ as Ea,d_ as Da,d$ as Ra,e0 as Oa,e1 as Pa,e2 as Ma,e3 as La,e4 as za,e5 as Fa,e6 as Va,e7 as Ba,e8 as _a,e9 as Xa,ea as ja,eb as Ua,ec as Wa,ed as Ha,ee as Ga,ef as Ka,eg as qa,eh as Ya,ei as Ja,ej as Qa,ek as Za,el as en,em as tn,en as an,eo as nn,ep as on,eq as ln,er as sn,es as rn,et as cn,eu as dn,ev as un,ew as pn,ex as hn,ey as mn,ez as gn,eA as bn,eB as fn,eC as vn,eD as yn,A as Sn,eE as Cn,t as wn,v as kn,eF as xn,eG as $n,eH as Tn,eI as An,eJ as Nn,eK as In,aO as En,a6 as Dn,bs as Rn,bo as On,br as Pn,bt as Mn,bj as Ln,w as zn,aR as Fn,aW as Vn,aE as Bn,eL as _n,c as Xn,b1 as jn,eM as Un,aN as Wn,b3 as Hn,O as Gn,b4 as Kn,b6 as qn,be as Yn,aL as Jn,b5 as Qn,b8 as Zn,bb as ei,bf as ti,bh as ai,bi as ni,aP as ii,a9 as oi,a8 as li,bv as si,eN as ri,bw as ci,eO as di,eP as ui,eQ as pi,eR as hi,eS as mi,eT as gi,eU as bi,eV as fi,eW as vi,r as yi,eX as Si,eY as Ci,eZ as wi,e_ as ki,e$ as xi,f0 as $i,f1 as Ti,f2 as Ai,f3 as Ni,f4 as Ii,f5 as Ei,f6 as Di,f7 as Ri,f8 as Oi,f9 as Pi,fa as Mi,fb as Li,fc as zi,fd as Fi,fe as Vi,ff as Bi,fg as _i,fh as Xi,fi as ji,fj as Ui,fk as Wi,fl as Hi,fm as Gi,fn as Ki,fo as qi,fp as Yi,fq as Ji,fr as Qi}from"../chunks/ui-components-DD1EWBzE.js";import{TrashIcon as Zi,PlusIcon as eo,BookIcon as to,VSquareIcon as ao,XSquareIcon as no,DeleteIcon as io,EditIcon as oo,GoLogo as lo,JavaLogo as so,ChevronRightIcon as ro,ActionIcon as co,DestinationIcon as uo,ChevronUpIcon as po,ChevronDownIcon as ho,VIcon as mo,XIcon as go,InstrumentationRuleIcon as bo,SourceIcon as fo,NamespacesIcon as vo,SettingsIcon as yo,SamplingIcon as So,ExclamationTriangleIcon as Co,ExclamationCircleIcon as wo,KeyIcon as ko,DiagnoseIcon as xo,DownloadIcon as $o,TerminalIcon as To,StarIcon as Ao,ArrowIcon as No,QuestionCircleIcon as Io,RefreshIcon as Eo,ConnectionsIcon as Do,OdigosLogo as Ro,ArrowRightIcon as Oo,FilterIcon as Po,RefreshLeftArrowIcon as Mo,DataStreamIcon as Lo,PipelineCollectorIcon as zo,PodIcon as Fo,ArrowDownSquareIcon as Vo,ArrowUpSquareIcon as Bo,GatewayIcon as _o,YamlIcon as Xo}from"../icons.js";import{S as jo,D as Uo,A as Wo,P as Ho,a as Go,b as Ko,R as qo,c as Yo,O as Jo,d as Qo,e as Zo,f as el,W as tl,g as al,C as nl,h as il,i as ol,U as ll}from"../chunks/index-Di5tcvgi.js";import{S as sl}from"../chunks/index-BaKzgedB.js";import{Y as rl}from"../chunks/index-D65aqUr3.js";import"zustand";import"javascript-time-ago";import"../chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";const cl=[{id:"CREDIT_CARD",label:"Credit card"}],dl=[{id:b.CollectContainerAttributes,label:"Collect container attributes"},{id:b.CollectReplicaSetAttributes,label:"Collect ReplicaSet attributes"},{id:b.CollectWorkloadId,label:"Collect workload ID"},{id:b.CollectClusterId,label:"Collect cluster ID"}],ul=[{id:$.Pod,label:$.Pod},{id:$.Namespace,label:$.Namespace},{id:$.Node,label:$.Node}],pl=[{label:"Label key",keyName:"labelKey",placeholder:"app.kubernetes.io/name"},{label:"Attribute key",keyName:"attributeKey",placeholder:"app.kubernetes.name"},{label:"From sources",keyName:"fromSources",placeholder:"pod, namespace",tooltip:"Select multiple sources. Higher precedence sources (pod > namespace > node) will override lower ones.",componentType:"multi-dropdown",options:ul}],hl=[{label:"Annotation key",keyName:"annotationKey",placeholder:"kubectl.kubernetes.io/restartedAt"},{label:"Attribute key",keyName:"attributeKey",placeholder:"kubectl.kubernetes.restartedAt"},{label:"From sources",keyName:"fromSources",placeholder:"pod, namespace",tooltip:"Select multiple sources. Higher precedence sources (pod > namespace > node) will override lower ones.",componentType:"multi-dropdown",options:ul}],ml=[{label:"Service",keyName:"serviceName",placeholder:"e.g. my-service",tooltip:"Service name: The rule applies to a specific service name. Only traces originating from this service’s root span will be considered."},{label:"HTTP route",keyName:"httpRoute",placeholder:"e.g. /api/v1/users",tooltip:"HTTP route: The specific HTTP route prefix to match for sampling. Only traces with routes beginning with this prefix will be considered. For instance, configuring /buy will also match /buy/product."},{label:"Threshold",keyName:"minimumLatencyThreshold",placeholder:"e.g. 1000",tooltip:"Minimum latency threshold (ms): Specifies the minimum latency in milliseconds; traces with latency below this threshold are ignored.",inputType:w.Number},{label:"Fallback",keyName:"fallbackSamplingRatio",placeholder:"e.g. 100",tooltip:"Fallback sampling ratio: Specifies the percentage of traces that meet the service/http_route filter but fall below the threshold that you still want to retain. For example, if a rule is set for service A and http_route B with a minimum latency threshold of 1 second, you might still want to keep some traces below this threshold. Setting the ratio to 20% ensures that 20% of these traces will be retained.",inputType:w.Number}],gl=b.UrlTemplatizationRulesGroups,bl=[{keyName:"kind",label:"Kind",placeholder:"Any kind",componentType:"dropdown",options:[{id:"Deployment",label:"Deployment"},{id:"StatefulSet",label:"StatefulSet"},{id:"DaemonSet",label:"DaemonSet"}]},{keyName:"name",label:"Name",placeholder:"Any name"}],fl=[{label:"Service name",keyName:"serviceName",placeholder:"e.g. my-service",tooltip:"Specifies the service name to search within the trace (Across all available spans)."},{label:"Sampling ratio",keyName:"samplingRatio",placeholder:"e.g. 10",tooltip:"Specifies the sample rate for all traces.",inputType:w.Number},{label:"Fallback sampling ratio",keyName:"fallbackSamplingRatio",placeholder:"e.g. 100",tooltip:"Specifies the percentage of traces that don’t meet the service name filter and that you still like to retain.",inputType:w.Number}],vl=[{label:"Service name",keyName:"serviceName",placeholder:"e.g. my-service",tooltip:"Specifies the service name to search within the trace (across all available spans)."},{label:"Attribute key",keyName:"attributeKey",placeholder:"e.g. http.request.method",tooltip:"Specifies the attribute key inside of the span."},{label:"Fallback sampling ratio",keyName:"fallbackSamplingRatio",placeholder:"e.g. 100",tooltip:"Specifies the percentage of traces that don’t meet the service name filter and that you still like to retain.",inputType:w.Number},{label:"Condition",keyName:"condition",tooltip:"An object representing the filters for span attributes filters.",componentType:P.Dropdown,options:[{id:"stringCondition",label:"String condition"},{id:"numberCondition",label:"Number condition"},{id:"booleanCondition",label:"Boolean condition"},{id:"jsonCondition",label:"JSON condition"}]},{label:"Operation",keyName:"operation",tooltip:"Specifies the operation to run against the attribute.",componentType:P.Dropdown,options:[{id:"exists",label:"Exists"},{id:"equals",label:"Equals"},{id:"not_equals",label:"Not equals"},{id:"contains",label:"Contains"},{id:"not_contains",label:"Not contains"},{id:"regex",label:"Regex"},{id:"greater_than",label:"Greater than"},{id:"less_than",label:"Less than"},{id:"greater_than_or_equal",label:"Greater than or equal"},{id:"less_than_or_equal",label:"Less than or equal"},{id:"is_valid_json",label:"Is valid JSON"},{id:"is_invalid_json",label:"Is invalid JSON"},{id:"jsonpath_exists",label:"JSON path exists"},{id:"key_equals",label:"Key equals"},{id:"key_not_equals",label:"Key not equals"}]},{label:"Expected value",keyName:"expectedValue",placeholder:"e.g. GET",tooltip:"The values to test the attribute against."},{label:"JSON path",keyName:"jsonPath",placeholder:"e.g. $.user.role",tooltip:"An expression used to navigate the JSON structure.",renderCondition:e=>"jsonCondition"===e.condition}],yl={[M.K8sAttributes]:({value:i,setValue:o,formErrors:l})=>(n(()=>{i[b.CollectContainerAttributes]||i[b.CollectReplicaSetAttributes]||i[b.CollectWorkloadId]||i[b.CollectClusterId]||i[b.LabelsAttributes]?.length||i[b.AnnotationsAttributes]?.length||(o(b.CollectContainerAttributes,!0),o(b.CollectReplicaSetAttributes,!0),o(b.CollectWorkloadId,!0),o(b.CollectClusterId,!0),o(b.LabelsAttributes,[]),o(b.AnnotationsAttributes,[]))},[]),e(a,{children:[t(f,{$gap:6,children:dl.map(({id:a,label:n})=>e(f,{children:[t(y,{label:n,value:i[a]||!1,onChange:e=>o(a,e)}),t(S,{errorMessage:l[a]})]},a))}),t(x,{name:"labelsAttributes",label:"Label attributes",limitFieldsPerRow:2,columns:pl,values:i[b.LabelsAttributes]||[],setValues:e=>o(b.LabelsAttributes,e),errorMessage:l[b.LabelsAttributes]}),t(x,{name:"annotationsAttributes",label:"Annotation attributes",limitFieldsPerRow:2,columns:hl,values:i[b.AnnotationsAttributes]||[],setValues:e=>o(b.AnnotationsAttributes,e),errorMessage:l[b.AnnotationsAttributes]})]})),[M.AddClusterInfo]:({value:n,setValue:i,formErrors:o})=>{const l=h();return e(a,{children:[t(T,{label:"Overwrite existing values",labelAlign:A.Left,labelColor:l.v2.colors.silver[200],tooltip:"If enabled, the resource attributes will overwrite any existing attributes with the same name.",value:n[b.OverwriteExistingValues]||!1,onChange:e=>i(b.OverwriteExistingValues,e)}),t(x,{name:"clusterAttributes",label:"Resource attributes",limitFieldsPerRow:2,columns:[{keyName:"attributeName",label:"Attribute name"},{keyName:"attributeStringValue",label:"Attribute value"}],values:n[b.ClusterAttributes]||[],setValues:e=>i(b.ClusterAttributes,e),errorMessage:o[b.ClusterAttributes]})]})},[M.DeleteAttributes]:({value:e,setValue:a,formErrors:n})=>t(N,{name:"attributeNamesToDelete",label:"Attributes to delete",values:e[b.AttributeNamesToDelete]||[],setValues:e=>a(b.AttributeNamesToDelete,e),errorMessage:n[b.AttributeNamesToDelete]}),[M.RenameAttributes]:({value:e,setValue:a,formErrors:n})=>t(x,{name:"renames",label:"Attributes to rename",limitFieldsPerRow:2,columns:[{keyName:"oldKey",label:"Old key"},{keyName:"newKey",label:"New key"}],values:Object.entries(e[b.Renames]||{}).map(([e,t])=>({oldKey:e,newKey:t})),setValues:e=>{const t={};e.forEach(e=>t[e.oldKey]=e.newKey),a(b.Renames,t)},errorMessage:n[b.Renames]}),[M.PiiMasking]:({value:a,setValue:i,formErrors:o})=>(n(()=>{a[b.PiiCategories]?.length||i(b.PiiCategories,cl.map(({id:e})=>e))},[]),e(f,{$gap:12,children:[t(v,{label:"Attributes to mask"}),t(f,{$gap:6,children:cl.map(({id:e,label:n})=>t(y,{label:n,value:a[b.PiiCategories]?.includes(e)||!1,onChange:t=>{const n=a[b.PiiCategories]||[],o=t?[...n,e]:n.filter(t=>t!==e);i(b.PiiCategories,o)}},e))}),t(S,{errorMessage:o[b.PiiCategories]})]})),[M.ErrorSampler]:({value:e,setValue:a,formErrors:n})=>{const i=n[b.FallbackSamplingRatio],o=k(e[b.FallbackSamplingRatio])?"":String(e[b.FallbackSamplingRatio]);return t(C,{name:"fallbackSamplingRatio",label:"Fallback sampling ratio",type:w.Number,min:0,max:100,value:o,placeholder:"0-100",onChange:e=>{return t=e.target.value,a(b.FallbackSamplingRatio,Math.max(0,Math.min(Number(t),100))||0);var t},errorMessage:i})},[M.ProbabilisticSampler]:({value:e,setValue:a,formErrors:n})=>{const i=n[b.SamplingPercentage],o=k(e[b.SamplingPercentage])?"":String(e[b.SamplingPercentage]);return t(C,{name:"samplingPercentage",label:"Sampling percentage",type:w.Number,min:0,max:100,value:o,placeholder:"0-100",onChange:e=>{return t=e.target.value,a(b.SamplingPercentage,Math.max(0,Math.min(Number(t),100))||0);var t},errorMessage:i})},[M.LatencySampler]:({value:e,setValue:a,formErrors:n})=>{const i=n[b.EndpointsFilters],o=e[b.EndpointsFilters]||[];return t(x,{name:"endpointsFilters",limitFieldsPerRow:2,columns:ml,values:o,setValues:e=>{a(b.EndpointsFilters,e.map(({serviceName:e,httpRoute:t,minimumLatencyThreshold:a,fallbackSamplingRatio:n})=>({serviceName:e,httpRoute:t,minimumLatencyThreshold:Number(a),fallbackSamplingRatio:Number(n)})))},errorMessage:i})},[M.ServiceNameSampler]:({value:e,setValue:a,formErrors:n})=>{const i=n[b.ServicesNameFilters],o=e[b.ServicesNameFilters]||[];return t(x,{name:"servicesNameFilters",limitFieldsPerRow:2,columns:fl,values:o,setValues:e=>{a(b.ServicesNameFilters,e.map(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:a})=>({serviceName:e,samplingRatio:Number(t),fallbackSamplingRatio:Number(a)})))},errorMessage:i})},[M.SpanAttributeSampler]:({value:e,setValue:a,formErrors:n})=>{const i=n[b.AttributeFilters],o=(e[b.AttributeFilters]||[]).map(({serviceName:e,attributeKey:t,fallbackSamplingRatio:a,condition:n})=>{const i=Object.entries(n).filter(([e,t])=>t)[0][0];return{serviceName:e,attributeKey:t,fallbackSamplingRatio:a,condition:i,operation:n[i]?.operation,expectedValue:n[i]?.expectedValue,jsonPath:n[i]?.jsonPath}});return t(x,{name:"attributeFilters",limitFieldsPerRow:2,columns:vl,values:o,setValues:e=>{a(b.AttributeFilters,e.map(({serviceName:e,attributeKey:t,fallbackSamplingRatio:a,condition:n,operation:i,expectedValue:o,jsonPath:l})=>{const s={serviceName:e,attributeKey:t,fallbackSamplingRatio:Number(a),condition:{[n]:{operation:i,expectedValue:o}}};return l&&(s.condition[n].jsonPath=l),s}))},errorMessage:i})},[M.URLTemplatization]:({value:n,setValue:o,formErrors:l})=>{const s=h(),r=n[gl]||[{filterK8sNamespace:"",workloadFilters:[],templatizationRules:[{template:""}],notes:""}],c=e=>o(gl,e),d=(e,t)=>c(r.map((a,n)=>n===e?{...a,...t}:a));return e(a,{children:[r.map((a,n)=>e(i,{children:[t(I,{}),e(f,{$gap:12,children:[e(E,{$justifyContent:"space-between",$alignItems:"center",children:[t(v,{label:`Rule Group ${n+1}`}),t(D,{leftIcon:()=>t(Zi,{fill:s.v2.colors.red[500]}),variant:O.Secondary,size:R.S,onClick:()=>{return e=n,c(r.filter((t,a)=>a!==e));var e},disabled:1===r.length})]}),t(C,{name:`urlGroup-${n}-namespace`,label:"Namespace",placeholder:"All namespaces",tooltip:"Filter rules to a specific Kubernetes namespace.",value:a.filterK8sNamespace||"",onChange:e=>d(n,{filterK8sNamespace:e.target.value})}),t(x,{name:`urlGroup-${n}-workloadFilters`,label:"Workload filters",tooltip:"Optionally scope templates to specific workloads.",columns:bl,values:a.workloadFilters||[],setValues:e=>d(n,{workloadFilters:e})}),t(N,{name:`urlGroup-${n}-templates`,label:"Templates",required:!0,placeholder:"e.g. /user/{id}",values:a.templatizationRules.map(e=>e.template),setValues:e=>d(n,{templatizationRules:e.map(e=>({template:e}))})})]}),t(S,{errorMessage:l[gl]})]},`url-templatization-group-${n}`)),t(D,{variant:O.Secondary,label:"Add rule group",leftIcon:eo,onClick:()=>c([...r,{filterK8sNamespace:"",workloadFilters:[],templatizationRules:[{template:""}],notes:""}])}),t(I,{})]})}},Sl=({actionType:e,value:a,setValue:n,formErrors:i})=>{if(!e)return null;const o=yl[e];return o?t(o,{value:a,setValue:n,formErrors:i}):null},Cl=()=>{const a=h(),{selectedOption:n,genericForm:i}=L();if(!i||!n)return t(z,{title:"No active form"});const{formData:o,handleFormChange:l,formErrors:s}=i;return e(f,{$gap:24,children:[e(E,{$gap:12,$justifyContent:"space-between",children:[t(F,{size:V.XXS,children:n.docsDescription}),t(D,{label:"Docs",leftIcon:to,variant:O.Text,size:R.S,onClick:()=>window.open(`${B}${n.docsEndpoint}`,"_blank","noopener noreferrer")})]}),t(_,{options:[{icon:ao,label:"Enabled",value:!1,selectedBgColor:a.v2.colors.green[800]},{icon:no,label:"Disabled",value:!0,selectedBgColor:a.v2.colors.red[800]}],selected:o.disabled,setSelected:e=>l("disabled",e)}),t(jo,{title:"Signals for processing",allowedSignals:n.allowedSignals,selectedSignals:o.signals||[],setSelectedSignals:e=>l("signals",e),errorMessage:s.signals}),t(C,{name:"actionName",label:"Action name",placeholder:"Use a name that describes the action...",value:o.name||"",onChange:({target:{value:e}})=>l("name",e),errorMessage:s.name}),t(Sl,{actionType:n.type,value:o.fields,setValue:(e,t)=>l(`fields.${e}`,t),formErrors:s}),t(X,{name:"notes",label:"Notes",placeholder:"Your personal notes...",value:o.notes||"",onChange:({target:{value:e}})=>l("notes",e),errorMessage:s.notes})]})},wl=({signals:e,fields:a,disabled:n,formData:i,handleFormChange:o,formErrors:l})=>a?.map(({renderCondition:a,componentType:s,type:r,name:c,title:d,tooltip:u,placeholder:p,value:h,required:m,options:g})=>{if(!(!a||j(a,e,i.fields)))return null;const b=c,f=i.fields.find(e=>e.key===b),v=f?f.value:h;return t(Uo,{componentType:s,inputType:r,name:b,label:d,tooltip:u,disabled:n,required:m,placeholder:p,errorMessage:l[b],dropdownOptions:g,value:v||"",setValue:e=>o(b,e)},b)}),kl=p(E)`
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as a}from"react/jsx-runtime";import{useEffect as n,Fragment as i,forwardRef as o,useState as l,useImperativeHandle as s,useMemo as r,useCallback as c,useRef as d,Children as u}from"react";import p,{useTheme as h,css as m,keyframes as g}from"styled-components";import{ag as b,y as f,cm as v,cn as y,co as S,cp as C,ak as w,al as k,cq as x,af as $,j as T,l as A,cr as N,W as I,F as E,m as D,B as R,a as O,as as P,ae as M,cs as L,N as z,n as F,p as V,ct as B,S as _,cu as X,bB as j,cv as U,cw as W,R as H,bD as G,b7 as K,bH as q,cx as Y,o as J,bS as Q,q as Z,bO as ee,bT as te,bR as ae,bP as ne,bQ as ie,bU as oe,cy as le,x as se,bq as re,bW as ce,cz as de,cA as ue,z as pe,a5 as he,cB as me,cC as ge,cD as be,cE as fe,cF as ve,cG as ye,cH as Se,cI as Ce,cJ as we,cK as ke,s as xe,cL as $e,cM as Te,au as Ae,cN as Ne,cO as Ie,b as Ee,bI as De,cP as Re,cQ as Oe,cf as Pe,L as Me,bJ as Le,ba as ze,$ as Fe,bC as Ve,a3 as Be,bZ as _e,a4 as Xe,cR as je,c7 as Ue,cS as We,b_ as He,k as Ge,cT as Ke,cU as qe,cV as Ye,bc as Je,cW as Qe,E as Ze,bd as et,cX as tt,cY as at,aA as nt,c4 as it,e as ot,cZ as lt,D as st,c_ as rt,aC as ct,ce as dt,bA as ut,bg as pt,bF as ht,H as mt,bX as gt,aI as bt,c$ as ft,b9 as vt,d0 as yt,d1 as St,d2 as Ct,d3 as wt,d4 as kt,d5 as xt,d6 as $t,d7 as Tt,d8 as At,d9 as Nt,da as It,db as Et,dc as Dt,dd as Rt,de as Ot,df as Pt,dg as Mt,dh as Lt,u as zt,d as Ft,c0 as Vt,cd as Bt,di as _t,dj as Xt,dk as jt,g as Ut,dl as Wt,dm as Ht,dn as Gt,dp as Kt,dq as qt,dr as Yt,ds as Jt,dt as Qt,du as Zt,dv as ea,dw as ta,dx as aa,dy as na,dz as ia,dA as oa,dB as la,dC as sa,dD as ra,dE as ca,dF as da,dG as ua,dH as pa,dI as ha,dJ as ma,dK as ga,dL as ba,dM as fa,dN as va,dO as ya,dP as Sa,dQ as Ca,dR as wa,dS as ka,dT as xa,dU as $a,dV as Ta,dW as Aa,dX as Na,dY as Ia,dZ as Ea,d_ as Da,d$ as Ra,e0 as Oa,e1 as Pa,e2 as Ma,e3 as La,e4 as za,e5 as Fa,e6 as Va,e7 as Ba,e8 as _a,e9 as Xa,ea as ja,eb as Ua,ec as Wa,ed as Ha,ee as Ga,ef as Ka,eg as qa,eh as Ya,ei as Ja,ej as Qa,ek as Za,el as en,em as tn,en as an,eo as nn,ep as on,eq as ln,er as sn,es as rn,et as cn,eu as dn,ev as un,ew as pn,ex as hn,ey as mn,ez as gn,eA as bn,eB as fn,eC as vn,eD as yn,A as Sn,eE as Cn,t as wn,v as kn,eF as xn,eG as $n,eH as Tn,eI as An,eJ as Nn,eK as In,aO as En,a6 as Dn,bs as Rn,bo as On,br as Pn,bt as Mn,bj as Ln,w as zn,aR as Fn,aW as Vn,aE as Bn,eL as _n,c as Xn,b1 as jn,eM as Un,aN as Wn,b3 as Hn,O as Gn,b4 as Kn,b6 as qn,be as Yn,aL as Jn,b5 as Qn,b8 as Zn,bb as ei,bf as ti,bh as ai,bi as ni,aP as ii,a9 as oi,a8 as li,bv as si,eN as ri,bw as ci,eO as di,eP as ui,eQ as pi,eR as hi,eS as mi,eT as gi,eU as bi,eV as fi,eW as vi,r as yi,eX as Si,eY as Ci,eZ as wi,e_ as ki,e$ as xi,f0 as $i,f1 as Ti,f2 as Ai,f3 as Ni,f4 as Ii,f5 as Ei,f6 as Di,f7 as Ri,f8 as Oi,f9 as Pi,fa as Mi,fb as Li,fc as zi,fd as Fi,fe as Vi,ff as Bi,fg as _i,fh as Xi,fi as ji,fj as Ui,fk as Wi,fl as Hi,fm as Gi,fn as Ki,fo as qi,fp as Yi,fq as Ji,fr as Qi}from"../chunks/ui-components-BogDd0Qc.js";import{TrashIcon as Zi,PlusIcon as eo,BookIcon as to,VSquareIcon as ao,XSquareIcon as no,DeleteIcon as io,EditIcon as oo,GoLogo as lo,JavaLogo as so,ChevronRightIcon as ro,ActionIcon as co,DestinationIcon as uo,ChevronUpIcon as po,ChevronDownIcon as ho,VIcon as mo,XIcon as go,InstrumentationRuleIcon as bo,SourceIcon as fo,NamespacesIcon as vo,SettingsIcon as yo,SamplingIcon as So,ExclamationTriangleIcon as Co,ExclamationCircleIcon as wo,KeyIcon as ko,DiagnoseIcon as xo,DownloadIcon as $o,TerminalIcon as To,StarIcon as Ao,ArrowIcon as No,QuestionCircleIcon as Io,RefreshIcon as Eo,ConnectionsIcon as Do,OdigosLogo as Ro,ArrowRightIcon as Oo,FilterIcon as Po,RefreshLeftArrowIcon as Mo,DataStreamIcon as Lo,PipelineCollectorIcon as zo,PodIcon as Fo,ArrowDownSquareIcon as Vo,ArrowUpSquareIcon as Bo,GatewayIcon as _o,YamlIcon as Xo}from"../icons.js";import{S as jo,D as Uo,A as Wo,P as Ho,a as Go,b as Ko,R as qo,c as Yo,O as Jo,d as Qo,e as Zo,f as el,W as tl,g as al,C as nl,h as il,i as ol,U as ll}from"../chunks/index-EPaudVws.js";import{S as sl}from"../chunks/index-Coer-PRZ.js";import{Y as rl}from"../chunks/index-eOSrP07c.js";import"zustand";import"javascript-time-ago";import"../chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";const cl=[{id:"CREDIT_CARD",label:"Credit card"}],dl=[{id:b.CollectContainerAttributes,label:"Collect container attributes"},{id:b.CollectReplicaSetAttributes,label:"Collect ReplicaSet attributes"},{id:b.CollectWorkloadId,label:"Collect workload ID"},{id:b.CollectClusterId,label:"Collect cluster ID"}],ul=[{id:$.Pod,label:$.Pod},{id:$.Namespace,label:$.Namespace},{id:$.Node,label:$.Node}],pl=[{label:"Label key",keyName:"labelKey",placeholder:"app.kubernetes.io/name"},{label:"Attribute key",keyName:"attributeKey",placeholder:"app.kubernetes.name"},{label:"From sources",keyName:"fromSources",placeholder:"pod, namespace",tooltip:"Select multiple sources. Higher precedence sources (pod > namespace > node) will override lower ones.",componentType:"multi-dropdown",options:ul}],hl=[{label:"Annotation key",keyName:"annotationKey",placeholder:"kubectl.kubernetes.io/restartedAt"},{label:"Attribute key",keyName:"attributeKey",placeholder:"kubectl.kubernetes.restartedAt"},{label:"From sources",keyName:"fromSources",placeholder:"pod, namespace",tooltip:"Select multiple sources. Higher precedence sources (pod > namespace > node) will override lower ones.",componentType:"multi-dropdown",options:ul}],ml=[{label:"Service",keyName:"serviceName",placeholder:"e.g. my-service",tooltip:"Service name: The rule applies to a specific service name. Only traces originating from this service’s root span will be considered."},{label:"HTTP route",keyName:"httpRoute",placeholder:"e.g. /api/v1/users",tooltip:"HTTP route: The specific HTTP route prefix to match for sampling. Only traces with routes beginning with this prefix will be considered. For instance, configuring /buy will also match /buy/product."},{label:"Threshold",keyName:"minimumLatencyThreshold",placeholder:"e.g. 1000",tooltip:"Minimum latency threshold (ms): Specifies the minimum latency in milliseconds; traces with latency below this threshold are ignored.",inputType:w.Number},{label:"Fallback",keyName:"fallbackSamplingRatio",placeholder:"e.g. 100",tooltip:"Fallback sampling ratio: Specifies the percentage of traces that meet the service/http_route filter but fall below the threshold that you still want to retain. For example, if a rule is set for service A and http_route B with a minimum latency threshold of 1 second, you might still want to keep some traces below this threshold. Setting the ratio to 20% ensures that 20% of these traces will be retained.",inputType:w.Number}],gl=b.UrlTemplatizationRulesGroups,bl=[{keyName:"kind",label:"Kind",placeholder:"Any kind",componentType:"dropdown",options:[{id:"Deployment",label:"Deployment"},{id:"StatefulSet",label:"StatefulSet"},{id:"DaemonSet",label:"DaemonSet"}]},{keyName:"name",label:"Name",placeholder:"Any name"}],fl=[{label:"Service name",keyName:"serviceName",placeholder:"e.g. my-service",tooltip:"Specifies the service name to search within the trace (Across all available spans)."},{label:"Sampling ratio",keyName:"samplingRatio",placeholder:"e.g. 10",tooltip:"Specifies the sample rate for all traces.",inputType:w.Number},{label:"Fallback sampling ratio",keyName:"fallbackSamplingRatio",placeholder:"e.g. 100",tooltip:"Specifies the percentage of traces that don’t meet the service name filter and that you still like to retain.",inputType:w.Number}],vl=[{label:"Service name",keyName:"serviceName",placeholder:"e.g. my-service",tooltip:"Specifies the service name to search within the trace (across all available spans)."},{label:"Attribute key",keyName:"attributeKey",placeholder:"e.g. http.request.method",tooltip:"Specifies the attribute key inside of the span."},{label:"Fallback sampling ratio",keyName:"fallbackSamplingRatio",placeholder:"e.g. 100",tooltip:"Specifies the percentage of traces that don’t meet the service name filter and that you still like to retain.",inputType:w.Number},{label:"Condition",keyName:"condition",tooltip:"An object representing the filters for span attributes filters.",componentType:P.Dropdown,options:[{id:"stringCondition",label:"String condition"},{id:"numberCondition",label:"Number condition"},{id:"booleanCondition",label:"Boolean condition"},{id:"jsonCondition",label:"JSON condition"}]},{label:"Operation",keyName:"operation",tooltip:"Specifies the operation to run against the attribute.",componentType:P.Dropdown,options:[{id:"exists",label:"Exists"},{id:"equals",label:"Equals"},{id:"not_equals",label:"Not equals"},{id:"contains",label:"Contains"},{id:"not_contains",label:"Not contains"},{id:"regex",label:"Regex"},{id:"greater_than",label:"Greater than"},{id:"less_than",label:"Less than"},{id:"greater_than_or_equal",label:"Greater than or equal"},{id:"less_than_or_equal",label:"Less than or equal"},{id:"is_valid_json",label:"Is valid JSON"},{id:"is_invalid_json",label:"Is invalid JSON"},{id:"jsonpath_exists",label:"JSON path exists"},{id:"key_equals",label:"Key equals"},{id:"key_not_equals",label:"Key not equals"}]},{label:"Expected value",keyName:"expectedValue",placeholder:"e.g. GET",tooltip:"The values to test the attribute against."},{label:"JSON path",keyName:"jsonPath",placeholder:"e.g. $.user.role",tooltip:"An expression used to navigate the JSON structure.",renderCondition:e=>"jsonCondition"===e.condition}],yl={[M.K8sAttributes]:({value:i,setValue:o,formErrors:l})=>(n(()=>{i[b.CollectContainerAttributes]||i[b.CollectReplicaSetAttributes]||i[b.CollectWorkloadId]||i[b.CollectClusterId]||i[b.LabelsAttributes]?.length||i[b.AnnotationsAttributes]?.length||(o(b.CollectContainerAttributes,!0),o(b.CollectReplicaSetAttributes,!0),o(b.CollectWorkloadId,!0),o(b.CollectClusterId,!0),o(b.LabelsAttributes,[]),o(b.AnnotationsAttributes,[]))},[]),e(a,{children:[t(f,{$gap:6,children:dl.map(({id:a,label:n})=>e(f,{children:[t(y,{label:n,value:i[a]||!1,onChange:e=>o(a,e)}),t(S,{errorMessage:l[a]})]},a))}),t(x,{name:"labelsAttributes",label:"Label attributes",limitFieldsPerRow:2,columns:pl,values:i[b.LabelsAttributes]||[],setValues:e=>o(b.LabelsAttributes,e),errorMessage:l[b.LabelsAttributes]}),t(x,{name:"annotationsAttributes",label:"Annotation attributes",limitFieldsPerRow:2,columns:hl,values:i[b.AnnotationsAttributes]||[],setValues:e=>o(b.AnnotationsAttributes,e),errorMessage:l[b.AnnotationsAttributes]})]})),[M.AddClusterInfo]:({value:n,setValue:i,formErrors:o})=>{const l=h();return e(a,{children:[t(T,{label:"Overwrite existing values",labelAlign:A.Left,labelColor:l.v2.colors.silver[200],tooltip:"If enabled, the resource attributes will overwrite any existing attributes with the same name.",value:n[b.OverwriteExistingValues]||!1,onChange:e=>i(b.OverwriteExistingValues,e)}),t(x,{name:"clusterAttributes",label:"Resource attributes",limitFieldsPerRow:2,columns:[{keyName:"attributeName",label:"Attribute name"},{keyName:"attributeStringValue",label:"Attribute value"}],values:n[b.ClusterAttributes]||[],setValues:e=>i(b.ClusterAttributes,e),errorMessage:o[b.ClusterAttributes]})]})},[M.DeleteAttributes]:({value:e,setValue:a,formErrors:n})=>t(N,{name:"attributeNamesToDelete",label:"Attributes to delete",values:e[b.AttributeNamesToDelete]||[],setValues:e=>a(b.AttributeNamesToDelete,e),errorMessage:n[b.AttributeNamesToDelete]}),[M.RenameAttributes]:({value:e,setValue:a,formErrors:n})=>t(x,{name:"renames",label:"Attributes to rename",limitFieldsPerRow:2,columns:[{keyName:"oldKey",label:"Old key"},{keyName:"newKey",label:"New key"}],values:Object.entries(e[b.Renames]||{}).map(([e,t])=>({oldKey:e,newKey:t})),setValues:e=>{const t={};e.forEach(e=>t[e.oldKey]=e.newKey),a(b.Renames,t)},errorMessage:n[b.Renames]}),[M.PiiMasking]:({value:a,setValue:i,formErrors:o})=>(n(()=>{a[b.PiiCategories]?.length||i(b.PiiCategories,cl.map(({id:e})=>e))},[]),e(f,{$gap:12,children:[t(v,{label:"Attributes to mask"}),t(f,{$gap:6,children:cl.map(({id:e,label:n})=>t(y,{label:n,value:a[b.PiiCategories]?.includes(e)||!1,onChange:t=>{const n=a[b.PiiCategories]||[],o=t?[...n,e]:n.filter(t=>t!==e);i(b.PiiCategories,o)}},e))}),t(S,{errorMessage:o[b.PiiCategories]})]})),[M.ErrorSampler]:({value:e,setValue:a,formErrors:n})=>{const i=n[b.FallbackSamplingRatio],o=k(e[b.FallbackSamplingRatio])?"":String(e[b.FallbackSamplingRatio]);return t(C,{name:"fallbackSamplingRatio",label:"Fallback sampling ratio",type:w.Number,min:0,max:100,value:o,placeholder:"0-100",onChange:e=>{return t=e.target.value,a(b.FallbackSamplingRatio,Math.max(0,Math.min(Number(t),100))||0);var t},errorMessage:i})},[M.ProbabilisticSampler]:({value:e,setValue:a,formErrors:n})=>{const i=n[b.SamplingPercentage],o=k(e[b.SamplingPercentage])?"":String(e[b.SamplingPercentage]);return t(C,{name:"samplingPercentage",label:"Sampling percentage",type:w.Number,min:0,max:100,value:o,placeholder:"0-100",onChange:e=>{return t=e.target.value,a(b.SamplingPercentage,Math.max(0,Math.min(Number(t),100))||0);var t},errorMessage:i})},[M.LatencySampler]:({value:e,setValue:a,formErrors:n})=>{const i=n[b.EndpointsFilters],o=e[b.EndpointsFilters]||[];return t(x,{name:"endpointsFilters",limitFieldsPerRow:2,columns:ml,values:o,setValues:e=>{a(b.EndpointsFilters,e.map(({serviceName:e,httpRoute:t,minimumLatencyThreshold:a,fallbackSamplingRatio:n})=>({serviceName:e,httpRoute:t,minimumLatencyThreshold:Number(a),fallbackSamplingRatio:Number(n)})))},errorMessage:i})},[M.ServiceNameSampler]:({value:e,setValue:a,formErrors:n})=>{const i=n[b.ServicesNameFilters],o=e[b.ServicesNameFilters]||[];return t(x,{name:"servicesNameFilters",limitFieldsPerRow:2,columns:fl,values:o,setValues:e=>{a(b.ServicesNameFilters,e.map(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:a})=>({serviceName:e,samplingRatio:Number(t),fallbackSamplingRatio:Number(a)})))},errorMessage:i})},[M.SpanAttributeSampler]:({value:e,setValue:a,formErrors:n})=>{const i=n[b.AttributeFilters],o=(e[b.AttributeFilters]||[]).map(({serviceName:e,attributeKey:t,fallbackSamplingRatio:a,condition:n})=>{const i=Object.entries(n).filter(([e,t])=>t)[0][0];return{serviceName:e,attributeKey:t,fallbackSamplingRatio:a,condition:i,operation:n[i]?.operation,expectedValue:n[i]?.expectedValue,jsonPath:n[i]?.jsonPath}});return t(x,{name:"attributeFilters",limitFieldsPerRow:2,columns:vl,values:o,setValues:e=>{a(b.AttributeFilters,e.map(({serviceName:e,attributeKey:t,fallbackSamplingRatio:a,condition:n,operation:i,expectedValue:o,jsonPath:l})=>{const s={serviceName:e,attributeKey:t,fallbackSamplingRatio:Number(a),condition:{[n]:{operation:i,expectedValue:o}}};return l&&(s.condition[n].jsonPath=l),s}))},errorMessage:i})},[M.URLTemplatization]:({value:n,setValue:o,formErrors:l})=>{const s=h(),r=n[gl]||[{filterK8sNamespace:"",workloadFilters:[],templatizationRules:[{template:""}],notes:""}],c=e=>o(gl,e),d=(e,t)=>c(r.map((a,n)=>n===e?{...a,...t}:a));return e(a,{children:[r.map((a,n)=>e(i,{children:[t(I,{}),e(f,{$gap:12,children:[e(E,{$justifyContent:"space-between",$alignItems:"center",children:[t(v,{label:`Rule Group ${n+1}`}),t(D,{leftIcon:()=>t(Zi,{fill:s.v2.colors.red[500]}),variant:O.Secondary,size:R.S,onClick:()=>{return e=n,c(r.filter((t,a)=>a!==e));var e},disabled:1===r.length})]}),t(C,{name:`urlGroup-${n}-namespace`,label:"Namespace",placeholder:"All namespaces",tooltip:"Filter rules to a specific Kubernetes namespace.",value:a.filterK8sNamespace||"",onChange:e=>d(n,{filterK8sNamespace:e.target.value})}),t(x,{name:`urlGroup-${n}-workloadFilters`,label:"Workload filters",tooltip:"Optionally scope templates to specific workloads.",columns:bl,values:a.workloadFilters||[],setValues:e=>d(n,{workloadFilters:e})}),t(N,{name:`urlGroup-${n}-templates`,label:"Templates",required:!0,placeholder:"e.g. /user/{id}",values:a.templatizationRules.map(e=>e.template),setValues:e=>d(n,{templatizationRules:e.map(e=>({template:e}))})})]}),t(S,{errorMessage:l[gl]})]},`url-templatization-group-${n}`)),t(D,{variant:O.Secondary,label:"Add rule group",leftIcon:eo,onClick:()=>c([...r,{filterK8sNamespace:"",workloadFilters:[],templatizationRules:[{template:""}],notes:""}])}),t(I,{})]})}},Sl=({actionType:e,value:a,setValue:n,formErrors:i})=>{if(!e)return null;const o=yl[e];return o?t(o,{value:a,setValue:n,formErrors:i}):null},Cl=()=>{const a=h(),{selectedOption:n,genericForm:i}=L();if(!i||!n)return t(z,{title:"No active form"});const{formData:o,handleFormChange:l,formErrors:s}=i;return e(f,{$gap:24,children:[e(E,{$gap:12,$justifyContent:"space-between",children:[t(F,{size:V.XXS,children:n.docsDescription}),t(D,{label:"Docs",leftIcon:to,variant:O.Text,size:R.S,onClick:()=>window.open(`${B}${n.docsEndpoint}`,"_blank","noopener noreferrer")})]}),t(_,{options:[{icon:ao,label:"Enabled",value:!1,selectedBgColor:a.v2.colors.green[800]},{icon:no,label:"Disabled",value:!0,selectedBgColor:a.v2.colors.red[800]}],selected:o.disabled,setSelected:e=>l("disabled",e)}),t(jo,{title:"Signals for processing",allowedSignals:n.allowedSignals,selectedSignals:o.signals||[],setSelectedSignals:e=>l("signals",e),errorMessage:s.signals}),t(C,{name:"actionName",label:"Action name",placeholder:"Use a name that describes the action...",value:o.name||"",onChange:({target:{value:e}})=>l("name",e),errorMessage:s.name}),t(Sl,{actionType:n.type,value:o.fields,setValue:(e,t)=>l(`fields.${e}`,t),formErrors:s}),t(X,{name:"notes",label:"Notes",placeholder:"Your personal notes...",value:o.notes||"",onChange:({target:{value:e}})=>l("notes",e),errorMessage:s.notes})]})},wl=({signals:e,fields:a,disabled:n,formData:i,handleFormChange:o,formErrors:l})=>a?.map(({renderCondition:a,componentType:s,type:r,name:c,title:d,tooltip:u,placeholder:p,value:h,required:m,options:g})=>{if(!(!a||j(a,e,i.fields)))return null;const b=c,f=i.fields.find(e=>e.key===b),v=f?f.value:h;return t(Uo,{componentType:s,inputType:r,name:b,label:d,tooltip:u,disabled:n,required:m,placeholder:p,errorMessage:l[b],dropdownOptions:g,value:v||"",setValue:e=>o(b,e)},b)}),kl=p(E)`
|
|
2
2
|
position: sticky;
|
|
3
3
|
bottom: 4px;
|
|
4
4
|
align-self: center;
|
|
@@ -9,7 +9,7 @@ import{jsxs as e,jsx as t,Fragment as a}from"react/jsx-runtime";import{useEffect
|
|
|
9
9
|
background-color: ${({theme:e})=>e.v2.colors.black[500]};
|
|
10
10
|
box-shadow: 0 4px 16.7px 0 rgba(0, 0, 0, 0.83);
|
|
11
11
|
z-index: 1;
|
|
12
|
-
`,xl=o(({testConnection:a,isEdit:i},o)=>{const r=h(),{activeForm:c,genericForm:d,validateFormData:u,thisUnsavedDestination:p,addUnsavedDestination:m,updateUnsavedDestination:g,deleteUnsavedDestination:b}=U(),[v,y]=l(p?.testResult),[S,w]=l(!!p);n(()=>{p?(y(p.testResult),w(!0)):(y(void 0),w(!1))},[p]);const k=async()=>{if(!c?.option.testConnectionSupported||!d)return;const e=await a(Y(d.formData));return y(e),e};return s(o,()=>({testConnection:k,testConnectionSupported:!!c?.option.testConnectionSupported}),[c?.option.testConnectionSupported,d,a]),d&&c?e(f,{$gap:24,style:{minHeight:"100%"},children:[e(E,{$gap:12,$justifyContent:"space-between",children:[v?v.succeeded?t(W,{status:H.Success,message:v.message||"Connection OK",fullWidth:!0,smallIcon:!0}):t(W,{status:H.Error,message:v.message||"Connection Failed",fullWidth:!0,smallIcon:!0}):t("div",{}),t(D,{"data-id":"dest-form-docs",label:"Docs",leftIcon:to,variant:O.Text,size:R.S,onClick:()=>window.open(`${B}/backends/${c.option.type}`,"_blank","noopener noreferrer")})]}),t(_,{options:[{icon:ao,label:"Enabled",value:!1,selectedBgColor:r.v2.colors.green[800]},{icon:no,label:"Disabled",value:!0,selectedBgColor:r.v2.colors.red[800]}],selected:d.formData.disabled,setSelected:e=>d.handleFormChange("disabled",e),disabled:S}),t(jo,{title:"This connection will monitor:",allowedSignals:q(c.option.supportedSignals),selectedSignals:K(d.formData.exportedSignals),setSelectedSignals:e=>d.handleFormChange("exportedSignals",{logs:e.includes(G.Logs),metrics:e.includes(G.Metrics),traces:e.includes(G.Traces)}),disabled:S,errorMessage:d.formErrors.exportedSignals}),t(C,{name:"destinationName",label:"Destination name",placeholder:"Use a name that describes the destination...",value:d.formData.name,onChange:({target:{value:e}})=>d.handleFormChange("name",e),disabled:S,errorMessage:d.formErrors.name}),t(wl,{signals:K(d.formData.exportedSignals),fields:c.dynamicFields,disabled:S,formData:d.formData,handleFormChange:(e,t)=>{d.handleFormChange("fields",d.formData.fields.map(a=>a.key===e?{...a,value:t}:a))},formErrors:d.formErrors}),!i&&e(kl,{$gap:8,$justifyContent:"center",children:[p&&t("div",{style:{width:"150px"},children:t(D,{"data-id":"dest-form-delete",fullWidth:!0,label:"Delete",rightIcon:io,variant:O.Secondary,textColor:r.v2.colors.red[500],onClick:()=>b(c.unsavedIdx)})}),(!p||p.option.testConnectionSupported&&!S)&&t("div",{style:{width:"150px"},children:t(D,{"data-id":"dest-form-test-connection",fullWidth:!0,label:"Test Connection",variant:O.Secondary,onClick:k})}),p&&t("div",S?{style:{width:"150px"},children:t(D,{"data-id":"dest-form-edit",fullWidth:!0,label:"Edit",rightIcon:oo,variant:O.Secondary,onClick:()=>w(!1)})}:{style:{width:"150px"},children:t(D,{"data-id":"dest-form-save",fullWidth:!0,label:"Save Changes",variant:O.Primary,onClick:async()=>{const{errorMessage:e,preparedFormData:t}=u();if(!e){const e=await k(),a=!!e&&!e.succeeded;g(c.unsavedIdx,{formData:t,testResult:e},a)}}})}),!p&&t("div",{style:{width:"150px"},children:t(D,{"data-id":"dest-form-add",fullWidth:!0,label:"Add Destination",variant:O.Primary,onClick:async()=>{const{errorMessage:e,preparedFormData:t}=u();if(!e){const e=await k(),a=!!e&&!e.succeeded;m({formData:t,testResult:e},a)}}})})]})]}):t(z,{title:"No active form"})});xl.displayName="AddDestinationForm";const $l=[{id:Q.FilePath,label:"Collect file path",tooltip:"Indicates whether to record the `code.filepath` attribute."},{id:Q.Function,label:"Collect function",tooltip:"Indicates whether to record the `code.function` attribute."},{id:Q.LineNumber,label:"Collect line number",tooltip:"Indicates whether to record the `code.lineno` attribute."}],Tl=[{id:Q.Column,label:"Collect column",tooltip:"Indicates whether to record the `code.column` attribute."},{id:Q.Namespace,label:"Collect namespace",tooltip:"Indicates whether to record the `code.namespace` attribute."},{id:Q.StackTrace,label:"Collect stacktrace",tooltip:"Indicates whether to record the `code.stacktrace` attribute."}],Al=["*"],Nl=[{id:te.HttpRequest,label:"Collect HTTP request",tooltip:""},{id:te.HttpResponse,label:"Collect HTTP response",tooltip:""},{id:te.DbQuery,label:"Collect DB query",tooltip:""},{id:te.Messaging,label:"Collect messaging",tooltip:""}],Il={[ie.Java]:[new ne("","")],[ie.Golang]:[new ae("")]},El={[oe.CodeAttributes]:({value:i,setValue:o,formErrors:l})=>{const s=l.codeAttributes,c=r(()=>Object.entries(i.codeAttributes||{}).filter(([e,t])=>!!t).map(([e])=>e),[i]);n(()=>{if(!c.length&&!s){const e={[Q.FilePath]:!0,[Q.Function]:!0,[Q.LineNumber]:!0,[Q.Column]:null,[Q.Namespace]:null,[Q.StackTrace]:null};o("codeAttributes",e)}},[]);const d=(e,t)=>{const a=t?[...c,e]:c.filter(t=>t!==e),n=Object.values(Q).reduce((e,t)=>(e[t]=!!a.includes(t)||null,e),{});o("codeAttributes",n)};return e(a,{children:[e(f,{$gap:12,children:[t(F,{size:V.XS,color:J.Secondary,nowrap:!0,children:"Recommended data to collect"}),t(f,{$gap:6,children:$l.map(({id:e,label:a,tooltip:n})=>t(Z,{text:n,withIcon:!0,children:t(y,{label:a,value:c.includes(e),onChange:t=>d(e,t)})},e))}),t(S,{errorMessage:s})]}),e(f,{$gap:12,children:[t(F,{size:V.XS,color:J.Secondary,nowrap:!0,children:"Verbose data to collect"}),t(f,{$gap:6,children:Tl.map(({id:e,label:a,tooltip:n})=>t(Z,{text:n,withIcon:!0,children:t(y,{label:a,value:c.includes(e),onChange:t=>d(e,t)})},e))}),t(S,{errorMessage:s})]})]})},[oe.CustomInstrumentation]:({value:i,setValue:o,formErrors:l})=>{const s=l.customInstrumentations,c=r(()=>(i?.customInstrumentations?.[ie.Golang]||[]).map(e=>new ae(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)),[i]),d=r(()=>(i?.customInstrumentations?.[ie.Java]||[]).map(e=>new ne(e.className,e.methodName)),[i]);return n(()=>{i?.customInstrumentations||s||o("customInstrumentations",{[ie.Golang]:Il[ie.Golang],[ie.Java]:Il[ie.Java]})},[]),e(a,{children:[e(f,{children:[e(E,{$gap:8,children:[t(lo,{}),t(v,{label:"Golang custom probes"})]}),t(x,{name:"golangProbes",columns:[{keyName:"packageName",label:"Package name",placeholder:"e.g. github.com/my-org/my-package",tooltip:"The full import path of the package containing the function or method to be instrumented."},{keyName:"functionName",label:"Function name",placeholder:"e.g. myFunction",tooltip:"The name of the function to be instrumented. Leave empty if instrumenting a receiver method."},{keyName:"receiverName",label:"Receiver name",placeholder:"e.g. myReceiver",tooltip:"The name of the receiver type if instrumenting a method. Leave empty if instrumenting a standalone function."},{keyName:"receiverMethodName",label:"Receiver method name",placeholder:"e.g. myMethod",tooltip:"The name of the method to be instrumented. Leave empty if instrumenting a standalone function."}],values:c,setValues:e=>{const t={};t[ie.Golang]=e.map(e=>new ae(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)),t[ie.Java]=d,o("customInstrumentations",t)},errorMessage:s,limitFieldsPerRow:2})]}),e(f,{children:[e(E,{$gap:8,children:[t(so,{}),t(v,{label:"Java custom probes"})]}),t(x,{name:"javaProbes",columns:[{keyName:"className",label:"Class name",placeholder:"e.g. com.example.MyClass",tooltip:"The name of the class to be instrumented."},{keyName:"methodName",label:"Method name",placeholder:"e.g. myMethod",tooltip:"The name of the method to be instrumented."}],values:d,setValues:e=>{const t={};t[ie.Golang]=c,t[ie.Java]=e.map(e=>new ne(e.className,e.methodName)),o("customInstrumentations",t)},errorMessage:s,limitFieldsPerRow:2})]})]})},[oe.HeadersCollection]:({value:e,setValue:a,formErrors:i})=>{const o=i.headersCollection,l=r(()=>e?.headersCollection?.[ee.HeaderKeys]||[],[e]),s=e=>{const t={[ee.HeaderKeys]:e};a("headersCollection",t)};return n(()=>{l.length||o||s(Al)},[]),t(N,{name:"headerKeys",label:"Header keys",tooltip:"Specify which headers you want to collect",helpMessage:"Asterisk (*) will collect all headers",values:l,setValues:s,errorMessage:o})},[oe.PayloadCollection]:({value:a,setValue:i,formErrors:o})=>{const l=o.payloadCollection,s=r(()=>Object.entries(a.payloadCollection||{}).filter(([e,t])=>!!t).map(([e])=>e),[a]);n(()=>{if(!s.length&&!l){const e={[te.HttpRequest]:{},[te.HttpResponse]:{},[te.DbQuery]:{},[te.Messaging]:{}};i("payloadCollection",e)}},[]);return e(f,{$gap:12,children:[t(F,{size:V.XS,color:J.Secondary,nowrap:!0,children:"Type of data to collect"}),t(f,{$gap:6,children:Nl.map(({id:e,label:a,tooltip:n})=>t(Z,{text:n,withIcon:!0,children:t(y,{label:a,value:s.includes(e),onChange:t=>((e,t)=>{const a=t?[...s,e]:s.filter(t=>t!==e),n={[te.HttpRequest]:a.includes(te.HttpRequest)?{}:null,[te.HttpResponse]:a.includes(te.HttpResponse)?{}:null,[te.DbQuery]:a.includes(te.DbQuery)?{}:null,[te.Messaging]:a.includes(te.Messaging)?{}:null};i("payloadCollection",n)})(e,t)})},e))}),t(S,{errorMessage:l})]})},[oe.UnknownType]:null},Dl=({ruleType:e,value:a,setValue:n,formErrors:i})=>{if(!e)return null;const o=El[e];return o?t(o,{value:a,setValue:n,formErrors:i}):null},Rl=()=>{const a=h(),{selectedOption:n,genericForm:i}=le();if(!i||!n)return t(z,{title:"No active form"});const{formData:o,handleFormChange:l,formErrors:s}=i;return e(f,{$gap:24,children:[e(E,{$gap:12,$justifyContent:"space-between",children:[t(F,{size:V.XXS,children:n.docsDescription}),t(D,{label:"Docs",leftIcon:to,variant:O.Text,size:R.S,onClick:()=>window.open(`${B}${n.docsEndpoint}`,"_blank","noopener noreferrer")})]}),e(E,{$gap:12,children:[t(F,{size:V.XS,color:J.Secondary,nowrap:!0,children:"Supported Languages:"}),n.supportedLanguages.map(e=>t(se,{label:re[e],leftIcon:ce(e),status:H.Default,useSecondaryTone:!0},e))]}),t(_,{options:[{icon:ao,label:"Enabled",value:!1,selectedBgColor:a.v2.colors.green[800]},{icon:no,label:"Disabled",value:!0,selectedBgColor:a.v2.colors.red[800]}],selected:o.disabled,setSelected:e=>l("disabled",e)}),t(C,{name:"ruleName",label:"Rule name",placeholder:"Use a name that describes the rule...",value:o.ruleName,onChange:({target:{value:e}})=>l("ruleName",e),errorMessage:s.ruleName}),t(Dl,{ruleType:n.type,value:o,setValue:(e,t)=>l(e,t),formErrors:s}),t(X,{name:"notes",label:"Notes",placeholder:"Your personal notes...",value:o.notes,onChange:({target:{value:e}})=>l("notes",e),errorMessage:s.notes})]})},Ol=()=>{const{pendingMerge:e,confirmMerge:a,cancelMerge:n}=de();if(!e)return null;const{existingName:i,editingName:o}=e;return t(ue,{isOpen:!0,onClose:n,title:"Merge with existing Data Stream?",description:pe.DATA_STREAM_MERGE_WARNING(o,i),approveButton:{"data-id":"data-stream-merge-confirm",label:"Merge",variant:O.Primary,onClick:a},denyButton:{"data-id":"data-stream-merge-cancel",label:"Cancel",variant:O.Secondary,onClick:n}})},Pl=({autoFocus:a})=>{const{dataStreams:n}=he(),{genericForm:i,excludeName:o,editingName:l}=de(),{formData:s,formErrors:c,handleFormChange:d}=i,u=s.name,p=r(()=>n.find(e=>e.name===u&&e.name!==o),[n,u,o]);return e(f,{$width:"100%",$gap:12,children:[t(C,{name:"data-stream-name",label:pe.STREAM_NAME,placeholder:pe.NAME_YOUR_STREAM_PLACEHOLDER,tooltip:pe.STREAM_DESCRIPTION,required:!0,autoFocus:a,value:u,onChange:e=>d("name",e.target.value),errorMessage:c.name}),p&&t(W,{status:H.Warning,message:pe.DATA_STREAM_MERGE_WARNING(l,p.name),fullWidth:!0})]})},Ml=[{value:"all",label:"Drop All"},{value:"sample",label:"Sample"}],Ll=p.div`
|
|
12
|
+
`,xl=o(({testConnection:a,isEdit:i},o)=>{const r=h(),{activeForm:c,genericForm:d,validateFormData:u,thisUnsavedDestination:p,addUnsavedDestination:m,updateUnsavedDestination:g,deleteUnsavedDestination:b}=U(),[v,y]=l(p?.testResult),[S,w]=l(!!p);n(()=>{p?(y(p.testResult),w(!0)):(y(void 0),w(!1))},[p]);const k=async()=>{if(!c?.option.testConnectionSupported||!d)return;const e=await a(Y(d.formData));return y(e),e};return s(o,()=>({testConnection:k,testConnectionSupported:!!c?.option.testConnectionSupported}),[c?.option.testConnectionSupported,d,a]),d&&c?e(f,{$gap:24,style:{minHeight:"100%"},children:[e(E,{$gap:12,$justifyContent:"space-between",children:[v?v.succeeded?t(W,{status:H.Success,message:v.message||"Connection OK",fullWidth:!0,smallIcon:!0}):t(W,{status:H.Error,message:v.message||"Connection Failed",fullWidth:!0,smallIcon:!0}):t("div",{}),t(D,{"data-id":"dest-form-docs",label:"Docs",leftIcon:to,variant:O.Text,size:R.S,onClick:()=>window.open(`${B}/backends/${c.option.type}`,"_blank","noopener noreferrer")})]}),t(_,{options:[{icon:ao,label:"Enabled",value:!1,selectedBgColor:r.v2.colors.green[800]},{icon:no,label:"Disabled",value:!0,selectedBgColor:r.v2.colors.red[800]}],selected:d.formData.disabled,setSelected:e=>d.handleFormChange("disabled",e),disabled:S}),t(jo,{title:"This connection will monitor:",allowedSignals:q(c.option.supportedSignals),selectedSignals:K(d.formData.exportedSignals),setSelectedSignals:e=>d.handleFormChange("exportedSignals",{logs:e.includes(G.Logs),metrics:e.includes(G.Metrics),traces:e.includes(G.Traces),profiles:e.includes(G.Profiles)}),disabled:S,errorMessage:d.formErrors.exportedSignals}),t(C,{name:"destinationName",label:"Destination name",placeholder:"Use a name that describes the destination...",value:d.formData.name,onChange:({target:{value:e}})=>d.handleFormChange("name",e),disabled:S,errorMessage:d.formErrors.name}),t(wl,{signals:K(d.formData.exportedSignals),fields:c.dynamicFields,disabled:S,formData:d.formData,handleFormChange:(e,t)=>{d.handleFormChange("fields",d.formData.fields.map(a=>a.key===e?{...a,value:t}:a))},formErrors:d.formErrors}),!i&&e(kl,{$gap:8,$justifyContent:"center",children:[p&&t("div",{style:{width:"150px"},children:t(D,{"data-id":"dest-form-delete",fullWidth:!0,label:"Delete",rightIcon:io,variant:O.Secondary,textColor:r.v2.colors.red[500],onClick:()=>b(c.unsavedIdx)})}),(!p||p.option.testConnectionSupported&&!S)&&t("div",{style:{width:"150px"},children:t(D,{"data-id":"dest-form-test-connection",fullWidth:!0,label:"Test Connection",variant:O.Secondary,onClick:k})}),p&&t("div",S?{style:{width:"150px"},children:t(D,{"data-id":"dest-form-edit",fullWidth:!0,label:"Edit",rightIcon:oo,variant:O.Secondary,onClick:()=>w(!1)})}:{style:{width:"150px"},children:t(D,{"data-id":"dest-form-save",fullWidth:!0,label:"Save Changes",variant:O.Primary,onClick:async()=>{const{errorMessage:e,preparedFormData:t}=u();if(!e){const e=await k(),a=!!e&&!e.succeeded;g(c.unsavedIdx,{formData:t,testResult:e},a)}}})}),!p&&t("div",{style:{width:"150px"},children:t(D,{"data-id":"dest-form-add",fullWidth:!0,label:"Add Destination",variant:O.Primary,onClick:async()=>{const{errorMessage:e,preparedFormData:t}=u();if(!e){const e=await k(),a=!!e&&!e.succeeded;m({formData:t,testResult:e},a)}}})})]})]}):t(z,{title:"No active form"})});xl.displayName="AddDestinationForm";const $l=[{id:Q.FilePath,label:"Collect file path",tooltip:"Indicates whether to record the `code.filepath` attribute."},{id:Q.Function,label:"Collect function",tooltip:"Indicates whether to record the `code.function` attribute."},{id:Q.LineNumber,label:"Collect line number",tooltip:"Indicates whether to record the `code.lineno` attribute."}],Tl=[{id:Q.Column,label:"Collect column",tooltip:"Indicates whether to record the `code.column` attribute."},{id:Q.Namespace,label:"Collect namespace",tooltip:"Indicates whether to record the `code.namespace` attribute."},{id:Q.StackTrace,label:"Collect stacktrace",tooltip:"Indicates whether to record the `code.stacktrace` attribute."}],Al=["*"],Nl=[{id:te.HttpRequest,label:"Collect HTTP request",tooltip:""},{id:te.HttpResponse,label:"Collect HTTP response",tooltip:""},{id:te.DbQuery,label:"Collect DB query",tooltip:""},{id:te.Messaging,label:"Collect messaging",tooltip:""}],Il={[ie.Java]:[new ne("","")],[ie.Golang]:[new ae("")]},El={[oe.CodeAttributes]:({value:i,setValue:o,formErrors:l})=>{const s=l.codeAttributes,c=r(()=>Object.entries(i.codeAttributes||{}).filter(([e,t])=>!!t).map(([e])=>e),[i]);n(()=>{if(!c.length&&!s){const e={[Q.FilePath]:!0,[Q.Function]:!0,[Q.LineNumber]:!0,[Q.Column]:null,[Q.Namespace]:null,[Q.StackTrace]:null};o("codeAttributes",e)}},[]);const d=(e,t)=>{const a=t?[...c,e]:c.filter(t=>t!==e),n=Object.values(Q).reduce((e,t)=>(e[t]=!!a.includes(t)||null,e),{});o("codeAttributes",n)};return e(a,{children:[e(f,{$gap:12,children:[t(F,{size:V.XS,color:J.Secondary,nowrap:!0,children:"Recommended data to collect"}),t(f,{$gap:6,children:$l.map(({id:e,label:a,tooltip:n})=>t(Z,{text:n,withIcon:!0,children:t(y,{label:a,value:c.includes(e),onChange:t=>d(e,t)})},e))}),t(S,{errorMessage:s})]}),e(f,{$gap:12,children:[t(F,{size:V.XS,color:J.Secondary,nowrap:!0,children:"Verbose data to collect"}),t(f,{$gap:6,children:Tl.map(({id:e,label:a,tooltip:n})=>t(Z,{text:n,withIcon:!0,children:t(y,{label:a,value:c.includes(e),onChange:t=>d(e,t)})},e))}),t(S,{errorMessage:s})]})]})},[oe.CustomInstrumentation]:({value:i,setValue:o,formErrors:l})=>{const s=l.customInstrumentations,c=r(()=>(i?.customInstrumentations?.[ie.Golang]||[]).map(e=>new ae(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)),[i]),d=r(()=>(i?.customInstrumentations?.[ie.Java]||[]).map(e=>new ne(e.className,e.methodName)),[i]);return n(()=>{i?.customInstrumentations||s||o("customInstrumentations",{[ie.Golang]:Il[ie.Golang],[ie.Java]:Il[ie.Java]})},[]),e(a,{children:[e(f,{children:[e(E,{$gap:8,children:[t(lo,{}),t(v,{label:"Golang custom probes"})]}),t(x,{name:"golangProbes",columns:[{keyName:"packageName",label:"Package name",placeholder:"e.g. github.com/my-org/my-package",tooltip:"The full import path of the package containing the function or method to be instrumented."},{keyName:"functionName",label:"Function name",placeholder:"e.g. myFunction",tooltip:"The name of the function to be instrumented. Leave empty if instrumenting a receiver method."},{keyName:"receiverName",label:"Receiver name",placeholder:"e.g. myReceiver",tooltip:"The name of the receiver type if instrumenting a method. Leave empty if instrumenting a standalone function."},{keyName:"receiverMethodName",label:"Receiver method name",placeholder:"e.g. myMethod",tooltip:"The name of the method to be instrumented. Leave empty if instrumenting a standalone function."}],values:c,setValues:e=>{const t={};t[ie.Golang]=e.map(e=>new ae(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)),t[ie.Java]=d,o("customInstrumentations",t)},errorMessage:s,limitFieldsPerRow:2})]}),e(f,{children:[e(E,{$gap:8,children:[t(so,{}),t(v,{label:"Java custom probes"})]}),t(x,{name:"javaProbes",columns:[{keyName:"className",label:"Class name",placeholder:"e.g. com.example.MyClass",tooltip:"The name of the class to be instrumented."},{keyName:"methodName",label:"Method name",placeholder:"e.g. myMethod",tooltip:"The name of the method to be instrumented."}],values:d,setValues:e=>{const t={};t[ie.Golang]=c,t[ie.Java]=e.map(e=>new ne(e.className,e.methodName)),o("customInstrumentations",t)},errorMessage:s,limitFieldsPerRow:2})]})]})},[oe.HeadersCollection]:({value:e,setValue:a,formErrors:i})=>{const o=i.headersCollection,l=r(()=>e?.headersCollection?.[ee.HeaderKeys]||[],[e]),s=e=>{const t={[ee.HeaderKeys]:e};a("headersCollection",t)};return n(()=>{l.length||o||s(Al)},[]),t(N,{name:"headerKeys",label:"Header keys",tooltip:"Specify which headers you want to collect",helpMessage:"Asterisk (*) will collect all headers",values:l,setValues:s,errorMessage:o})},[oe.PayloadCollection]:({value:a,setValue:i,formErrors:o})=>{const l=o.payloadCollection,s=r(()=>Object.entries(a.payloadCollection||{}).filter(([e,t])=>!!t).map(([e])=>e),[a]);n(()=>{if(!s.length&&!l){const e={[te.HttpRequest]:{},[te.HttpResponse]:{},[te.DbQuery]:{},[te.Messaging]:{}};i("payloadCollection",e)}},[]);return e(f,{$gap:12,children:[t(F,{size:V.XS,color:J.Secondary,nowrap:!0,children:"Type of data to collect"}),t(f,{$gap:6,children:Nl.map(({id:e,label:a,tooltip:n})=>t(Z,{text:n,withIcon:!0,children:t(y,{label:a,value:s.includes(e),onChange:t=>((e,t)=>{const a=t?[...s,e]:s.filter(t=>t!==e),n={[te.HttpRequest]:a.includes(te.HttpRequest)?{}:null,[te.HttpResponse]:a.includes(te.HttpResponse)?{}:null,[te.DbQuery]:a.includes(te.DbQuery)?{}:null,[te.Messaging]:a.includes(te.Messaging)?{}:null};i("payloadCollection",n)})(e,t)})},e))}),t(S,{errorMessage:l})]})},[oe.UnknownType]:null},Dl=({ruleType:e,value:a,setValue:n,formErrors:i})=>{if(!e)return null;const o=El[e];return o?t(o,{value:a,setValue:n,formErrors:i}):null},Rl=()=>{const a=h(),{selectedOption:n,genericForm:i}=le();if(!i||!n)return t(z,{title:"No active form"});const{formData:o,handleFormChange:l,formErrors:s}=i;return e(f,{$gap:24,children:[e(E,{$gap:12,$justifyContent:"space-between",children:[t(F,{size:V.XXS,children:n.docsDescription}),t(D,{label:"Docs",leftIcon:to,variant:O.Text,size:R.S,onClick:()=>window.open(`${B}${n.docsEndpoint}`,"_blank","noopener noreferrer")})]}),e(E,{$gap:12,children:[t(F,{size:V.XS,color:J.Secondary,nowrap:!0,children:"Supported Languages:"}),n.supportedLanguages.map(e=>t(se,{label:re[e],leftIcon:ce(e),status:H.Default,useSecondaryTone:!0},e))]}),t(_,{options:[{icon:ao,label:"Enabled",value:!1,selectedBgColor:a.v2.colors.green[800]},{icon:no,label:"Disabled",value:!0,selectedBgColor:a.v2.colors.red[800]}],selected:o.disabled,setSelected:e=>l("disabled",e)}),t(C,{name:"ruleName",label:"Rule name",placeholder:"Use a name that describes the rule...",value:o.ruleName,onChange:({target:{value:e}})=>l("ruleName",e),errorMessage:s.ruleName}),t(Dl,{ruleType:n.type,value:o,setValue:(e,t)=>l(e,t),formErrors:s}),t(X,{name:"notes",label:"Notes",placeholder:"Your personal notes...",value:o.notes,onChange:({target:{value:e}})=>l("notes",e),errorMessage:s.notes})]})},Ol=()=>{const{pendingMerge:e,confirmMerge:a,cancelMerge:n}=de();if(!e)return null;const{existingName:i,editingName:o}=e;return t(ue,{isOpen:!0,onClose:n,title:"Merge with existing Data Stream?",description:pe.DATA_STREAM_MERGE_WARNING(o,i),approveButton:{"data-id":"data-stream-merge-confirm",label:"Merge",variant:O.Primary,onClick:a},denyButton:{"data-id":"data-stream-merge-cancel",label:"Cancel",variant:O.Secondary,onClick:n}})},Pl=({autoFocus:a})=>{const{dataStreams:n}=he(),{genericForm:i,excludeName:o,editingName:l}=de(),{formData:s,formErrors:c,handleFormChange:d}=i,u=s.name,p=r(()=>n.find(e=>e.name===u&&e.name!==o),[n,u,o]);return e(f,{$width:"100%",$gap:12,children:[t(C,{name:"data-stream-name",label:pe.STREAM_NAME,placeholder:pe.NAME_YOUR_STREAM_PLACEHOLDER,tooltip:pe.STREAM_DESCRIPTION,required:!0,autoFocus:a,value:u,onChange:e=>d("name",e.target.value),errorMessage:c.name}),p&&t(W,{status:H.Warning,message:pe.DATA_STREAM_MERGE_WARNING(l,p.name),fullWidth:!0})]})},Ml=[{value:"all",label:"Drop All"},{value:"sample",label:"Sample"}],Ll=p.div`
|
|
13
13
|
display: flex;
|
|
14
14
|
flex-direction: column;
|
|
15
15
|
gap: 24px;
|
package/lib/containers.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import{useState as i,useEffect as o,Fragment as r,useRef as s,useMemo as l,useCallback as c,forwardRef as d,useImperativeHandle as u}from"react";import p,{css as m,useTheme as h}from"styled-components";import{z as g,G as y,ae as f,af as v,ag as b,ah as x,ai as C,aj as E,I as T,ak as N,al as k,am as w,an as $,ao as D,ap as A,W as I,y as R,F as O,aq as M,ar as F,as as L,at as _,au as P,av as K,aw as j,ax as V,ay as z,T as U,a3 as q,c as W,az as H,aA as B,aB as G,aa as J,Z as Y,aC as X,E as Q,aD as Z,a4 as ee,aE as te,aF as ne,d as ie,aG as ae,aH as oe,a0 as re,R as se,aI as le,aJ as ce,aK as de,aL as ue,J as pe,O as me,aM as he,q as ge,aN as ye,aO as fe,aP as ve,aQ as be,aR as Se,aS as xe,aT as Ce,aU as Ee,aV as Te,aW as Ne,aX as ke,aY as we,b as $e,Q as De,aZ as Ae,a_ as Ie,a$ as Re,M as Oe,b0 as Me,b1 as Fe,b2 as Le,b3 as _e,b4 as Pe,b5 as Ke,b6 as je,b7 as Ve,b8 as ze,b9 as Ue,ba as qe,bb as We,bc as He,bd as Be,be as Ge,a5 as Je,bf as Ye,a6 as Xe,bg as Qe,bh as Ze,bi as et,bj as tt,bk as nt,bl as it,bm as at,bn as ot,bo as rt,H as st,bp as lt,bq as ct,br as dt,bs as ut,bt as pt,bu as mt,bv as ht,bw as gt,e as yt,bx as ft,h as vt,by as bt,bz as St,bA as xt,bB as Ct,bC as Et,bD as Tt,bE as Nt,bF as kt,bG as wt,bH as $t,bI as Dt,$ as At,bJ as It,bK as Rt,bL as Ot,bM as Mt,bN as Ft,bO as Lt,bP as _t,bQ as Pt,bR as Kt,bS as jt,bT as Vt,bU as zt,bV as Ut,bW as qt,bX as Wt,bY as Ht,bZ as Bt,b_ as Gt,ac as Jt,b$ as Yt,a9 as Xt,a8 as Qt,c0 as Zt,c1 as en,c2 as tn,c3 as nn,c4 as an,c5 as on,c6 as rn,c7 as sn,c8 as ln,c9 as cn,ca as dn,cb as un,cc as pn,cd as mn,u as hn,ce as gn,cf as yn,cg as fn,X as vn,a1 as bn,a2 as Sn,f as xn,ch as Cn,ci as En,cj as Tn,ck as Nn,cl as kn}from"./chunks/ui-components-
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import{useState as i,useEffect as o,Fragment as r,useRef as s,useMemo as l,useCallback as c,forwardRef as d,useImperativeHandle as u}from"react";import p,{css as m,useTheme as h}from"styled-components";import{z as g,G as y,ae as f,af as v,ag as b,ah as x,ai as C,aj as E,I as T,ak as N,al as k,am as w,an as $,ao as D,ap as A,W as I,y as R,F as O,aq as M,ar as F,as as L,at as _,au as P,av as K,aw as j,ax as V,ay as z,T as U,a3 as q,c as W,az as H,aA as B,aB as G,aa as J,Z as Y,aC as X,E as Q,aD as Z,a4 as ee,aE as te,aF as ne,d as ie,aG as ae,aH as oe,a0 as re,R as se,aI as le,aJ as ce,aK as de,aL as ue,J as pe,O as me,aM as he,q as ge,aN as ye,aO as fe,aP as ve,aQ as be,aR as Se,aS as xe,aT as Ce,aU as Ee,aV as Te,aW as Ne,aX as ke,aY as we,b as $e,Q as De,aZ as Ae,a_ as Ie,a$ as Re,M as Oe,b0 as Me,b1 as Fe,b2 as Le,b3 as _e,b4 as Pe,b5 as Ke,b6 as je,b7 as Ve,b8 as ze,b9 as Ue,ba as qe,bb as We,bc as He,bd as Be,be as Ge,a5 as Je,bf as Ye,a6 as Xe,bg as Qe,bh as Ze,bi as et,bj as tt,bk as nt,bl as it,bm as at,bn as ot,bo as rt,H as st,bp as lt,bq as ct,br as dt,bs as ut,bt as pt,bu as mt,bv as ht,bw as gt,e as yt,bx as ft,h as vt,by as bt,bz as St,bA as xt,bB as Ct,bC as Et,bD as Tt,bE as Nt,bF as kt,bG as wt,bH as $t,bI as Dt,$ as At,bJ as It,bK as Rt,bL as Ot,bM as Mt,bN as Ft,bO as Lt,bP as _t,bQ as Pt,bR as Kt,bS as jt,bT as Vt,bU as zt,bV as Ut,bW as qt,bX as Wt,bY as Ht,bZ as Bt,b_ as Gt,ac as Jt,b$ as Yt,a9 as Xt,a8 as Qt,c0 as Zt,c1 as en,c2 as tn,c3 as nn,c4 as an,c5 as on,c6 as rn,c7 as sn,c8 as ln,c9 as cn,ca as dn,cb as un,cc as pn,cd as mn,u as hn,ce as gn,cf as yn,cg as fn,X as vn,a1 as bn,a2 as Sn,f as xn,ch as Cn,ci as En,cj as Tn,ck as Nn,cl as kn}from"./chunks/ui-components-BogDd0Qc.js";import{TrashIcon as wn,VSquareIcon as $n,XSquareIcon as Dn,OdigosLogoText as An,PlusIcon as In,RefreshIcon as Rn,SearchIcon as On,FilterIcon as Mn,DataStreamIcon as Fn,EditIcon as Ln,VIcon as _n,OdigosLogo as Pn,ArrowIcon as Kn,RefreshLeftArrowIcon as jn,NotificationIcon as Vn,UserIcon as zn,ImageErrorIcon as Un,ChevronDownIcon as qn,ChevronRightIcon as Wn,OverviewIcon as Hn,SourceIcon as Bn,DestinationIcon as Gn,InstrumentationRuleIcon as Jn,ActionIcon as Yn,SlackLogo as Xn,KeyIcon as Qn,TerminalIcon as Zn,ExclamationTriangleIcon as ei,TraceViewIcon as ti}from"./icons.js";import{O as ni}from"./chunks/index-Coer-PRZ.js";export{S as SourceDrawer,a as SourceForm}from"./chunks/index-Coer-PRZ.js";import{MarkerType as ii,useNodesState as ai,useEdgesState as oi}from"@xyflow/react";import{E as ri}from"./chunks/vendor-C150cdxb.js";import"zustand";import"javascript-time-ago";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";import"./chunks/index-eOSrP07c.js";const si=e=>{const{type:t,name:n,notes:i,signals:a,disabled:o,fields:{collectContainerAttributes:r,collectReplicaSetAttributes:s,collectWorkloadId:l,collectClusterId:c,labelsAttributes:d,annotationsAttributes:u,clusterAttributes:p,overwriteExistingValues:m,attributeNamesToDelete:h,renames:b,piiCategories:S,fallbackSamplingRatio:x,samplingPercentage:C,endpointsFilters:E,servicesNameFilters:T,attributeFilters:N,urlTemplatizationRulesGroups:k}}=e,w=[{title:g.TYPE,value:t},{type:y.ActiveStatus,title:g.STATUS,value:String(!o)},{type:y.Monitors,title:g.SIGNALS_FOR_PROCESSING,value:a?.join(", ")||""},{title:g.NAME,value:n||""},{title:g.NOTES,value:i||""},{type:y.Divider}];if(t===f.K8sAttributes&&(w.push({title:"Collect Container Attributes",value:String(r)}),w.push({title:"Collect ReplicaSet Attributes",value:String(s)}),w.push({title:"Collect Workload ID",value:String(l)}),w.push({title:"Collect Cluster ID",value:String(c)}),d?.length&&w.push({type:y.Divider}),d?.forEach(({labelKey:e,attributeKey:t,from:n,fromSources:i},a)=>{let o="";o+=`Label Key: ${e}\n`,o+=`Attribute Key: ${t}\n`;o+=`From: ${i?.length?i.join(", "):n||v.Pod}\n`,w.push({title:"Label"+(d.length>1?` #${a+1}`:""),value:o})}),u?.length&&w.push({type:y.Divider}),u?.forEach(({annotationKey:e,attributeKey:t,from:n,fromSources:i},a)=>{let o="";o+=`Annotation Key: ${e}\n`,o+=`Attribute Key: ${t}\n`;o+=`From: ${i?.length?i.join(", "):n||v.Pod}\n`,w.push({title:"Annotation"+(u.length>1?` #${a+1}`:""),value:o})})),t===f.AddClusterInfo){w.push({title:"Overwrite Existing Values",value:String(m||!1)});let e="";p?.forEach(({attributeName:t,attributeStringValue:n},i)=>{e+=`${t}: ${n}`,i<p.length-1&&(e+=", ")}),w.push({title:"Attributes",value:e})}if(t===f.DeleteAttributes){let e="";h?.forEach((t,n)=>{e+=t,n<h.length-1&&(e+=", ")}),w.push({title:"Attributes",value:e})}if(t===f.RenameAttributes){let e="";const t=Object.entries(b||{});t.forEach(([n,i],a)=>{e+=`${n}: ${i}`,a<t.length-1&&(e+=", ")}),w.push({title:"Attributes",value:e})}if(t===f.PiiMasking){let e="";S?.forEach((t,n)=>{e+=t,n<S.length-1&&(e+=", ")}),w.push({title:"Categories",value:e})}return t===f.ErrorSampler&&w.push({title:"Sampling Ratio",value:String(x)}),t===f.ProbabilisticSampler&&w.push({title:"Sampling Percentage",value:String(C)}),t===f.LatencySampler&&E?.forEach(({serviceName:e,httpRoute:t,minimumLatencyThreshold:n,fallbackSamplingRatio:i},a)=>{let o="";o+=`Service Name: ${e}\n`,o+=`HTTP Route: ${t}\n`,o+=`Min. Latency: ${n}\n`,o+=`Fallback Sampling Ratio: ${i}`,w.push({title:"Endpoint"+(E.length>1?` #${a+1}`:""),value:o})}),t===f.ServiceNameSampler&&T?.forEach(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:n},i)=>{let a="";a+=`Service Name: ${e}\n`,a+=`Sampling Ratio: ${t}\n`,a+=`Fallback Sampling Ratio: ${n}`,w.push({title:"Filter"+(T.length>1?` #${i+1}`:""),value:a})}),t===f.SpanAttributeSampler&&N?.forEach(({serviceName:e,attributeKey:t,fallbackSamplingRatio:n,condition:i},a)=>{let o="";o+=`Service Name: ${e}\n`,o+=`Attribute Key: ${t}\n`,o+=`Fallback Sampling Ratio: ${n}\n`;const r=Object.keys(i)[0];o+=`Condition: ${r}\n`,o+=`Operation: ${i[r]?.operation}\n`,o+=`Expected Value: ${i[r]?.expectedValue}`,"jsonCondition"===r&&(o+=`\nJSON Path: ${i[r].jsonPath}`),w.push({title:"Filter"+(N.length>1?` #${a+1}`:""),value:o})}),t===f.URLTemplatization&&k?.forEach((e,t)=>{let n="";e.filterK8sNamespace&&(n+=`Namespace: ${e.filterK8sNamespace}\n`),e.workloadFilters?.length&&e.workloadFilters.forEach(e=>{const t=[e.kind,e.name].filter(Boolean).join("/");t&&(n+=`Workload: ${t}\n`)});const i=e.templatizationRules?.map(e=>e.template).filter(Boolean).join(", ");n+=`Templates: ${i}`,e.notes&&(n+=`\nNotes: ${e.notes}`),w.push({title:"Group"+(k.length>1?` #${t+1}`:""),value:n})}),w},li=b.PiiCategories,ci=p.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: row;
|
|
4
4
|
gap: 32px;
|
|
@@ -262,7 +262,7 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import{useState
|
|
|
262
262
|
justify-content: space-between;
|
|
263
263
|
`,ro=p(U)`
|
|
264
264
|
margin-bottom: 12px;
|
|
265
|
-
`,so=({isUpdate:n,categoryItem:a,formData:r,formErrors:c,validateForm:d,handleFormChange:u,dynamicFields:p,setDynamicFields:m,testConnection:y})=>{const{type:f,displayName:v,supportedSignals:b,testConnectionSupported:S}=a||{},x=h(),[C,E]=i(!1),[N,k]=i(!1),[w,$]=i(void 0),D=s(!1);o(()=>{if(p.length&&!D.current){D.current=!0;let e=!1;for(let t=0;t<p.length;t++){const{required:n,value:i}=p[t];if(n){if([void 0,null,""].includes(i)){e=!1;break}e=!0}}E(e)}},[p,N]);const A=l(()=>{const{logs:e,metrics:t,traces:n}=b||{},
|
|
265
|
+
`,so=({isUpdate:n,categoryItem:a,formData:r,formErrors:c,validateForm:d,handleFormChange:u,dynamicFields:p,setDynamicFields:m,testConnection:y})=>{const{type:f,displayName:v,supportedSignals:b,testConnectionSupported:S}=a||{},x=h(),[C,E]=i(!1),[N,k]=i(!1),[w,$]=i(void 0),D=s(!1);o(()=>{if(p.length&&!D.current){D.current=!0;let e=!1;for(let t=0;t<p.length;t++){const{required:n,value:i}=p[t];if(n){if([void 0,null,""].includes(i)){e=!1;break}e=!0}}E(e)}},[p,N]);const A=l(()=>{const{logs:e,metrics:t,traces:n,profiles:i}=b||{},a=[];return e?.supported&&a.push(Tt.Logs),t?.supported&&a.push(Tt.Metrics),n?.supported&&a.push(Tt.Traces),i?.supported&&a.push(Tt.Profiles),a},[b]),R=l(()=>{const{logs:e,metrics:t,traces:n,profiles:i}=r.exportedSignals||{},a=[];return e&&a.push(Tt.Logs),t&&a.push(Tt.Metrics),n&&a.push(Tt.Traces),i&&a.push(Tt.Profiles),a},[r.exportedSignals]),O=()=>{E(!1),k(!0),$(void 0)};return e(io,{$gap:24,children:[e(io,{$gap:12,children:[t(K,{title:n?"Update destination":"Create destination",description:`Connect ${v} with Odigos.`,actionButton:S&&t(no,{destination:r,validateForm:d,status:w?.type,testConnection:y,onError:e=>{k(!1),$({type:se.Error,title:e?.reason||"Connection failed",message:e?.message||"Please check your input and try again."})},onSuccess:e=>{k(!1),$({type:se.Success,title:e?.reason||"Connection succeeded",message:e?.message||""})}})}),e(ao,{children:[S&&w&&t(re,{type:w.type,title:w.title,message:w.message}),C&&!w&&!n&&t(re,{type:se.Default,message:`Odigos autocompleted ${v} destination details.`})]}),t(I,{})]}),e(oo,{children:[t(V,{title:n?"":"This connection will monitor:",required:!0,allowedSignals:A,selectedSignals:R,setSelectedSignals:e=>{O(),u("exportedSignals",{logs:e.includes(Tt.Logs),metrics:e.includes(Tt.Metrics),traces:e.includes(Tt.Traces),profiles:e.includes(Tt.Profiles)})},errorMessage:c.exportedSignals}),!n&&t(j,{endpoint:`/backends/${f}`})]}),n&&e("div",{children:[t(ro,{children:"Status"}),t(_,{options:[{icon:$n,label:g.ENABLED,value:!1,selectedBgColor:x.text.success+P["050"]},{icon:Dn,label:g.DISABLED,value:!0,selectedBgColor:x.text.error+P["050"]}],selected:r.disabled,setSelected:e=>u("disabled",e)})]}),!n&&t(T,{title:"Destination name",placeholder:"Enter destination name",value:r.name,onChange:e=>{O(),u("name",e.target.value)},errorMessage:c.name}),t(eo,{signals:R,fields:p,onChange:(e,t)=>{O(),m(n=>{const i=[...n],a=i.findIndex(t=>t.name===e);return-1!==a&&(i[a]={...i[a],value:t}),i})},formErrors:c})]})},lo=p.div`
|
|
266
266
|
width: 100%;
|
|
267
267
|
height: 100%;
|
|
268
268
|
max-height: calc(100vh - 220px);
|
|
@@ -300,7 +300,7 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import{useState
|
|
|
300
300
|
}
|
|
301
301
|
`,vo=p(ho)`
|
|
302
302
|
margin-top: 80px;
|
|
303
|
-
`,bo=Object.values(Dt).map(e=>({value:It[e].TITLE,id:e})),So=bo[0],xo=[Tt.Logs,Tt.Metrics,Tt.Traces],Co=(e,t,n)=>e.map(e=>{const{type:i,displayName:a}=e.destinationType,o=e.dataStreamNames?.includes(t),r=n.has(e.id);return{id:e.id,type:i,displayName:a,selected:o||r,fields:[],testConnectionSupported:!1,supportedSignals:{logs:{supported:e.exportedSignals.logs},metrics:{supported:e.exportedSignals.metrics},traces:{supported:e.exportedSignals.traces}}}}),Eo=({hidden:n,categories:a,potentialDestinations:o,onSelectNew:r,onSelectConfigured:s,isLoadingForDestinationIds:c})=>{const{destinations:d}=q(),{selectedStreamName:u}=Je(),{configuredDestinations:p,configuredDestinationsUpdateOnly:m}=ht(),[h,g]=i(""),[y,f]=i(So),[v,b]=i(xo),S=l(()=>{const e=At(a);return e.unshift({name:Dt.EXISTS,description:It[Dt.EXISTS].DESCRIPTION,icon:_n,items:Co(d,u,new Set(p.concat(m).map(e=>e.id)))}),e.unshift({name:Dt.DETECTED,description:It[Dt.DETECTED].DESCRIPTION,icon:Pn,items:o}),e.map(e=>{const t=e.items.filter(t=>{const n=!h||t.displayName.toLowerCase().includes(h.toLowerCase()),i="all"===y.id||y.id?.toLowerCase()?.replaceAll("-"," ")===e.name.toLowerCase()?.replaceAll("-"," "),a=v.some(e=>t.supportedSignals[Rt[e]]?.supported);return n&&i&&a});return{...e,items:t}}).filter(({items:e})=>!!e.length)},[a,o,d,h,y,v,u,p,m]);return n?null:e(ho,{children:[t(K,{title:"Choose destination",description:"Add backend destination you want to connect with Odigos."}),e(go,{children:[t(yo,{children:t(T,{placeholder:"Search...",icon:On,value:h,onChange:({target:{value:e}})=>g(e)})}),t(yo,{children:t(lt,{options:bo,value:y,onSelect:f,onDeselect:()=>{}})}),t(V,{title:"",selectedSignals:v,setSelectedSignals:b})]}),t(I,{}),S.length?t(fo,{children:t(mo,{items:S,onSelectNew:e=>r(e,v),onSelectConfigured:s,isLoadingForDestinationIds:c})}):t(vo,{children:t(De,{title:"No destinations found"})})]})},To=p.div`
|
|
303
|
+
`,bo=Object.values(Dt).map(e=>({value:It[e].TITLE,id:e})),So=bo[0],xo=[Tt.Logs,Tt.Metrics,Tt.Traces],Co=(e,t,n)=>e.map(e=>{const{type:i,displayName:a}=e.destinationType,o=e.dataStreamNames?.includes(t),r=n.has(e.id);return{id:e.id,type:i,displayName:a,selected:o||r,fields:[],testConnectionSupported:!1,supportedSignals:{logs:{supported:e.exportedSignals.logs},metrics:{supported:e.exportedSignals.metrics},traces:{supported:e.exportedSignals.traces},profiles:{supported:e.exportedSignals.profiles}}}}),Eo=({hidden:n,categories:a,potentialDestinations:o,onSelectNew:r,onSelectConfigured:s,isLoadingForDestinationIds:c})=>{const{destinations:d}=q(),{selectedStreamName:u}=Je(),{configuredDestinations:p,configuredDestinationsUpdateOnly:m}=ht(),[h,g]=i(""),[y,f]=i(So),[v,b]=i(xo),S=l(()=>{const e=At(a);return e.unshift({name:Dt.EXISTS,description:It[Dt.EXISTS].DESCRIPTION,icon:_n,items:Co(d,u,new Set(p.concat(m).map(e=>e.id)))}),e.unshift({name:Dt.DETECTED,description:It[Dt.DETECTED].DESCRIPTION,icon:Pn,items:o}),e.map(e=>{const t=e.items.filter(t=>{const n=!h||t.displayName.toLowerCase().includes(h.toLowerCase()),i="all"===y.id||y.id?.toLowerCase()?.replaceAll("-"," ")===e.name.toLowerCase()?.replaceAll("-"," "),a=v.some(e=>t.supportedSignals[Rt[e]]?.supported);return n&&i&&a});return{...e,items:t}}).filter(({items:e})=>!!e.length)},[a,o,d,h,y,v,u,p,m]);return n?null:e(ho,{children:[t(K,{title:"Choose destination",description:"Add backend destination you want to connect with Odigos."}),e(go,{children:[t(yo,{children:t(T,{placeholder:"Search...",icon:On,value:h,onChange:({target:{value:e}})=>g(e)})}),t(yo,{children:t(lt,{options:bo,value:y,onSelect:f,onDeselect:()=>{}})}),t(V,{title:"",selectedSignals:v,setSelectedSignals:b})]}),t(I,{}),S.length?t(fo,{children:t(mo,{items:S,onSelectNew:e=>r(e,v),onSelectConfigured:s,isLoadingForDestinationIds:c})}):t(vo,{children:t(De,{title:"No destinations found"})})]})},To=p.div`
|
|
304
304
|
display: flex;
|
|
305
305
|
`,No=p.div`
|
|
306
306
|
border-right: 1px solid ${({theme:e})=>e.colors.border};
|
|
@@ -309,7 +309,7 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import{useState
|
|
|
309
309
|
@media (max-width: 1050px) {
|
|
310
310
|
display: none;
|
|
311
311
|
}
|
|
312
|
-
`,ko=({isOnboarding:n,categories:a,potentialDestinations:o,createDestination:r,updateDestination:s,deleteDestination:l,testConnection:c})=>{const{destinations:d}=q(),{selectedStreamName:u}=Je(),{currentModal:p,setCurrentModal:m}=te(),{addConfiguredDestination:h,addConfiguredDestinationUpdateOnly:y,removeConfiguredDestinationUpdateOnly:f,configuredDestinationsUpdateOnly:v}=ht(),b=p===Q.Destination,[S,x]=i(void 0),{formData:C,formErrors:E,handleFormChange:T,resetFormData:N,validateForm:k,setYamlFields:w,dynamicFields:$,setDynamicFields:D,loadFormWithDrawerItem:A}=Nt({supportedSignals:S?.supportedSignals,preLoadedFields:S?.fields}),[I,R]=i([]),O=e=>{const t={};return e||$.forEach(e=>t[e.name]=e.value),{id:e?.id||"",name:e?.name||C.name,disabled:e?.disabled||C.disabled,dataStreamNames:e?.dataStreamNames||[],conditions:e?.conditions||[],exportedSignals:e?.exportedSignals||C.exportedSignals,fields:e?.fields||JSON.stringify(t),destinationType:e?.destinationType||{type:S.type,displayName:S.displayName,supportedSignals:{logs:{supported:!1},metrics:{supported:!1},traces:{supported:!1}}}}},M=async e=>{if(n&&!e){const e=O();h(e)}else if(n&&e){const t=O(e);v.some(t=>t.id===e.id)?f(e):y(t)}else if(n||e){if(!n&&e){const t=O(e),n=t.dataStreamNames.some(e=>e===u);R(t=>[...t,e.id]),n?await l(e.id):await s(e.id,A(t)),R(t=>t.filter(t=>t!==e.id))}}else r(C)},F=()=>{N(),x(void 0),m("")},L=()=>{N(),x(void 0)},_=async()=>{if(S){if(!k({withAlert:!n,alertTitle:Z.Create}))return null;M()}F()};return ie({key:"Enter",active:b},()=>_()),t(ae,{isOpen:b,onClose:F,header:{title:g.ADD_DESTINATION},actionComponent:t(de,{buttons:(()=>{const e=[{label:"DONE",variant:"primary",onClick:_}];return S&&e.unshift({label:"BACK",icon:()=>t(Kn,{rotate:-90}),variant:"secondary",onClick:L}),e})()}),children:e(To,{children:[t(No,{children:t(Ot,{currentStep:S?2:1,data:[{stepNumber:1,title:g.DESTINATIONS},{stepNumber:2,title:g.CONNECTION}]})}),e(oe,{style:{margin:"32px 24px 12px 24px"},children:[t(Eo,{hidden:void 0!==S,categories:a,potentialDestinations:o,onSelectNew:(e,t)=>{N(),T("type",e?.type||""),T("currentStreamName",u);const n={logs:!1,metrics:!1,traces:!1};t.filter(t=>e.supportedSignals[Rt[t]].supported).forEach(e=>n[Rt[e]]=!0),T("exportedSignals",n),w(e?.fields||[]),x(e)},onSelectConfigured:e=>{const t=d.find(t=>t.id===e);t&&M(t)},isLoadingForDestinationIds:I}),S&&t(so,{categoryItem:S,formData:C,formErrors:E,handleFormChange:T,dynamicFields:$,setDynamicFields:D,validateForm:k,testConnection:c})]})]})})},wo=p.div`
|
|
312
|
+
`,ko=({isOnboarding:n,categories:a,potentialDestinations:o,createDestination:r,updateDestination:s,deleteDestination:l,testConnection:c})=>{const{destinations:d}=q(),{selectedStreamName:u}=Je(),{currentModal:p,setCurrentModal:m}=te(),{addConfiguredDestination:h,addConfiguredDestinationUpdateOnly:y,removeConfiguredDestinationUpdateOnly:f,configuredDestinationsUpdateOnly:v}=ht(),b=p===Q.Destination,[S,x]=i(void 0),{formData:C,formErrors:E,handleFormChange:T,resetFormData:N,validateForm:k,setYamlFields:w,dynamicFields:$,setDynamicFields:D,loadFormWithDrawerItem:A}=Nt({supportedSignals:S?.supportedSignals,preLoadedFields:S?.fields}),[I,R]=i([]),O=e=>{const t={};return e||$.forEach(e=>t[e.name]=e.value),{id:e?.id||"",name:e?.name||C.name,disabled:e?.disabled||C.disabled,dataStreamNames:e?.dataStreamNames||[],conditions:e?.conditions||[],exportedSignals:e?.exportedSignals||C.exportedSignals,fields:e?.fields||JSON.stringify(t),destinationType:e?.destinationType||{type:S.type,displayName:S.displayName,supportedSignals:{logs:{supported:!1},metrics:{supported:!1},traces:{supported:!1},profiles:{supported:!1}}}}},M=async e=>{if(n&&!e){const e=O();h(e)}else if(n&&e){const t=O(e);v.some(t=>t.id===e.id)?f(e):y(t)}else if(n||e){if(!n&&e){const t=O(e),n=t.dataStreamNames.some(e=>e===u);R(t=>[...t,e.id]),n?await l(e.id):await s(e.id,A(t)),R(t=>t.filter(t=>t!==e.id))}}else r(C)},F=()=>{N(),x(void 0),m("")},L=()=>{N(),x(void 0)},_=async()=>{if(S){if(!k({withAlert:!n,alertTitle:Z.Create}))return null;M()}F()};return ie({key:"Enter",active:b},()=>_()),t(ae,{isOpen:b,onClose:F,header:{title:g.ADD_DESTINATION},actionComponent:t(de,{buttons:(()=>{const e=[{label:"DONE",variant:"primary",onClick:_}];return S&&e.unshift({label:"BACK",icon:()=>t(Kn,{rotate:-90}),variant:"secondary",onClick:L}),e})()}),children:e(To,{children:[t(No,{children:t(Ot,{currentStep:S?2:1,data:[{stepNumber:1,title:g.DESTINATIONS},{stepNumber:2,title:g.CONNECTION}]})}),e(oe,{style:{margin:"32px 24px 12px 24px"},children:[t(Eo,{hidden:void 0!==S,categories:a,potentialDestinations:o,onSelectNew:(e,t)=>{N(),T("type",e?.type||""),T("currentStreamName",u);const n={logs:!1,metrics:!1,traces:!1,profiles:!1};t.filter(t=>e.supportedSignals[Rt[t]].supported).forEach(e=>n[Rt[e]]=!0),T("exportedSignals",n),w(e?.fields||[]),x(e)},onSelectConfigured:e=>{const t=d.find(t=>t.id===e);t&&M(t)},isLoadingForDestinationIds:I}),S&&t(so,{categoryItem:S,formData:C,formErrors:E,handleFormChange:T,dynamicFields:$,setDynamicFields:D,validateForm:k,testConnection:c})]})]})})},wo=p.div`
|
|
313
313
|
display: flex;
|
|
314
314
|
flex-direction: column;
|
|
315
315
|
align-items: center;
|
package/lib/contexts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{eH as ActionFormContextProvider,eN as DataStreamFormContextProvider,eG as DestinationFormContextProvider,hk as OdigosProvider,eI as RuleFormContextProvider,cC as SamplingRuleFormType,d4 as SamplingRulesFormProvider,eF as SourceInstrumentFormContextProvider,hl as StorybookProvider,eD as checkVersionSupport,cs as useActionFormContext,cz as useDataStreamFormContext,cv as useDestinationFormContext,a4 as useOdigos,cy as useRuleFormContext,cB as useSamplingRulesFormContext,cW as useSourceInstrumentFormContext,hm as useStorybook}from"./chunks/ui-components-
|
|
1
|
+
export{eH as ActionFormContextProvider,eN as DataStreamFormContextProvider,eG as DestinationFormContextProvider,hk as OdigosProvider,eI as RuleFormContextProvider,cC as SamplingRuleFormType,d4 as SamplingRulesFormProvider,eF as SourceInstrumentFormContextProvider,hl as StorybookProvider,eD as checkVersionSupport,cs as useActionFormContext,cz as useDataStreamFormContext,cv as useDestinationFormContext,a4 as useOdigos,cy as useRuleFormContext,cB as useSamplingRulesFormContext,cW as useSourceInstrumentFormContext,hm as useStorybook}from"./chunks/ui-components-BogDd0Qc.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
|
package/lib/functions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{bG as capitalizeFirstLetter,gK as cleanObjectEmptyStringsValues,bB as compareCondition,$ as deepClone,b5 as entityIdKey,aP as filterActions,bi as filterDestinations,bg as filterDestinationsByStream,bh as filterSources,a6 as filterSourcesByStream,gL as flattenObjectKeys,b8 as formatBytes,ci as formatDuration,g as generateId,aC as getActionIcon,aL as getConditionsBooleans,ad as getContainersIcons,cc as getContainersInstrumentedCount,gM as getDeepValue,ba as getDestinationIcon,gN as getDetectedLanguageIcons,aW as getEntityIcon,aA as getEntityId,b4 as getEntityIdKey,aR as getEntityLabel,gO as getIdFromSseTarget,b9 as getInstrumentationRuleIcon,gP as getMainContainerLanguage,bN as getMetricForEntity,gQ as getMonitorIcon,gR as getPlatformIcon,gS as getPlatformLabel,bW as getProgrammingLanguageIcon,ck as getRecursiveValues,bb as getSourceLanguageIcons,gT as getSseTargetFromId,gU as getStatusColor,eQ as getStatusFromPodStatus,aN as getStatusIcon,K as getStatusTypeFromOdigosHealth,gV as getValueForRange,c3 as getVirtualServiceIcon,a8 as getWorkloadId,bF as getYamlFieldsForDestination,U as hasUnhealthyInstances,al as isEmpty,gW as isLegalK8sLabel,cd as isOverTime,a1 as isStringABoolean,gX as isTimeElapsed,gY as isValidVersion,aM as mapConditions,bA as mapDestinationFieldsForDisplay,b7 as mapExportedSignals,bH as mapSupportedSignals,gZ as numbersOnly,a2 as parseBooleanFromString,g_ as parseJsonStringToPrettyString,cx as prepareDestinationFormData,g$ as removeEmptyValuesFromObject,bC as safeJsonParse,h0 as safeJsonStringify,h1 as setDeepValue,a$ as sleep,H as splitCamelString,h2 as stringifyNonStringValues,aF as trimVersion}from"./chunks/ui-components-
|
|
1
|
+
export{bG as capitalizeFirstLetter,gK as cleanObjectEmptyStringsValues,bB as compareCondition,$ as deepClone,b5 as entityIdKey,aP as filterActions,bi as filterDestinations,bg as filterDestinationsByStream,bh as filterSources,a6 as filterSourcesByStream,gL as flattenObjectKeys,b8 as formatBytes,ci as formatDuration,g as generateId,aC as getActionIcon,aL as getConditionsBooleans,ad as getContainersIcons,cc as getContainersInstrumentedCount,gM as getDeepValue,ba as getDestinationIcon,gN as getDetectedLanguageIcons,aW as getEntityIcon,aA as getEntityId,b4 as getEntityIdKey,aR as getEntityLabel,gO as getIdFromSseTarget,b9 as getInstrumentationRuleIcon,gP as getMainContainerLanguage,bN as getMetricForEntity,gQ as getMonitorIcon,gR as getPlatformIcon,gS as getPlatformLabel,bW as getProgrammingLanguageIcon,ck as getRecursiveValues,bb as getSourceLanguageIcons,gT as getSseTargetFromId,gU as getStatusColor,eQ as getStatusFromPodStatus,aN as getStatusIcon,K as getStatusTypeFromOdigosHealth,gV as getValueForRange,c3 as getVirtualServiceIcon,a8 as getWorkloadId,bF as getYamlFieldsForDestination,U as hasUnhealthyInstances,al as isEmpty,gW as isLegalK8sLabel,cd as isOverTime,a1 as isStringABoolean,gX as isTimeElapsed,gY as isValidVersion,aM as mapConditions,bA as mapDestinationFieldsForDisplay,b7 as mapExportedSignals,bH as mapSupportedSignals,gZ as numbersOnly,a2 as parseBooleanFromString,g_ as parseJsonStringToPrettyString,cx as prepareDestinationFormData,g$ as removeEmptyValuesFromObject,bC as safeJsonParse,h0 as safeJsonStringify,h1 as setDeepValue,a$ as sleep,H as splitCamelString,h2 as stringifyNonStringValues,aF as trimVersion}from"./chunks/ui-components-BogDd0Qc.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
|
package/lib/hooks.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{hi as IGNORE_OUTSIDE_CLICK_ATTR,az as useActionFormData,hj as useBodyScroll,bj as useClickNode,c1 as useClickNotification,bf as useContainerSize,u as useCopy,bu as useDataStreamFormData,bE as useDestinationFormData,ce as useGenericForm,bY as useInstrumentationRuleFormData,d as useKeyDown,bo as useOnClickOutside,bk as usePopup,fr as useScrollTo,bt as useSessionStorage,a7 as useSourceFormData,ca as useSourceSelectionFormData,c0 as useTimeAgo}from"./chunks/ui-components-
|
|
1
|
+
export{hi as IGNORE_OUTSIDE_CLICK_ATTR,az as useActionFormData,hj as useBodyScroll,bj as useClickNode,c1 as useClickNotification,bf as useContainerSize,u as useCopy,bu as useDataStreamFormData,bE as useDestinationFormData,ce as useGenericForm,bY as useInstrumentationRuleFormData,d as useKeyDown,bo as useOnClickOutside,bk as usePopup,fr as useScrollTo,bt as useSessionStorage,a7 as useSourceFormData,ca as useSourceSelectionFormData,c0 as useTimeAgo}from"./chunks/ui-components-BogDd0Qc.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
|
|
@@ -58,6 +58,7 @@ export * from './open-telemetry-logo';
|
|
|
58
58
|
export * from './ops-verse-logo';
|
|
59
59
|
export * from './oracle-logo';
|
|
60
60
|
export * from './prometheus-logo';
|
|
61
|
+
export * from './pyroscope-logo';
|
|
61
62
|
export * from './qryn-logo';
|
|
62
63
|
export * from './quickwit-logo';
|
|
63
64
|
export * from './sentry-logo';
|