@gravitee/gamma-lib-observability 6.7.0 → 6.8.0
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/INTEGRATION.md +4 -2
- package/dist/api-type-registry.d.ts.map +1 -1
- package/dist/dashboard-access-provider.js +88 -76
- package/dist/dashboards/adapters/time-series-adapter.d.ts +2 -1
- package/dist/dashboards/adapters/time-series-adapter.d.ts.map +1 -1
- package/dist/dashboards/analytics-table/analytics-table-model.d.ts +9 -4
- package/dist/dashboards/analytics-table/analytics-table-model.d.ts.map +1 -1
- package/dist/dashboards/editor/DashboardEditorPage.d.ts.map +1 -1
- package/dist/dashboards/editor/DimensionSelect.d.ts +2 -1
- package/dist/dashboards/editor/DimensionSelect.d.ts.map +1 -1
- package/dist/dashboards/editor/FacetQueryFields.d.ts.map +1 -1
- package/dist/dashboards/editor/MeasureSelect.d.ts.map +1 -1
- package/dist/dashboards/editor/MetricCatalogHint.d.ts +9 -0
- package/dist/dashboards/editor/MetricCatalogHint.d.ts.map +1 -0
- package/dist/dashboards/editor/MetricGroupItemsEditor.d.ts.map +1 -1
- package/dist/dashboards/editor/MetricQueryFields.d.ts.map +1 -1
- package/dist/dashboards/editor/MetricSelect.d.ts +3 -2
- package/dist/dashboards/editor/MetricSelect.d.ts.map +1 -1
- package/dist/dashboards/editor/SeriesListEditor.d.ts.map +1 -1
- package/dist/dashboards/editor/TableColumnsEditor.d.ts +2 -1
- package/dist/dashboards/editor/TableColumnsEditor.d.ts.map +1 -1
- package/dist/dashboards/editor/TableQueryFields.d.ts.map +1 -1
- package/dist/dashboards/editor/WidgetConfigForm.d.ts.map +1 -1
- package/dist/dashboards/editor/WidgetEditorPanel.d.ts.map +1 -1
- package/dist/dashboards/editor/WidgetPreview.d.ts.map +1 -1
- package/dist/dashboards/editor/convert-widget-type.d.ts +3 -3
- package/dist/dashboards/editor/convert-widget-type.d.ts.map +1 -1
- package/dist/dashboards/editor/dashboard-editor-state.d.ts +5 -2
- package/dist/dashboards/editor/dashboard-editor-state.d.ts.map +1 -1
- package/dist/dashboards/editor/dimension-reset.d.ts +3 -2
- package/dist/dashboards/editor/dimension-reset.d.ts.map +1 -1
- package/dist/dashboards/editor/locked-filter-conflicts.d.ts +2 -1
- package/dist/dashboards/editor/locked-filter-conflicts.d.ts.map +1 -1
- package/dist/dashboards/editor/suggest-widget-title.d.ts +2 -1
- package/dist/dashboards/editor/suggest-widget-title.d.ts.map +1 -1
- package/dist/dashboards/editor/testing/select-options.d.ts +3 -1
- package/dist/dashboards/editor/testing/select-options.d.ts.map +1 -1
- package/dist/dashboards/editor/widget-auto-scope.d.ts +2 -1
- package/dist/dashboards/editor/widget-auto-scope.d.ts.map +1 -1
- package/dist/dashboards/metric-catalog.d.ts +101 -46
- package/dist/dashboards/metric-catalog.d.ts.map +1 -1
- package/dist/dashboards/renderers/CartesianWidgetRenderer.d.ts.map +1 -1
- package/dist/dashboards/renderers/MetricGroupWidgetRenderer.d.ts.map +1 -1
- package/dist/dashboards/renderers/TableWidgetRenderer.d.ts.map +1 -1
- package/dist/data-sources/http-analytics-definition-source.d.ts +59 -0
- package/dist/data-sources/http-analytics-definition-source.d.ts.map +1 -0
- package/dist/data-sources/http-filter-source.d.ts.map +1 -1
- package/dist/data-sources/http-traces-filter-source.d.ts.map +1 -1
- package/dist/data-sources/http-utils.d.ts +6 -0
- package/dist/data-sources/http-utils.d.ts.map +1 -1
- package/dist/hooks/query-keys.d.ts +10 -0
- package/dist/hooks/query-keys.d.ts.map +1 -1
- package/dist/hooks/use-metric-catalog.d.ts +36 -0
- package/dist/hooks/use-metric-catalog.d.ts.map +1 -0
- package/dist/index.js +4323 -4205
- package/dist/providers/analytics-api-types-provider.d.ts +4 -4
- package/dist/providers/analytics-definition-source-provider.d.ts +16 -0
- package/dist/providers/analytics-definition-source-provider.d.ts.map +1 -0
- package/dist/routing/ObservabilityRoutes.d.ts.map +1 -1
- package/dist/routing/resolve-analytics-api-types.d.ts +3 -2
- package/dist/routing/resolve-analytics-api-types.d.ts.map +1 -1
- package/dist/styles/observability.css +1 -1
- package/dist/testing/graphene-charts-mock.d.ts +4 -1
- package/dist/testing/graphene-charts-mock.d.ts.map +1 -1
- package/dist/testing/graphene-core-icons-mock.d.ts +2 -0
- package/dist/testing/graphene-core-icons-mock.d.ts.map +1 -1
- package/dist/testing/index.d.ts +6 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/mock-analytics-definition.d.ts +29 -0
- package/dist/testing/mock-analytics-definition.d.ts.map +1 -0
- package/dist/testing/mock-metrics-data-source.d.ts.map +1 -1
- package/dist/testing.js +42 -39
- package/package.json +1 -1
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { MetricCatalog } from '../metric-catalog';
|
|
1
2
|
/**
|
|
2
3
|
* The group-by to keep once a widget's metrics change: `field` when every
|
|
3
4
|
* metric still accepts it under the host's API types, else nothing. The
|
|
4
5
|
* measure is reset the same way when the metric changes; a group-by the new
|
|
5
6
|
* metric refuses would send a query the engine answers with a 400.
|
|
6
7
|
*/
|
|
7
|
-
export declare function acceptedDimension(field: string | undefined, metrics: readonly string[], apiTypes: readonly string[] | undefined): string | undefined;
|
|
8
|
+
export declare function acceptedDimension(catalog: MetricCatalog, field: string | undefined, metrics: readonly string[], apiTypes: readonly string[] | undefined): string | undefined;
|
|
8
9
|
/**
|
|
9
10
|
* Same, for a widget that cannot go without a group-by (bars, doughnut, top
|
|
10
11
|
* list, table): falls back to `API`, which every metric accepts.
|
|
11
12
|
*/
|
|
12
|
-
export declare function acceptedDimensionOrDefault(field: string | undefined, metrics: readonly string[], apiTypes: readonly string[] | undefined): string;
|
|
13
|
+
export declare function acceptedDimensionOrDefault(catalog: MetricCatalog, field: string | undefined, metrics: readonly string[], apiTypes: readonly string[] | undefined): string;
|
|
13
14
|
//# sourceMappingURL=dimension-reset.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dimension-reset.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/dimension-reset.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dimension-reset.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/dimension-reset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAG1E;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,aAAa,EACtB,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GACtC,MAAM,GAAG,SAAS,CAKpB;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,aAAa,EACtB,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GACtC,MAAM,CAER"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FilterCondition, FilterOperator, Widget } from '../../types/domain';
|
|
2
|
+
import { MetricCatalog } from '../metric-catalog';
|
|
2
3
|
/** One side of a conflict, enough to describe it: `≤ 1000`, or `MCP`. */
|
|
3
4
|
export interface ConflictingCondition {
|
|
4
5
|
readonly operator: FilterOperator;
|
|
@@ -34,7 +35,7 @@ export interface LockedFilterConflict {
|
|
|
34
35
|
* widget then fills again. Only what can be decided is flagged (see
|
|
35
36
|
* `canOverlap`), so a warning is never a false alarm.
|
|
36
37
|
*/
|
|
37
|
-
export declare function findLockedFilterConflicts(dashboardFilters: readonly FilterCondition[], widgets: readonly Widget[]): LockedFilterConflict[];
|
|
38
|
+
export declare function findLockedFilterConflicts(catalog: MetricCatalog, dashboardFilters: readonly FilterCondition[], widgets: readonly Widget[]): LockedFilterConflict[];
|
|
38
39
|
/**
|
|
39
40
|
* Whether conditions on one field, ANDed, can still match a value. Only what
|
|
40
41
|
* can be decided answers `false`:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locked-filter-conflicts.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/locked-filter-conflicts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"locked-filter-conflicts.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/locked-filter-conflicts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAElF,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEpE,yEAAyE;AACzE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC;IACzB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,sEAAsE;IACtE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAC;IACzC,oFAAoF;IACpF,QAAQ,CAAC,MAAM,EAAE,SAAS,oBAAoB,EAAE,CAAC;CAClD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,aAAa,EACtB,gBAAgB,EAAE,SAAS,eAAe,EAAE,EAC5C,OAAO,EAAE,SAAS,MAAM,EAAE,GACzB,oBAAoB,EAAE,CA4BxB;AAmBD;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,UAAU,EAAE,SAAS,eAAe,EAAE,GAAG,OAAO,CA+B1E"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Widget } from '../../types/domain';
|
|
2
|
+
import { MetricCatalog } from '../metric-catalog';
|
|
2
3
|
/**
|
|
3
4
|
* Human title derived from the widget query, used when the user leaves the
|
|
4
5
|
* title empty, because an untitled tile reads poorly on the dashboard.
|
|
5
6
|
*/
|
|
6
|
-
export declare function suggestWidgetTitle(widget: Widget): string;
|
|
7
|
+
export declare function suggestWidgetTitle(catalog: MetricCatalog, widget: Widget): string;
|
|
7
8
|
//# sourceMappingURL=suggest-widget-title.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggest-widget-title.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/suggest-widget-title.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"suggest-widget-title.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/suggest-widget-title.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAiD,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEtG;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CA2BjF"}
|
|
@@ -7,7 +7,7 @@ export declare function selectOptions(): HTMLElement[];
|
|
|
7
7
|
/**
|
|
8
8
|
* The option that stands for `name`. A catalog option reads label then
|
|
9
9
|
* technical name; an entry outside the catalog, or one whose label is its
|
|
10
|
-
* name (`API`), reads the
|
|
10
|
+
* name but for the case (`API`, `Plan`), reads the label alone.
|
|
11
11
|
*/
|
|
12
12
|
export declare function selectOptionFor(name: string): HTMLElement | undefined;
|
|
13
13
|
/** Which of `names` the open pickers offer, in the order given. */
|
|
@@ -18,4 +18,6 @@ export declare function offeredOptions(names: readonly string[]): string[];
|
|
|
18
18
|
* click on a missing option fails where it is written.
|
|
19
19
|
*/
|
|
20
20
|
export declare function selectOption(text: string): HTMLElement;
|
|
21
|
+
/** The group labels of the open pickers, in order: a served family, or "Custom". */
|
|
22
|
+
export declare function selectGroupLabels(container?: ParentNode): string[];
|
|
21
23
|
//# sourceMappingURL=select-options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-options.d.ts","sourceRoot":"","sources":["../../../../src/dashboards/editor/testing/select-options.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,WAAW,EAAE,CAE7C;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"select-options.d.ts","sourceRoot":"","sources":["../../../../src/dashboards/editor/testing/select-options.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,WAAW,EAAE,CAE7C;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAIrE;AAED,mEAAmE;AACnE,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAEjE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAItD;AAED,oFAAoF;AACpF,wBAAgB,iBAAiB,CAAC,SAAS,GAAE,UAAqB,GAAG,MAAM,EAAE,CAE5E"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FilterCondition, Widget } from '../../types/domain';
|
|
2
|
+
import { MetricCatalog } from '../metric-catalog';
|
|
2
3
|
/**
|
|
3
4
|
* Ensures widgets whose metrics belong to a specific API type always carry the
|
|
4
5
|
* owning `API_TYPE` filter, because querying a scoped metric without it fails
|
|
@@ -15,5 +16,5 @@ import { FilterCondition, Widget } from '../../types/domain';
|
|
|
15
16
|
* impossible to remove: dropping it and then toggling any unrelated control
|
|
16
17
|
* would silently bring it back.
|
|
17
18
|
*/
|
|
18
|
-
export declare function withAutoScope(previous: Widget, next: Widget, upstream?: readonly FilterCondition[]): Widget;
|
|
19
|
+
export declare function withAutoScope(catalog: MetricCatalog, previous: Widget, next: Widget, upstream?: readonly FilterCondition[]): Widget;
|
|
19
20
|
//# sourceMappingURL=widget-auto-scope.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget-auto-scope.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/widget-auto-scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"widget-auto-scope.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/widget-auto-scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAA2C,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAoChG;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,QAAQ,GAAE,SAAS,eAAe,EAAO,GACxC,MAAM,CAKR"}
|
|
@@ -1,39 +1,48 @@
|
|
|
1
|
+
import { AnalyticsDefinition } from '../data-sources/http-analytics-definition-source';
|
|
1
2
|
import { FilterCondition } from '../types/domain';
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* single place to extend when new metrics land.
|
|
4
|
+
* The metrics, facet dimensions and measures the widget editor offers, and
|
|
5
|
+
* the names a dashboard labels its widgets by.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* The catalog is served by the Management API's analytics definition endpoint
|
|
8
|
+
* (`GET …/observability/analytics/definition?apiType=…`, OBS-73) and read
|
|
9
|
+
* through `useMetricCatalog`, which builds a {@link MetricCatalog} from the
|
|
10
|
+
* served families and dimensions with {@link createMetricCatalog}. The dataset
|
|
11
|
+
* at the bottom of this file is the **fallback only**: the hook hands it out
|
|
12
|
+
* while the definition loads, when no source is mounted, and when the request
|
|
13
|
+
* fails (an older backend answers 404). It is what the endpoint served for
|
|
14
|
+
* `apiType=HTTP_PROXY&apiType=LLM`, captured from APIM master d563f02c8
|
|
15
|
+
* (:8093) on 2026-10-30, without `filters`; the parity test pins it to the
|
|
16
|
+
* captured fixture. Being behind the backend is expected and must stay harmless:
|
|
17
|
+
* nothing here may rewrite a saved widget, only constrain what the editor
|
|
18
|
+
* offers.
|
|
8
19
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
20
|
+
* Every metric entry states two things the editor keeps apart:
|
|
21
|
+
*
|
|
22
|
+
* - `apis`: the API kinds the engine computes the metric for, as served. The
|
|
23
|
+
* pickers offer an entry when its `apis` meet the API types the host declared
|
|
24
|
+
* (`analyticsApiTypes`, else `scopeApiTypes`).
|
|
12
25
|
* - `requiredScopes`: the `API_TYPE` values the editor stamps on the widget as
|
|
13
26
|
* a visible filter, because querying the metric without one fails
|
|
14
|
-
* server-side (GMA-414).
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* Hand-mirrored from the Management API's `analytics-definition.yaml` as of
|
|
20
|
-
* 2026-10-29. Being behind it is expected and must stay harmless: nothing here
|
|
21
|
-
* may rewrite a saved widget, only constrain what the editor offers. When the
|
|
22
|
-
* two disagree, the backend wins and this file is what gets updated.
|
|
27
|
+
* server-side (GMA-414). The wire carries none: it is this library's rule,
|
|
28
|
+
* {@link requiredScopesOf}, and it never says where a metric is offered. An
|
|
29
|
+
* HTTP metric stamped with its five kinds would fire the locked-filter
|
|
30
|
+
* conflict on every AIM dashboard, and an AuthZ metric stamped with `AUTHZ`
|
|
31
|
+
* would empty every AuthZ widget, which scope on `RECORD_TYPE`.
|
|
23
32
|
*/
|
|
24
|
-
/** Every API
|
|
33
|
+
/** Every API kind the analytics definition computes metrics for. */
|
|
25
34
|
export declare const ANALYTICS_API_TYPES: readonly ["HTTP_PROXY", "LLM", "MESSAGE", "MCP", "A2A", "NATIVE", "EDGE", "AUTHZ"];
|
|
26
35
|
export type AnalyticsApiType = (typeof ANALYTICS_API_TYPES)[number];
|
|
27
|
-
/** The API
|
|
36
|
+
/** The API kinds whose metrics and dimensions the engine refuses without an `API_TYPE` filter (GMA-414). */
|
|
28
37
|
export type MetricScope = 'LLM' | 'MCP';
|
|
29
38
|
export interface MetricCatalogEntry {
|
|
30
39
|
readonly name: string;
|
|
40
|
+
/** As served: the one vocabulary for metric names across every host (OBS-73). */
|
|
31
41
|
readonly label: string;
|
|
32
|
-
|
|
33
|
-
/** Unit suffix suggested for series using this metric (e.g. `ms`, `req`). */
|
|
42
|
+
/** Unit suffix for series and columns using this metric (`ms`, `%`, `B`); none for a plain number. */
|
|
34
43
|
readonly unit?: string;
|
|
35
|
-
/** API
|
|
36
|
-
readonly apis: readonly
|
|
44
|
+
/** API kinds the engine computes this metric for: where the pickers offer it. */
|
|
45
|
+
readonly apis: readonly string[];
|
|
37
46
|
/**
|
|
38
47
|
* `API_TYPE` values the editor stamps as a widget filter when this metric is
|
|
39
48
|
* picked, because the engine refuses the metric without one. Undefined for a
|
|
@@ -46,57 +55,82 @@ export interface MetricCatalogEntry {
|
|
|
46
55
|
*/
|
|
47
56
|
readonly facets: readonly string[];
|
|
48
57
|
/**
|
|
49
|
-
* Measures the analytics engine accepts for this metric
|
|
50
|
-
*
|
|
51
|
-
*
|
|
58
|
+
* Measures the analytics engine accepts for this metric, as served; the
|
|
59
|
+
* first is the default. Requesting any other measure is refused with HTTP
|
|
60
|
+
* 400, so the editor only offers these. A measure this library does not
|
|
61
|
+
* know is offered as it came, never dropped.
|
|
52
62
|
*/
|
|
53
|
-
readonly measures: readonly
|
|
63
|
+
readonly measures: readonly string[];
|
|
54
64
|
}
|
|
55
65
|
export interface DimensionCatalogEntry {
|
|
56
66
|
readonly field: string;
|
|
57
67
|
readonly label: string;
|
|
58
68
|
/**
|
|
59
|
-
* API
|
|
60
|
-
* it is
|
|
61
|
-
* proxy fills. Undefined: offered under every
|
|
69
|
+
* API kinds that write this field. The definition declares none on a
|
|
70
|
+
* dimension; it is derived from the name for the LLM and MCP dimensions,
|
|
71
|
+
* which only the matching proxy fills. Undefined: offered under every kind.
|
|
62
72
|
*/
|
|
63
|
-
readonly apis?: readonly
|
|
73
|
+
readonly apis?: readonly MetricScope[];
|
|
64
74
|
/** As on a metric: the `API_TYPE` values stamped when the dimension is picked. */
|
|
65
75
|
readonly requiredScopes?: readonly MetricScope[];
|
|
66
76
|
}
|
|
77
|
+
/** A picker group: one served family. */
|
|
67
78
|
export interface MetricCatalogGroup {
|
|
68
79
|
readonly id: string;
|
|
69
80
|
readonly label: string;
|
|
70
81
|
readonly metrics: readonly MetricCatalogEntry[];
|
|
71
82
|
}
|
|
72
|
-
|
|
83
|
+
/** The measures the editor offers for a metric outside the catalog, whose own list is unknown. */
|
|
84
|
+
export declare const MEASURES: readonly ["COUNT", "SUM", "AVG", "MIN", "MAX", "P50", "P90", "P95", "P99", "PERCENTAGE"];
|
|
73
85
|
export type Measure = (typeof MEASURES)[number];
|
|
74
|
-
|
|
75
|
-
export
|
|
76
|
-
export
|
|
77
|
-
|
|
78
|
-
|
|
86
|
+
/** Where a catalog came from: the definition endpoint, or the copy bundled below. */
|
|
87
|
+
export type MetricCatalogSource = 'served' | 'bundled';
|
|
88
|
+
export interface MetricCatalog {
|
|
89
|
+
readonly source: MetricCatalogSource;
|
|
90
|
+
readonly groups: readonly MetricCatalogGroup[];
|
|
91
|
+
readonly dimensions: readonly DimensionCatalogEntry[];
|
|
92
|
+
readonly metricIndex: ReadonlyMap<string, MetricCatalogEntry>;
|
|
93
|
+
readonly dimensionIndex: ReadonlyMap<string, DimensionCatalogEntry>;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* The `API_TYPE` values a metric must be queried with: the one kind it exists
|
|
97
|
+
* for, when that kind is LLM or MCP. A metric of several kinds, or of a kind
|
|
98
|
+
* whose widgets scope by another field (AuthZ on `RECORD_TYPE`), needs none.
|
|
99
|
+
*/
|
|
100
|
+
export declare function requiredScopesOf(apiTypes: readonly string[]): readonly MetricScope[] | undefined;
|
|
101
|
+
/** The one kind a dimension belongs to, read from its name: `LLM_PROXY_*` to LLM, `MCP_PROXY_*` to MCP. */
|
|
102
|
+
export declare function dimensionScopeOf(field: string): MetricScope | undefined;
|
|
103
|
+
/** The catalog a definition reads as: served families as groups, in their order; dimensions in theirs. */
|
|
104
|
+
export declare function createMetricCatalog(definition: AnalyticsDefinition, source: MetricCatalogSource): MetricCatalog;
|
|
105
|
+
export declare function findMetricEntry(catalog: MetricCatalog, name: string): MetricCatalogEntry | undefined;
|
|
106
|
+
export declare function findDimensionEntry(catalog: MetricCatalog, field: string): DimensionCatalogEntry | undefined;
|
|
107
|
+
/** The served label of a metric, or its name for one the catalog does not know. */
|
|
108
|
+
export declare function metricLabel(catalog: MetricCatalog, name: string): string;
|
|
109
|
+
/** The served label of a dimension, or its field for one the catalog does not know. */
|
|
110
|
+
export declare function dimensionLabel(catalog: MetricCatalog, field: string): string;
|
|
79
111
|
/**
|
|
80
112
|
* Measures the backend accepts for a metric. Undefined for metrics outside
|
|
81
113
|
* the catalog (custom/JSON-authored): the editor then offers the full list.
|
|
82
114
|
*/
|
|
83
|
-
export declare function supportedMeasuresFor(metric: string): readonly
|
|
115
|
+
export declare function supportedMeasuresFor(catalog: MetricCatalog, metric: string): readonly string[] | undefined;
|
|
84
116
|
/**
|
|
85
117
|
* Returns `current` when the metric supports it, otherwise the metric's
|
|
86
118
|
* default measure. Unknown metrics keep whatever the user configured.
|
|
87
119
|
*/
|
|
88
|
-
export declare function resolveMeasureForMetric(metric: string, current: string | undefined): string | undefined;
|
|
89
|
-
export declare function dimensionLabel(field: string): string;
|
|
120
|
+
export declare function resolveMeasureForMetric(catalog: MetricCatalog, metric: string, current: string | undefined): string | undefined;
|
|
90
121
|
/**
|
|
91
122
|
* The metric groups the picker offers a host that declared `apiTypes`: every
|
|
92
123
|
* group when it declared none, otherwise the metrics whose `apis` meet them,
|
|
93
124
|
* a group left empty dropped.
|
|
94
125
|
*
|
|
95
|
-
* A declaration
|
|
96
|
-
*
|
|
97
|
-
*
|
|
126
|
+
* A declaration no metric meets offers the whole catalog rather than nothing:
|
|
127
|
+
* an author with no metric to pick could not build any widget. It bites on
|
|
128
|
+
* the bundled catalog, which knows the Gateway and LLM families alone, and on
|
|
129
|
+
* a served one for a host whose declared kinds the analytics do not know
|
|
130
|
+
* (`['WEBHOOK']`): the definition of every kind was asked for, and all of it
|
|
131
|
+
* is offered.
|
|
98
132
|
*/
|
|
99
|
-
export declare function offeredMetricGroups(apiTypes: readonly string[] | undefined): readonly MetricCatalogGroup[];
|
|
133
|
+
export declare function offeredMetricGroups(catalog: MetricCatalog, apiTypes: readonly string[] | undefined): readonly MetricCatalogGroup[];
|
|
100
134
|
/**
|
|
101
135
|
* The dimensions the picker offers as a group-by for `metrics` under the
|
|
102
136
|
* declared `apiTypes`: those every known metric lists among its facets, and
|
|
@@ -104,14 +138,31 @@ export declare function offeredMetricGroups(apiTypes: readonly string[] | undefi
|
|
|
104
138
|
* nothing: what it accepts is unknown, and refusing every dimension would
|
|
105
139
|
* leave the author none to pick.
|
|
106
140
|
*/
|
|
107
|
-
export declare function offeredDimensions(metrics: readonly string[], apiTypes: readonly string[] | undefined): readonly DimensionCatalogEntry[];
|
|
141
|
+
export declare function offeredDimensions(catalog: MetricCatalog, metrics: readonly string[], apiTypes: readonly string[] | undefined): readonly DimensionCatalogEntry[];
|
|
142
|
+
/** What a new widget, series, tile or column starts on. */
|
|
143
|
+
export interface DefaultMetric {
|
|
144
|
+
readonly name: string;
|
|
145
|
+
/** The metric's default measure, the first it is served with. */
|
|
146
|
+
readonly measure: string;
|
|
147
|
+
readonly unit?: string;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* The first `count` metrics the host is offered, in picker order: what a new
|
|
151
|
+
* widget, series, tile or column starts on, so an author on an AuthZ or
|
|
152
|
+
* Kafka host starts on a metric of their own catalog rather than on an HTTP
|
|
153
|
+
* one shown under Custom. Never empty: a catalog with no metric at all falls
|
|
154
|
+
* back to the bundled one.
|
|
155
|
+
*/
|
|
156
|
+
export declare function defaultMetricsFor(catalog: MetricCatalog, apiTypes: readonly string[] | undefined, count?: number): readonly DefaultMetric[];
|
|
157
|
+
/** The first metric the host is offered. See {@link defaultMetricsFor}. */
|
|
158
|
+
export declare function defaultMetricFor(catalog: MetricCatalog, apiTypes: readonly string[] | undefined): DefaultMetric;
|
|
108
159
|
/** The field the editor scopes a widget by when its metric belongs to an API type. */
|
|
109
160
|
export declare const API_TYPE_FIELD = "API_TYPE";
|
|
110
161
|
/**
|
|
111
162
|
* Collects the API-type scopes required by the metrics/dimensions referenced
|
|
112
163
|
* in a widget configuration. Returns undefined when nothing is scoped.
|
|
113
164
|
*/
|
|
114
|
-
export declare function requiredScopesFor(names: {
|
|
165
|
+
export declare function requiredScopesFor(catalog: MetricCatalog, names: {
|
|
115
166
|
metrics: readonly string[];
|
|
116
167
|
dimensions: readonly string[];
|
|
117
168
|
}): readonly MetricScope[] | undefined;
|
|
@@ -121,8 +172,12 @@ export declare function requiredScopesFor(names: {
|
|
|
121
172
|
* wins); removes nothing when scopes are no longer required, so a manual
|
|
122
173
|
* broader scope survives metric changes.
|
|
123
174
|
*/
|
|
124
|
-
export declare function withRequiredScopeFilter(filters: readonly FilterCondition[] | undefined, names: {
|
|
175
|
+
export declare function withRequiredScopeFilter(catalog: MetricCatalog, filters: readonly FilterCondition[] | undefined, names: {
|
|
125
176
|
metrics: readonly string[];
|
|
126
177
|
dimensions: readonly string[];
|
|
127
178
|
}): FilterCondition[] | undefined;
|
|
179
|
+
/** The endpoint's answer to `apiType=HTTP_PROXY&apiType=LLM`, captured from APIM master d563f02c8 (:8093) on 2026-10-30, without `filters`. */
|
|
180
|
+
export declare const BUNDLED_ANALYTICS_DEFINITION: AnalyticsDefinition;
|
|
181
|
+
/** The catalog every reader gets until the served one is there, and for good when it never comes. */
|
|
182
|
+
export declare const BUNDLED_METRIC_CATALOG: MetricCatalog;
|
|
128
183
|
//# sourceMappingURL=metric-catalog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metric-catalog.d.ts","sourceRoot":"","sources":["../../src/dashboards/metric-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD
|
|
1
|
+
{"version":3,"file":"metric-catalog.d.ts","sourceRoot":"","sources":["../../src/dashboards/metric-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EAGpB,MAAM,kDAAkD,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,oEAAoE;AACpE,eAAO,MAAM,mBAAmB,oFAAqF,CAAC;AAEtH,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,4GAA4G;AAC5G,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,KAAK,CAAC;AAExC,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,iFAAiF;IACjF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,sGAAsG;IACtG,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,iFAAiF;I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+D1C,CAAC;AAEF,qGAAqG;AACrG,eAAO,MAAM,sBAAsB,EAAE,aAA4E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartesianWidgetRenderer.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/CartesianWidgetRenderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CartesianWidgetRenderer.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/CartesianWidgetRenderer.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,eAAe,EAAoB,MAAM,oBAAoB,CAAC;AAO5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAMvE,wBAAgB,uBAAuB,CAAC,EACtC,MAAM,EACN,SAAS,EACT,OAAO,EACP,eAAe,GAChB,EAAE,mBAAmB,CAAC,eAAe,CAAC,2CAqItC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetricGroupWidgetRenderer.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/MetricGroupWidgetRenderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MetricGroupWidgetRenderer.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/MetricGroupWidgetRenderer.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAA6B,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AASvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAMvE,wBAAgB,yBAAyB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,mBAAmB,CAAC,iBAAiB,CAAC,2CAmH/G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableWidgetRenderer.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/TableWidgetRenderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableWidgetRenderer.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/TableWidgetRenderer.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAa,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAQjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AA0BvE,wBAAgB,mBAAmB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,mBAAmB,CAAC,WAAW,CAAC,2CAiH/G"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { HttpOptions } from '../providers/http-provider';
|
|
2
|
+
/**
|
|
3
|
+
* One metric as the analytics definition endpoint describes it.
|
|
4
|
+
*
|
|
5
|
+
* `unit`, `measures` and `origin` are open strings: the endpoint gains values
|
|
6
|
+
* (dynamic metrics are `DECLARED` or `DISCOVERED`, OBS-77) without a library
|
|
7
|
+
* release, and a value this library does not know is carried as it came, never
|
|
8
|
+
* refused.
|
|
9
|
+
*/
|
|
10
|
+
export interface AnalyticsMetricDefinition {
|
|
11
|
+
readonly name: string;
|
|
12
|
+
readonly label: string;
|
|
13
|
+
/** `NUMBER`, `MILLISECONDS`, `BYTES` or `PERCENT` today. */
|
|
14
|
+
readonly unit: string;
|
|
15
|
+
/** The API kinds the metric exists for. */
|
|
16
|
+
readonly apiTypes: readonly string[];
|
|
17
|
+
/** The measures the engine accepts for it; the first is the default. */
|
|
18
|
+
readonly measures: readonly string[];
|
|
19
|
+
/** Names of the dimensions the metric can be grouped by; their labels are in `dimensions`. */
|
|
20
|
+
readonly facets: readonly string[];
|
|
21
|
+
/** The filters the engine accepts on it. Served, not read by this library. */
|
|
22
|
+
readonly filters?: readonly string[];
|
|
23
|
+
readonly origin: string;
|
|
24
|
+
}
|
|
25
|
+
export interface AnalyticsMetricFamily {
|
|
26
|
+
/** `GATEWAY`, `LLM`, `MESSAGE`, `EDGE`, `NATIVE` or `AUTHZ`. */
|
|
27
|
+
readonly name: string;
|
|
28
|
+
readonly label: string;
|
|
29
|
+
readonly metrics: readonly AnalyticsMetricDefinition[];
|
|
30
|
+
}
|
|
31
|
+
export interface AnalyticsDimensionDefinition {
|
|
32
|
+
readonly name: string;
|
|
33
|
+
readonly label: string;
|
|
34
|
+
readonly origin: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The body of `GET {baseUrl}/observability/analytics/definition?apiType=…`
|
|
38
|
+
* (Management API, OBS-73): the metrics of the requested API kinds grouped by
|
|
39
|
+
* family, families in a fixed order and empty ones left out, and every
|
|
40
|
+
* dimension those metrics can be grouped by, once, in order of first
|
|
41
|
+
* appearance.
|
|
42
|
+
*/
|
|
43
|
+
export interface AnalyticsDefinition {
|
|
44
|
+
readonly families: readonly AnalyticsMetricFamily[];
|
|
45
|
+
readonly dimensions: readonly AnalyticsDimensionDefinition[];
|
|
46
|
+
}
|
|
47
|
+
export interface AnalyticsDefinitionSource {
|
|
48
|
+
/**
|
|
49
|
+
* What tells this source's answers apart in the query cache: the base URL
|
|
50
|
+
* for the HTTP source, which carries the organization and the environment,
|
|
51
|
+
* so an environment switch never reads the other environment's catalog.
|
|
52
|
+
* Any constant for an in-memory source.
|
|
53
|
+
*/
|
|
54
|
+
readonly scope: string;
|
|
55
|
+
/** The definition for `apiTypes`, which must name at least one API kind. */
|
|
56
|
+
fetchAnalyticsDefinition(apiTypes: readonly string[], signal?: AbortSignal): Promise<AnalyticsDefinition>;
|
|
57
|
+
}
|
|
58
|
+
export declare function createHttpAnalyticsDefinitionSource(baseUrl: string, options?: HttpOptions): AnalyticsDefinitionSource;
|
|
59
|
+
//# sourceMappingURL=http-analytics-definition-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-analytics-definition-source.d.ts","sourceRoot":"","sources":["../../src/data-sources/http-analytics-definition-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAI9D;;;;;;;GAOG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BAAmB,CAAC,CAAC;CAC3G;AAED,wBAAgB,mCAAmC,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,yBAAyB,CAsBrH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-filter-source.d.ts","sourceRoot":"","sources":["../../src/data-sources/http-filter-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EAKf,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAiE9D,MAAM,WAAW,YAAY;IAC3B,sBAAsB,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IACxE;;;;OAIG;IACH,aAAa,CACX,OAAO,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,EAAE,CAAA;KAAE,EAAE,EAChD,MAAM,CAAC,EAAE,WAAW,EACpB,OAAO,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,GAChC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CACpD;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"http-filter-source.d.ts","sourceRoot":"","sources":["../../src/data-sources/http-filter-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EAKf,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAiE9D,MAAM,WAAW,YAAY;IAC3B,sBAAsB,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IACxE;;;;OAIG;IACH,aAAa,CACX,OAAO,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,EAAE,CAAA;KAAE,EAAE,EAChD,MAAM,CAAC,EAAE,WAAW,EACpB,OAAO,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,GAChC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CACpD;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,YAAY,CAqH3F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-traces-filter-source.d.ts","sourceRoot":"","sources":["../../src/data-sources/http-traces-filter-source.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAG9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AA2CzD,MAAM,WAAW,yBAA0B,SAAQ,WAAW;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,yBAAyB,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"http-traces-filter-source.d.ts","sourceRoot":"","sources":["../../src/data-sources/http-traces-filter-source.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAG9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AA2CzD,MAAM,WAAW,yBAA0B,SAAQ,WAAW;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,yBAAyB,GAAG,YAAY,CA0G/G"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { HttpOptions } from '../providers/http-provider';
|
|
2
|
+
/**
|
|
3
|
+
* The `RequestInit` of a call made with the shared HTTP options: `extra` (a
|
|
4
|
+
* signal, a method, a body) plus the host's headers and credentials, headers
|
|
5
|
+
* merged only when there are any so a bare GET stays a bare GET.
|
|
6
|
+
*/
|
|
7
|
+
export declare function buildRequestInit(options: HttpOptions | undefined, extra?: RequestInit): RequestInit;
|
|
2
8
|
export declare function resolveHeaders(headers: HttpOptions['headers']): HeadersInit | undefined;
|
|
3
9
|
/**
|
|
4
10
|
* Merge multiple HeadersInit sources. Later sources override earlier ones
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-utils.d.ts","sourceRoot":"","sources":["../../src/data-sources/http-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG,WAAW,GAAG,SAAS,CAGvF;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,OAAO,EAAE,CAAC,WAAW,GAAG,SAAS,GAAG,IAAI,CAAC,EAAE,GAAG,WAAW,CAOxF"}
|
|
1
|
+
{"version":3,"file":"http-utils.d.ts","sourceRoot":"","sources":["../../src/data-sources/http-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,EAAE,KAAK,CAAC,EAAE,WAAW,GAAG,WAAW,CAQnG;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG,WAAW,GAAG,SAAS,CAGvF;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,OAAO,EAAE,CAAC,WAAW,GAAG,SAAS,GAAG,IAAI,CAAC,EAAE,GAAG,WAAW,CAOxF"}
|
|
@@ -76,5 +76,15 @@ export declare const observabilityQueryKeys: {
|
|
|
76
76
|
readonly filterLabels: (key: string, apiProduct?: string) => readonly ["observability", "filterLabels", string, {
|
|
77
77
|
readonly apiProduct: string | undefined;
|
|
78
78
|
}];
|
|
79
|
+
/**
|
|
80
|
+
* The analytics definition a dashboard reads its metric catalog from, keyed
|
|
81
|
+
* on the source's scope (the base URL, which carries the organization and
|
|
82
|
+
* the environment) and on the API kinds asked for, as a set: the endpoint
|
|
83
|
+
* answers the same body whatever their order.
|
|
84
|
+
*/
|
|
85
|
+
readonly analyticsDefinition: (scope: string, apiTypes: readonly string[]) => readonly ["observability", "analytics-definition", {
|
|
86
|
+
readonly scope: string;
|
|
87
|
+
readonly apiTypes: string[];
|
|
88
|
+
}];
|
|
79
89
|
};
|
|
80
90
|
//# sourceMappingURL=query-keys.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-keys.d.ts","sourceRoot":"","sources":["../../src/hooks/query-keys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAyB3E,eAAO,MAAM,sBAAsB;;mCAItB,SAAS,kBAAkB,EAAE,aAC3B,SAAS,YACV,MAAM,YACN,eAAe,EAAE,OACtB,SAAS,MAAM,EAAE,UACd,MAAM,WACL,SAAS,YAAY,EAAE;;;;;;;;;0BAS5B,SAAS,MAAM,EAAE,aACV,SAAS,YACV,eAAe,EAAE,YACjB;QACR,OAAO,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;QACxC,MAAM,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC;QACjC,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB;;;;;;;;;iCAgBiB,SAAS,aAAa,EAAE,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;;kCAGpD,MAAM,WAAW,MAAM;;;;;4CAIb,MAAM;;;4CAEN,MAAM,UAAU,MAAM;;;;iDAGjB,MAAM;;;6BAE1B,MAAM;IAEtB;;;;;OAKG;yCACyB,MAAM;;;IAElC;;;OAGG;mCACmB,MAAM,WAAW,MAAM;;;iCAEzB,MAAM,eAAe,MAAM;;;IAE/C;;;;;OAKG;0CAC0B,MAAM,YAAY,SAAS,MAAM,EAAE;;;;CAExD,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { MetricCatalog } from '../dashboards/metric-catalog';
|
|
2
|
+
/** Aligned with the filter definitions: a catalog changes on a backend release, not between two edits. */
|
|
3
|
+
export declare const ANALYTICS_DEFINITION_STALE_TIME: number;
|
|
4
|
+
/**
|
|
5
|
+
* The API kinds asked of the definition endpoint for a host's declaration:
|
|
6
|
+
* the kinds it declared that the analytics know, in the endpoint's own order
|
|
7
|
+
* so the same set always builds the same URL; every kind when it declared
|
|
8
|
+
* none, or none the analytics know. A kind the analytics do not know is left
|
|
9
|
+
* out rather than sent: the endpoint refuses the whole request for one
|
|
10
|
+
* unknown token, and the catalog of the known kinds would be lost with it.
|
|
11
|
+
*/
|
|
12
|
+
export declare function requestedApiTypes(declared: readonly string[] | undefined): readonly string[];
|
|
13
|
+
export interface MetricCatalogState {
|
|
14
|
+
readonly catalog: MetricCatalog;
|
|
15
|
+
/**
|
|
16
|
+
* The bundled catalog is standing in for the served one, for the current
|
|
17
|
+
* window: no source is mounted, or the request was refused or failed after
|
|
18
|
+
* the retry policy. Not while the first request is still in flight, nor
|
|
19
|
+
* when a refresh fails over a served catalog already in hand, which stays.
|
|
20
|
+
*/
|
|
21
|
+
readonly onFallback: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The metric catalog of the environment, and whether it is the bundled one.
|
|
25
|
+
*
|
|
26
|
+
* Asked once per environment and set of API kinds, through the source in
|
|
27
|
+
* scope and the `observabilityQueryKeys` factory, and shared by every reader
|
|
28
|
+
* of the dashboard, editor and view mode alike. Nothing waits on it: until
|
|
29
|
+
* the served catalog is there the bundled one answers, so a saved widget
|
|
30
|
+
* renders at once with the labels it knows, and takes the served ones when
|
|
31
|
+
* they arrive.
|
|
32
|
+
*/
|
|
33
|
+
export declare function useMetricCatalogState(): MetricCatalogState;
|
|
34
|
+
/** The metric catalog every reader labels and offers by. See {@link useMetricCatalogState}. */
|
|
35
|
+
export declare function useMetricCatalog(): MetricCatalog;
|
|
36
|
+
//# sourceMappingURL=use-metric-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-metric-catalog.d.ts","sourceRoot":"","sources":["../../src/hooks/use-metric-catalog.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,8BAA8B,CAAC;AAQtC,0GAA0G;AAC1G,eAAO,MAAM,+BAA+B,QAAgB,CAAC;AAE7D;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GAAG,SAAS,MAAM,EAAE,CAG5F;AAiCD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,IAAI,kBAAkB,CA2C1D;AAED,+FAA+F;AAC/F,wBAAgB,gBAAgB,IAAI,aAAa,CAEhD"}
|