@odigos/ui-kit 0.0.47 → 0.0.49
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 +15 -0
- package/eslint.config.mjs +16 -2
- package/lib/components/data-card/data-card-fields/index.d.ts +2 -1
- package/lib/components/error-boundary/error-boundary.stories.d.ts +3 -1
- package/lib/components/error-boundary/index.d.ts +1 -2
- package/lib/components/field-error/field-error.stories.d.ts +3 -1
- package/lib/components/field-error/index.d.ts +1 -2
- package/lib/components/key-value-input-list/index.d.ts +2 -0
- package/lib/components/key-value-input-list/key-value-input-list.stories.d.ts +2 -0
- package/lib/components/segment/index.d.ts +8 -7
- package/lib/components/styled.d.ts +5 -1
- package/lib/components.js +9 -9
- package/lib/constants.js +1 -1
- package/lib/containers/await-pipeline/await-pipeline.stories.d.ts +1 -1
- package/lib/containers/await-pipeline/index.d.ts +1 -2
- package/lib/containers/data-flow-actions-menu/add-entity/index.d.ts +2 -3
- package/lib/containers/data-flow-actions-menu/filters/index.d.ts +2 -3
- package/lib/containers/data-flow-actions-menu/search/index.d.ts +2 -3
- package/lib/containers/data-stream-modal/data-stream-modal.stories.d.ts +2 -2
- package/lib/containers/data-stream-modal/index.d.ts +1 -2
- package/lib/containers/index.d.ts +1 -0
- package/lib/containers/instrumentation-rule-form/custom-fields/custom-instrumentation.d.ts +5 -0
- package/lib/containers/notification-manager/index.d.ts +1 -2
- package/lib/containers/notification-manager/notification-manager.stories.d.ts +1 -1
- package/lib/containers/service-map/helpers/build-edges.d.ts +10 -0
- package/lib/containers/service-map/helpers/build-map-nodes.d.ts +11 -0
- package/lib/containers/service-map/index.d.ts +8 -0
- package/lib/containers/service-map/service-map.stories.d.ts +9 -0
- package/lib/containers/slack-invite/index.d.ts +1 -2
- package/lib/containers/slack-invite/slack-invite.stories.d.ts +1 -1
- package/lib/containers/toast-list/index.d.ts +1 -2
- package/lib/containers/toast-list/toast-list.stories.d.ts +1 -1
- package/lib/containers/toggle-dark-mode/index.d.ts +1 -2
- package/lib/containers/toggle-dark-mode/toggle-dark-mode.stories.d.ts +1 -1
- package/lib/containers.js +439 -12485
- package/lib/functions/clean-object-empty-strings-values/index.d.ts +2 -1
- package/lib/functions/compare-condition/index.d.ts +1 -1
- package/lib/functions/flatten-object-keys/index.d.ts +2 -1
- package/lib/functions/get-entity-id/index.d.ts +2 -2
- package/lib/functions/get-entity-label/index.d.ts +2 -2
- package/lib/functions/index.d.ts +1 -0
- package/lib/functions/map-destination-fields-for-display/index.d.ts +1 -1
- package/lib/functions/remove-empty-values-from-object/index.d.ts +2 -1
- package/lib/functions/safe-json-parse/index.d.ts +2 -1
- package/lib/functions/safe-json-stringify/index.d.ts +2 -1
- package/lib/functions/stringify-non-string-values/index.d.ts +2 -1
- package/lib/functions.js +35 -9
- package/lib/hooks/useGenericForm.d.ts +2 -1
- package/lib/hooks/useInstrumentationRuleFormData.d.ts +3 -6
- package/lib/hooks/useSessionStorage.d.ts +2 -2
- package/lib/hooks/useSourceFormData.d.ts +1 -4
- package/lib/hooks.js +4 -4
- package/lib/icons/common/index.d.ts +1 -0
- package/lib/icons/common/user-icon/index.d.ts +2 -0
- package/lib/icons/common/user-icon/user-icon.stories.d.ts +8 -0
- package/lib/icons/instrumentation-rules/custom-instrumentation-icon/custom-instrumentation-icon.stories.d.ts +7 -0
- package/lib/icons/instrumentation-rules/custom-instrumentation-icon/index.d.ts +2 -0
- package/lib/icons/instrumentation-rules/index.d.ts +1 -0
- package/lib/icons.js +6 -6
- package/lib/{index-BV85P9UP.js → index-BnvrwbRB.js} +4 -0
- package/lib/{index-BRGQ84pJ.js → index-Bw7RE2T2.js} +21 -4
- package/lib/{index-B1IScVBT.js → index-C1V7D2ey.js} +12728 -363
- package/lib/{index-fEP_guwb.js → index-CeBxw8J4.js} +4 -4
- package/lib/{index-C4aVlsHh.js → index-CeDmxXUE.js} +10 -2
- package/lib/{index-BUCure0Q.js → index-CkTdd3MS.js} +1 -1
- package/lib/{index-C8vqcUbP.js → index-DOU0EdZP.js} +2 -2
- package/lib/{index-BJpPcCBm.js → index-DsEoqSQn.js} +3 -3
- package/lib/{index-CeHgnkLY.js → index-DxR7e2Cq.js} +1 -1
- package/lib/{index-DypjdLnz.js → index-ZTzxu5fz.js} +1 -1
- package/lib/{index-CpT8LSxY.js → index-w9lkC6fb.js} +10 -8
- package/lib/mock-data/index.d.ts +1 -0
- package/lib/mock-data/service-map/index.d.ts +2 -0
- package/lib/snippets/index.d.ts +1 -0
- package/lib/{containers/data-flow → snippets/react-flow}/edges/labeled-edge.d.ts +4 -4
- package/lib/{containers/data-flow → snippets/react-flow}/flow.d.ts +2 -0
- package/lib/snippets/react-flow/index.d.ts +13 -0
- package/lib/{containers/data-flow → snippets/react-flow}/nodes/add-node.d.ts +4 -4
- package/lib/{containers/data-flow → snippets/react-flow}/nodes/base-node.d.ts +4 -4
- package/lib/{containers/data-flow → snippets/react-flow}/nodes/edged-node.d.ts +4 -4
- package/lib/{containers/data-flow → snippets/react-flow}/nodes/frame-node.d.ts +4 -4
- package/lib/{containers/data-flow → snippets/react-flow}/nodes/header-node.d.ts +4 -4
- package/lib/snippets/react-flow/nodes/map-item-node.d.ts +12 -0
- package/lib/snippets/react-flow/nodes/no-data-node.d.ts +9 -0
- package/lib/{containers/data-flow → snippets/react-flow}/nodes/scroll-node.d.ts +4 -4
- package/lib/snippets/react-flow/nodes/skeleton-node.d.ts +8 -0
- package/lib/snippets.js +8 -8
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types/common/index.d.ts +1 -0
- package/lib/types/data-flow/index.d.ts +3 -1
- package/lib/types/describe/index.d.ts +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/instrumentation-rules/index.d.ts +12 -0
- package/lib/types/service-map/index.d.ts +10 -0
- package/lib/types.js +10 -2
- package/lib/{useSourceSelectionFormData-CMXqoHZs.js → useSourceSelectionFormData-C5VMfWEf.js} +13 -48
- package/lib/{useTransition-DsrDiKOV.js → useTransition-mupXsbop.js} +56 -10
- package/package.json +3 -2
- package/lib/containers/data-flow/nodes/skeleton-node.d.ts +0 -8
- /package/lib/{containers/data-flow/helpers/get-main-container-language.d.ts → functions/get-main-container-language/index.d.ts} +0 -0
- /package/lib/{containers/data-flow/helpers → snippets/react-flow}/node-config.d.ts +0 -0
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { AnyObj } from '@/types';
|
|
2
|
+
export declare const cleanObjectEmptyStringsValues: (obj: AnyObj) => AnyObj;
|
|
@@ -29,4 +29,5 @@
|
|
|
29
29
|
* 'name.explain': '...',
|
|
30
30
|
* }
|
|
31
31
|
*/
|
|
32
|
-
|
|
32
|
+
import type { AnyObj } from '@/types';
|
|
33
|
+
export declare const flattenObjectKeys: (obj: AnyObj, prefix?: string, result?: AnyObj) => AnyObj;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { WorkloadId } from '@/types';
|
|
2
|
-
export declare const getEntityId: (item:
|
|
1
|
+
import type { AnyObj, WorkloadId } from '@/types';
|
|
2
|
+
export declare const getEntityId: (item: AnyObj) => string | WorkloadId | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EntityTypes } from '@/types';
|
|
2
|
-
export declare const getEntityLabel: (entity:
|
|
1
|
+
import { type AnyObj, EntityTypes } from '@/types';
|
|
2
|
+
export declare const getEntityLabel: (entity: AnyObj, entityType: EntityTypes, options?: {
|
|
3
3
|
extended?: boolean;
|
|
4
4
|
prioritizeDisplayName?: boolean;
|
|
5
5
|
}) => string;
|
package/lib/functions/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export * from './get-entity-id';
|
|
|
19
19
|
export * from './get-entity-label';
|
|
20
20
|
export * from './get-id-from-sse-target';
|
|
21
21
|
export * from './get-instrumentation-rule-icon';
|
|
22
|
+
export * from './get-main-container-language';
|
|
22
23
|
export * from './get-metric-for-entity';
|
|
23
24
|
export * from './get-monitor-icon';
|
|
24
25
|
export * from './get-platform-icon';
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { AnyObj } from '@/types';
|
|
2
|
+
export declare const removeEmptyValuesFromObject: (obj: AnyObj) => AnyObj;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { AnyObj } from '@/types';
|
|
2
|
+
export declare function safeJsonParse<T = AnyObj>(val: T | string | undefined, fallback: T): T;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { AnyObj } from '@/types';
|
|
2
|
+
export declare const safeJsonStringify: (obj?: AnyObj, indent?: number) => string;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { AnyObj } from '@/types';
|
|
2
|
+
export declare const stringifyNonStringValues: (obj: AnyObj) => Record<string, string>;
|
package/lib/functions.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
export { c as capitalizeFirstLetter, f as flattenObjectKeys, g as getConditionsBooleans, a as getMonitorIcon, b as getStatusIcon, i as isValidVersion, m as mapConditions, n as numbersOnly, p as parseBooleanFromString, d as parseJsonStringToPrettyString, r as removeEmptyValuesFromObject, s as safeJsonStringify, e as splitCamelString } from './index-
|
|
2
|
-
export { c as compareCondition, d as deepClone, f as filterActions, a as filterDestinations, b as filterDestinationsByStream, e as filterSources, g as filterSourcesByStream, h as formatBytes, j as getContainersIcons, i as getContainersInstrumentedCount, k as getDestinationIcon, l as getEntityIcon, m as getEntityLabel, n as getMetricForEntity, o as getPlatformIcon, p as getPlatformLabel, q as getValueForRange, r as getWorkloadId, s as getYamlFieldsForDestination, t as isOverTime, u as mapDestinationFieldsForDisplay, v as sleep } from './index-
|
|
3
|
-
export { m as getActionIcon, n as getEntityId, o as getInstrumentationRuleIcon, p as getProgrammingLanguageIcon } from './index-
|
|
1
|
+
export { c as capitalizeFirstLetter, f as flattenObjectKeys, g as getConditionsBooleans, a as getMonitorIcon, b as getStatusIcon, i as isValidVersion, m as mapConditions, n as numbersOnly, p as parseBooleanFromString, d as parseJsonStringToPrettyString, r as removeEmptyValuesFromObject, s as safeJsonStringify, e as splitCamelString } from './index-DsEoqSQn.js';
|
|
2
|
+
export { c as compareCondition, d as deepClone, f as filterActions, a as filterDestinations, b as filterDestinationsByStream, e as filterSources, g as filterSourcesByStream, h as formatBytes, j as getContainersIcons, i as getContainersInstrumentedCount, k as getDestinationIcon, l as getEntityIcon, m as getEntityLabel, n as getMetricForEntity, o as getPlatformIcon, p as getPlatformLabel, q as getValueForRange, r as getWorkloadId, s as getYamlFieldsForDestination, t as isOverTime, u as mapDestinationFieldsForDisplay, v as sleep } from './index-w9lkC6fb.js';
|
|
3
|
+
export { m as getActionIcon, n as getEntityId, o as getInstrumentationRuleIcon, p as getProgrammingLanguageIcon } from './index-Bw7RE2T2.js';
|
|
4
4
|
export { g as getIdFromSseTarget, i as isLegalK8sLabel, m as mapExportedSignals } from './index-BlZKWuxe.js';
|
|
5
|
-
import { EntityTypes } from './types.js';
|
|
6
|
-
export { i as isEmpty, s as safeJsonParse } from './index-
|
|
5
|
+
import { ProgrammingLanguages, EntityTypes } from './types.js';
|
|
6
|
+
export { i as isEmpty, s as safeJsonParse } from './index-BnvrwbRB.js';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'styled-components';
|
|
9
|
-
import './index-
|
|
10
|
-
import './index-
|
|
9
|
+
import './index-DxR7e2Cq.js';
|
|
10
|
+
import './index-ZTzxu5fz.js';
|
|
11
11
|
|
|
12
12
|
const cleanObjectEmptyStringsValues = (obj) => {
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13
14
|
const cleanArray = (arr) => arr.filter((item) => {
|
|
14
15
|
if (typeof item === 'object' && item !== null) {
|
|
15
16
|
return item.key !== '' && item.value !== '';
|
|
@@ -38,7 +39,7 @@ const cleanObjectEmptyStringsValues = (obj) => {
|
|
|
38
39
|
acc[key] = value;
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
|
-
catch (
|
|
42
|
+
catch (_) {
|
|
42
43
|
// Handle non-stringified objects or arrays directly
|
|
43
44
|
if (typeof value === 'object' && value !== null) {
|
|
44
45
|
if (Array.isArray(value))
|
|
@@ -55,6 +56,31 @@ const cleanObjectEmptyStringsValues = (obj) => {
|
|
|
55
56
|
}, {});
|
|
56
57
|
};
|
|
57
58
|
|
|
59
|
+
// while odigos lists language per container, we want to aggregate one single language for the workload.
|
|
60
|
+
// the process is mostly heuristic, we iterate over the containers and return the first valid language we find.
|
|
61
|
+
// there are additional cases for when the workload programming language is not available.
|
|
62
|
+
const getMainContainerLanguage = (source) => {
|
|
63
|
+
const { numberOfInstances, containers } = source;
|
|
64
|
+
if (!containers) {
|
|
65
|
+
if (!!numberOfInstances && numberOfInstances > 0) {
|
|
66
|
+
return ProgrammingLanguages.Processing;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
return ProgrammingLanguages.NoRunningPods;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
// we will filter out the ignored languages as we don't want to account them in the main language
|
|
73
|
+
const noneIgnoredLanguages = containers?.filter((container) => container.language !== ProgrammingLanguages.Ignored);
|
|
74
|
+
if (!noneIgnoredLanguages.length)
|
|
75
|
+
return ProgrammingLanguages.NoContainers;
|
|
76
|
+
// find the first container with valid language
|
|
77
|
+
const mainContainer = noneIgnoredLanguages.find((container) => container.language !== ProgrammingLanguages.Unknown);
|
|
78
|
+
// no valid language found, return the first one
|
|
79
|
+
if (!mainContainer)
|
|
80
|
+
return ProgrammingLanguages.Unknown;
|
|
81
|
+
return mainContainer.language;
|
|
82
|
+
};
|
|
83
|
+
|
|
58
84
|
const getSseTargetFromId = (id, type) => {
|
|
59
85
|
switch (type) {
|
|
60
86
|
case EntityTypes.Source: {
|
|
@@ -90,4 +116,4 @@ const stringifyNonStringValues = (obj) => {
|
|
|
90
116
|
}, {});
|
|
91
117
|
};
|
|
92
118
|
|
|
93
|
-
export { cleanObjectEmptyStringsValues, getSseTargetFromId, isTimeElapsed, stringifyNonStringValues };
|
|
119
|
+
export { cleanObjectEmptyStringsValues, getMainContainerLanguage, getSseTargetFromId, isTimeElapsed, stringifyNonStringValues };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import type { AnyObj } from '@/types';
|
|
2
|
+
export declare const useGenericForm: <Form extends AnyObj>(initialFormData: Form) => {
|
|
2
3
|
formData: Form;
|
|
3
4
|
formErrors: Partial<Record<keyof Form, string>>;
|
|
4
5
|
handleFormChange: (key?: keyof Form | string, val?: any, obj?: Form) => void;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { type InstrumentationRule, type InstrumentationRuleFormData } from '@/types';
|
|
2
2
|
export declare const useInstrumentationRuleFormData: () => {
|
|
3
3
|
formData: InstrumentationRuleFormData;
|
|
4
|
-
formErrors: Partial<Record<"ruleName" | "notes" | "disabled" | "workloads" | "instrumentationLibraries" | "codeAttributes" | "headersCollection" | "payloadCollection", string>>;
|
|
4
|
+
formErrors: Partial<Record<"ruleName" | "notes" | "disabled" | "workloads" | "instrumentationLibraries" | "codeAttributes" | "headersCollection" | "payloadCollection" | "customInstrumentations", string>>;
|
|
5
5
|
handleFormChange: (key?: string | undefined, val?: any, obj?: InstrumentationRuleFormData | undefined) => void;
|
|
6
6
|
resetFormData: () => void;
|
|
7
|
-
validateForm: (
|
|
8
|
-
|
|
9
|
-
alertTitle?: string;
|
|
10
|
-
}) => boolean;
|
|
11
|
-
loadFormWithDrawerItem: ({ ruleName, notes, disabled, payloadCollection, codeAttributes }: InstrumentationRule) => void;
|
|
7
|
+
validateForm: () => boolean;
|
|
8
|
+
loadFormWithDrawerItem: ({ ruleName, notes, disabled, payloadCollection, codeAttributes, headersCollection, customInstrumentations }: InstrumentationRule) => void;
|
|
12
9
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const useSessionStorage: () => {
|
|
2
|
-
getItemSS: (key: string, defaultValue:
|
|
3
|
-
setItemSS: (key: string, value:
|
|
2
|
+
getItemSS: <T>(key: string, defaultValue: T) => T;
|
|
3
|
+
setItemSS: <T>(key: string, value: T) => void;
|
|
4
4
|
removeItemSS: (key: string) => void;
|
|
5
5
|
};
|
|
@@ -4,9 +4,6 @@ export declare const useSourceFormData: () => {
|
|
|
4
4
|
formErrors: Partial<Record<keyof SourceFormData, string>>;
|
|
5
5
|
handleFormChange: (key?: string | undefined, val?: any, obj?: SourceFormData | undefined) => void;
|
|
6
6
|
resetFormData: () => void;
|
|
7
|
-
validateForm: (
|
|
8
|
-
withAlert?: boolean;
|
|
9
|
-
alertTitle?: string;
|
|
10
|
-
}) => boolean;
|
|
7
|
+
validateForm: () => boolean;
|
|
11
8
|
loadFormWithDrawerItem: ({ otelServiceName, name }: Source) => void;
|
|
12
9
|
};
|
package/lib/hooks.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { u as useActionFormData, a as
|
|
2
|
-
export { u as
|
|
1
|
+
export { u as useActionFormData, a as useClickNotification, b as useDataStreamFormData, c as useDestinationFormData, d as useSessionStorage, e as useSourceFormData, f as useSourceSelectionFormData } from './useSourceSelectionFormData-C5VMfWEf.js';
|
|
2
|
+
export { u as useClickNode, a as useContainerSize, b as useCopy, c as useGenericForm, d as useInstrumentationRuleFormData, e as useKeyDown, f as useOnClickOutside, g as useTimeAgo, h as useTransition } from './useTransition-mupXsbop.js';
|
|
3
3
|
import './types.js';
|
|
4
|
-
import './index-
|
|
4
|
+
import './index-Bw7RE2T2.js';
|
|
5
5
|
import 'react';
|
|
6
6
|
import 'styled-components';
|
|
7
|
-
import './index-
|
|
7
|
+
import './index-BnvrwbRB.js';
|
|
8
8
|
import './index-BlZKWuxe.js';
|
package/lib/icons.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { T as Theme } from './index-
|
|
2
|
-
export { q as AddClusterInfoIcon,
|
|
3
|
-
export { C as CheckCircledIcon, E as ErrorTriangleIcon, I as InfoIcon, L as LogsIcon, M as MetricsIcon, O as OdigosLogo, T as TracesIcon, W as WarningTriangleIcon } from './index-
|
|
4
|
-
export { C as CrossCircledIcon, D as DataStreamsIcon, F as FilterIcon, K as KeyIcon, N as NotificationIcon, O as OdigosLogoText, a as OverviewIcon, R as RetryIcon, S as SlackLogo, T as TerminalIcon } from './index-
|
|
5
|
-
export { A as ArrowIcon, h as CheckIcon, C as CodeIcon, a as CopyIcon, i as CrossIcon, E as EditIcon, b as EditedIcon, c as ExtendArrowIcon, f as EyeClosedIcon, g as EyeOpenIcon, L as ListIcon, M as MinusIcon, N as NoDataIcon, d as NotebookIcon, P as PlusIcon, S as SearchIcon, e as SortArrowsIcon, T as TrashIcon, X as XIcon } from './index-
|
|
1
|
+
import { T as Theme } from './index-Bw7RE2T2.js';
|
|
2
|
+
export { q as AddClusterInfoIcon, y as CPlusPlusLogo, z as CSharpLogo, C as CodeAttributesIcon, w as CustomInstrumentationIcon, r as DeleteAttributeIcon, E as DotnetLogo, G as ElixirLogo, J as GoLogo, H as HeadersCollectionIcon, t as ImageErrorIcon, N as JavaLogo, K as K8sLogo, v as KafkaLogo, O as MysqlLogo, Q as NginxLogo, U as NodejsLogo, x as PayloadCollectionIcon, V as PhpLogo, P as PiiMaskingIcon, W as PostgresLogo, X as PythonLogo, Y as RedisLogo, R as RenameAttributeIcon, Z as RubyLogo, _ as RustLogo, s as SamplerIcon, $ as SwiftLogo } from './index-Bw7RE2T2.js';
|
|
3
|
+
export { C as CheckCircledIcon, E as ErrorTriangleIcon, I as InfoIcon, L as LogsIcon, M as MetricsIcon, O as OdigosLogo, T as TracesIcon, W as WarningTriangleIcon } from './index-DxR7e2Cq.js';
|
|
4
|
+
export { C as CrossCircledIcon, D as DataStreamsIcon, F as FilterIcon, K as KeyIcon, N as NotificationIcon, O as OdigosLogoText, a as OverviewIcon, R as RetryIcon, S as SlackLogo, T as TerminalIcon, U as UserIcon } from './index-CeDmxXUE.js';
|
|
5
|
+
export { A as ArrowIcon, h as CheckIcon, C as CodeIcon, a as CopyIcon, i as CrossIcon, E as EditIcon, b as EditedIcon, c as ExtendArrowIcon, f as EyeClosedIcon, g as EyeOpenIcon, L as ListIcon, M as MinusIcon, N as NoDataIcon, d as NotebookIcon, P as PlusIcon, S as SearchIcon, e as SortArrowsIcon, T as TrashIcon, X as XIcon } from './index-CkTdd3MS.js';
|
|
6
6
|
import React from 'react';
|
|
7
|
-
export { a3 as ActionsIcon, A as AlaudaLogo, a as AlibabaCloudLogo, b as AppDynamicsLogo, c as AwsCloudwatchLogo, d as AwsS3Logo, e as AwsXrayLogo, f as AxiomLogo, B as BetterStackLogo, g as BlobStorageLogo, h as BonreeLogo, C as CauselyLogo, i as ChecklyLogo, j as ChronosphereLogo, k as ClickhouseLogo, l as CoralogixLogo, D as Dash0Logo, m as DatadogLogo, a4 as DestinationsIcon, n as DynatraceLogo, E as ElasticApmLogo, o as ElasticSearchLogo, G as GigapipeLogo, p as GoogleCloudPlatformLogo, q as GrafanaLogo, r as GreptimeLogo, s as GroundcoverLogo, H as HoneycombLogo, t as HyperDxLogo, I as InstanaLogo, J as JaegerLogo, K as KloudmateLogo, L as Last9Logo, u as LightstepLogo, v as LogzioLogo, w as LokiLogo, x as LumigoLogo, M as MiddlewareLogo, a5 as NamespacesIcon, N as NewRelicLogo, O as ObserveLogo, y as OneUptimeLogo, z as OpenObserveLogo, F as OpenTelemetryLogo, P as OpsVerseLogo, Q as OracleLogo, R as PrometheusLogo, S as QrynLogo, T as QuickwitLogo, a6 as RulesIcon, U as SeqLogo, W as SignozLogo, a7 as SourcesIcon, X as SplunkLogo, Y as SumoLogicLogo, Z as TelemetryHubLogo, _ as TempoLogo, $ as TingyunLogo, a0 as TraceloopLogo, a1 as UptraceLogo, a2 as VictoriaMetricsLogo, V as VmLogo } from './index-
|
|
7
|
+
export { a3 as ActionsIcon, A as AlaudaLogo, a as AlibabaCloudLogo, b as AppDynamicsLogo, c as AwsCloudwatchLogo, d as AwsS3Logo, e as AwsXrayLogo, f as AxiomLogo, B as BetterStackLogo, g as BlobStorageLogo, h as BonreeLogo, C as CauselyLogo, i as ChecklyLogo, j as ChronosphereLogo, k as ClickhouseLogo, l as CoralogixLogo, D as Dash0Logo, m as DatadogLogo, a4 as DestinationsIcon, n as DynatraceLogo, E as ElasticApmLogo, o as ElasticSearchLogo, G as GigapipeLogo, p as GoogleCloudPlatformLogo, q as GrafanaLogo, r as GreptimeLogo, s as GroundcoverLogo, H as HoneycombLogo, t as HyperDxLogo, I as InstanaLogo, J as JaegerLogo, K as KloudmateLogo, L as Last9Logo, u as LightstepLogo, v as LogzioLogo, w as LokiLogo, x as LumigoLogo, M as MiddlewareLogo, a5 as NamespacesIcon, N as NewRelicLogo, O as ObserveLogo, y as OneUptimeLogo, z as OpenObserveLogo, F as OpenTelemetryLogo, P as OpsVerseLogo, Q as OracleLogo, R as PrometheusLogo, S as QrynLogo, T as QuickwitLogo, a6 as RulesIcon, U as SeqLogo, W as SignozLogo, a7 as SourcesIcon, X as SplunkLogo, Y as SumoLogicLogo, Z as TelemetryHubLogo, _ as TempoLogo, $ as TingyunLogo, a0 as TraceloopLogo, a1 as UptraceLogo, a2 as VictoriaMetricsLogo, V as VmLogo } from './index-ZTzxu5fz.js';
|
|
8
8
|
import './types.js';
|
|
9
9
|
import 'styled-components';
|
|
10
10
|
|
|
@@ -15,14 +15,18 @@ function safeJsonParse(val, fallback) {
|
|
|
15
15
|
|
|
16
16
|
// Sometimes we need to allow "zero" values, and a simple "!val" check would result in false positives.
|
|
17
17
|
// This function is a strict check for empty values, permitting values like "0" and "false".
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
19
|
const isEmpty = (val) => {
|
|
19
20
|
if (Array.isArray(val)) {
|
|
21
|
+
// empty
|
|
20
22
|
return !val?.length;
|
|
21
23
|
}
|
|
22
24
|
else if (typeof val === 'object') {
|
|
25
|
+
// empty
|
|
23
26
|
return !Object.keys(val || {}).length;
|
|
24
27
|
}
|
|
25
28
|
else {
|
|
29
|
+
// empty if included
|
|
26
30
|
return [undefined, null, ''].includes(val);
|
|
27
31
|
}
|
|
28
32
|
};
|
|
@@ -104,6 +104,14 @@ const CodeAttributesIcon = ({ size = 16, fill: f, rotate = 0, onClick }) => {
|
|
|
104
104
|
React.createElement("path", { stroke: fill, strokeWidth: '1.5', strokeLinecap: 'round', strokeLinejoin: 'round', d: 'M8 4C6.34315 4 5 5.19391 5 6.66667V9.33333C5 10.8061 3.65685 12 2 12C3.65685 12 5 13.1939 5 14.6667V17.3333C5 18.8061 6.34315 20 8 20M16 4C17.6569 4 19 5.19391 19 6.66667V9.33333C19 10.8061 20.3431 12 22 12C20.3431 12 19 13.1939 19 14.6667V17.3333C19 18.8061 17.6569 20 16 20M12.001 12H12M15.001 12H15M9.001 12H9' })));
|
|
105
105
|
};
|
|
106
106
|
|
|
107
|
+
const CustomInstrumentationIcon = ({ size = 16, fill: f, rotate = 0, onClick }) => {
|
|
108
|
+
const theme = Theme.useTheme();
|
|
109
|
+
const fill = f || theme.text.secondary;
|
|
110
|
+
return (React.createElement("svg", { width: size, height: size, viewBox: '0 0 24 24', xmlns: 'http://www.w3.org/2000/svg', fill: 'none', style: { transform: `rotate(${rotate}deg)` }, onClick: onClick },
|
|
111
|
+
React.createElement("path", { stroke: fill, strokeLinecap: 'round', strokeLinejoin: 'round', strokeWidth: '1.5', d: 'M8 9H16M8 13H12M8 17H16M3 5C3 3.89543 3.89543 3 5 3H19C20.1046 3 21 3.89543 21 5V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V5Z' }),
|
|
112
|
+
React.createElement("circle", { cx: '17', cy: '7', r: '2', stroke: fill, strokeWidth: '1.5', fill: 'none' })));
|
|
113
|
+
};
|
|
114
|
+
|
|
107
115
|
const HeadersCollectionIcon = ({ size = 16, fill: f, rotate = 0, onClick }) => {
|
|
108
116
|
const theme = Theme.useTheme();
|
|
109
117
|
const fill = f || theme.text.secondary;
|
|
@@ -695,6 +703,7 @@ const ACTION_OPTIONS = [
|
|
|
695
703
|
const getInstrumentationRuleIcon = (type) => {
|
|
696
704
|
const LOGOS = {
|
|
697
705
|
[InstrumentationRuleType.CodeAttributes]: CodeAttributesIcon,
|
|
706
|
+
[InstrumentationRuleType.CustomInstrumentation]: CustomInstrumentationIcon,
|
|
698
707
|
[InstrumentationRuleType.HeadersCollection]: HeadersCollectionIcon,
|
|
699
708
|
[InstrumentationRuleType.PayloadCollection]: PayloadCollectionIcon,
|
|
700
709
|
[InstrumentationRuleType.UnknownType]: ImageErrorIcon,
|
|
@@ -709,7 +718,15 @@ const INSTRUMENTATION_RULE_OPTIONS = [
|
|
|
709
718
|
label: 'Code Attributes',
|
|
710
719
|
description: 'Collect code attributes containing payload data to traces.',
|
|
711
720
|
docsEndpoint: '/pipeline/rules/codeattributes',
|
|
712
|
-
docsDescription: 'The
|
|
721
|
+
docsDescription: 'The "Code Attributes" Rule can be used to add code attributes containing payload data to traces.',
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
type: InstrumentationRuleType.CustomInstrumentation,
|
|
725
|
+
icon: getInstrumentationRuleIcon(InstrumentationRuleType.CustomInstrumentation),
|
|
726
|
+
label: 'Custom Instrumentation',
|
|
727
|
+
description: 'Define custom instrumentation for specific class and method combinations.',
|
|
728
|
+
docsEndpoint: '/pipeline/rules/custominstrumentation',
|
|
729
|
+
docsDescription: 'The "Custom Instrumentation" Rule can be used to instrument specific class and method combinations for detailed tracing.',
|
|
713
730
|
},
|
|
714
731
|
{
|
|
715
732
|
type: InstrumentationRuleType.HeadersCollection,
|
|
@@ -717,7 +734,7 @@ const INSTRUMENTATION_RULE_OPTIONS = [
|
|
|
717
734
|
label: 'Headers Collection',
|
|
718
735
|
description: 'Collect span attributes containing HTTP Headers data to traces.',
|
|
719
736
|
docsEndpoint: '/pipeline/rules/headerscollection',
|
|
720
|
-
docsDescription: 'The
|
|
737
|
+
docsDescription: 'The "Headers Collection" Rule can be used to add span attributes containing HTTP Headers data to traces.',
|
|
721
738
|
},
|
|
722
739
|
{
|
|
723
740
|
type: InstrumentationRuleType.PayloadCollection,
|
|
@@ -725,7 +742,7 @@ const INSTRUMENTATION_RULE_OPTIONS = [
|
|
|
725
742
|
label: 'Payload Collection',
|
|
726
743
|
description: 'Collect span attributes containing payload data to traces.',
|
|
727
744
|
docsEndpoint: '/pipeline/rules/payloadcollection',
|
|
728
|
-
docsDescription: 'The
|
|
745
|
+
docsDescription: 'The "Payload Collection" Rule can be used to add span attributes containing payload data to traces.',
|
|
729
746
|
},
|
|
730
747
|
];
|
|
731
748
|
|
|
@@ -1871,4 +1888,4 @@ var animations = /*#__PURE__*/Object.freeze({
|
|
|
1871
1888
|
|
|
1872
1889
|
const Theme = { Provider, useTheme, opacity, animations };
|
|
1873
1890
|
|
|
1874
|
-
export {
|
|
1891
|
+
export { SwiftLogo as $, ACTION_OPTIONS as A, BUTTON_TEXTS as B, CodeAttributesIcon as C, DISPLAY_LANGUAGES as D, DotnetLogo as E, FORM_ALERTS as F, ElixirLogo as G, HeadersCollectionIcon as H, INSTRUMENTATION_RULE_OPTIONS as I, GoLogo as J, K8sLogo as K, LANGUAGE_OPTIONS as L, MONITORS_OPTIONS as M, JavaLogo as N, MysqlLogo as O, PiiMaskingIcon as P, NginxLogo as Q, RenameAttributeIcon as R, STORAGE_KEYS as S, Theme as T, NodejsLogo as U, PhpLogo as V, PostgresLogo as W, PythonLogo as X, RedisLogo as Y, RubyLogo as Z, RustLogo as _, useDataStreamStore as a, styleInject as a0, useDrawerStore as b, useEntityStore as c, useFilterStore as d, useInstrumentStore as e, useModalStore as f, useNotificationStore as g, usePendingStore as h, useSelectedStore as i, useSetupStore as j, DEFAULT_DATA_STREAM_NAME as k, DISPLAY_TITLES as l, getActionIcon as m, getEntityId as n, getInstrumentationRuleIcon as o, getProgrammingLanguageIcon as p, AddClusterInfoIcon as q, DeleteAttributeIcon as r, SamplerIcon as s, ImageErrorIcon as t, useDarkMode as u, KafkaLogo as v, CustomInstrumentationIcon as w, PayloadCollectionIcon as x, CPlusPlusLogo as y, CSharpLogo as z };
|