From e0b7cf3ee39e9cd88ece28b07c64ee27f0d0b3a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Wed, 23 Mar 2022 18:48:05 +0100 Subject: [PATCH 01/31] Create `@elastic/analytics` package --- package.json | 2 + packages/BUILD.bazel | 2 + packages/elastic-analytics/BUILD.bazel | 117 ++ packages/elastic-analytics/README.md | 330 +++++ packages/elastic-analytics/jest.config.js | 13 + packages/elastic-analytics/package.json | 7 + .../analytics_client/analytics_client.test.ts | 1170 +++++++++++++++++ .../src/analytics_client/analytics_client.ts | 331 +++++ .../src/analytics_client/index.ts | 27 + .../shippers_registry.test.ts | 123 ++ .../src/analytics_client/shippers_registry.ts | 90 ++ .../src/analytics_client/types.ts | 204 +++ .../elastic-analytics/src/events/index.ts | 9 + .../elastic-analytics/src/events/types.ts | 60 + packages/elastic-analytics/src/index.ts | 48 + .../elastic-analytics/src/schema/index.ts | 22 + .../src/schema/types.test.ts | 548 ++++++++ .../elastic-analytics/src/schema/types.ts | 166 +++ .../elastic-analytics/src/shippers/index.ts | 9 + .../elastic-analytics/src/shippers/mocks.ts | 31 + .../elastic-analytics/src/shippers/types.ts | 35 + packages/elastic-analytics/tsconfig.json | 18 + yarn.lock | 8 + 23 files changed, 3370 insertions(+) create mode 100644 packages/elastic-analytics/BUILD.bazel create mode 100644 packages/elastic-analytics/README.md create mode 100644 packages/elastic-analytics/jest.config.js create mode 100644 packages/elastic-analytics/package.json create mode 100644 packages/elastic-analytics/src/analytics_client/analytics_client.test.ts create mode 100644 packages/elastic-analytics/src/analytics_client/analytics_client.ts create mode 100644 packages/elastic-analytics/src/analytics_client/index.ts create mode 100644 packages/elastic-analytics/src/analytics_client/shippers_registry.test.ts create mode 100644 packages/elastic-analytics/src/analytics_client/shippers_registry.ts create mode 100644 packages/elastic-analytics/src/analytics_client/types.ts create mode 100644 packages/elastic-analytics/src/events/index.ts create mode 100644 packages/elastic-analytics/src/events/types.ts create mode 100644 packages/elastic-analytics/src/index.ts create mode 100644 packages/elastic-analytics/src/schema/index.ts create mode 100644 packages/elastic-analytics/src/schema/types.test.ts create mode 100644 packages/elastic-analytics/src/schema/types.ts create mode 100644 packages/elastic-analytics/src/shippers/index.ts create mode 100644 packages/elastic-analytics/src/shippers/mocks.ts create mode 100644 packages/elastic-analytics/src/shippers/types.ts create mode 100644 packages/elastic-analytics/tsconfig.json diff --git a/package.json b/package.json index 24367fa77216ee..ab547f58dd9c58 100644 --- a/package.json +++ b/package.json @@ -102,6 +102,7 @@ "@dnd-kit/core": "^3.1.1", "@dnd-kit/sortable": "^4.0.0", "@dnd-kit/utilities": "^2.0.0", + "@elastic/analytics": "link:bazel-bin/packages/elastic-analytics", "@elastic/apm-rum": "^5.10.2", "@elastic/apm-rum-react": "^1.3.4", "@elastic/apm-synthtrace": "link:bazel-bin/packages/elastic-apm-synthtrace", @@ -199,6 +200,7 @@ "@turf/distance": "6.0.1", "@turf/helpers": "6.0.1", "@turf/length": "^6.0.2", + "@types/elastic__analytics": "link:bazel-bin/packages/elastic-analytics/npm_module_types", "@types/jsonwebtoken": "^8.5.6", "@types/kbn__shared-ux-components": "link:bazel-bin/packages/kbn-shared-ux-components/npm_module_types", "@types/kbn__shared-ux-services": "link:bazel-bin/packages/kbn-shared-ux-services/npm_module_types", diff --git a/packages/BUILD.bazel b/packages/BUILD.bazel index e880df5f557826..31b138a3e29a3a 100644 --- a/packages/BUILD.bazel +++ b/packages/BUILD.bazel @@ -28,6 +28,7 @@ filegroup( "//packages/kbn-dev-utils:build", "//packages/kbn-doc-links:build", "//packages/kbn-docs-utils:build", + "//packages/elastic-analytics:build", "//packages/kbn-es-archiver:build", "//packages/kbn-es-query:build", "//packages/kbn-es:build", @@ -110,6 +111,7 @@ filegroup( "//packages/kbn-dev-utils:build_types", "//packages/kbn-doc-links:build_types", "//packages/kbn-docs-utils:build_types", + "//packages/elastic-analytics:build_types", "//packages/kbn-es-archiver:build_types", "//packages/kbn-es-query:build_types", "//packages/kbn-field-types:build_types", diff --git a/packages/elastic-analytics/BUILD.bazel b/packages/elastic-analytics/BUILD.bazel new file mode 100644 index 00000000000000..4f452cb35f96fa --- /dev/null +++ b/packages/elastic-analytics/BUILD.bazel @@ -0,0 +1,117 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "elastic-analytics" +PKG_REQUIRE_NAME = "@elastic/analytics" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + ], + exclude = [ + "**/*.test.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +# In this array place runtime dependencies, including other packages and NPM packages +# which must be available for this code to run. +# +# To reference other packages use: +# "//repo/relative/path/to/package" +# eg. "//packages/kbn-utils" +# +# To reference a NPM package use: +# "@npm//name-of-package" +# eg. "@npm//lodash" +RUNTIME_DEPS = [ + "@npm//rxjs", +] + +# In this array place dependencies necessary to build the types, which will include the +# :npm_module_types target of other packages and packages from NPM, including @types/* +# packages. +# +# To reference the types for another package use: +# "//repo/relative/path/to/package:npm_module_types" +# eg. "//packages/kbn-utils:npm_module_types" +# +# References to NPM packages work the same as RUNTIME_DEPS +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "@npm//rxjs", + "//packages/kbn-logging:npm_module_types", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/elastic-analytics/README.md b/packages/elastic-analytics/README.md new file mode 100644 index 00000000000000..45ed22e0992332 --- /dev/null +++ b/packages/elastic-analytics/README.md @@ -0,0 +1,330 @@ +# @elastic/analytics + +This module implements the Analytics client used for Event-Based Telemetry. The intention of the client is to be usable on both: the UI and the Server sides. + +## How to use it + +It all starts by creating the client with the `createAnalytics` API: + +```typescript +import { createAnalytics } from '@elastic/analytics'; + +const analytics = createAnalytics({ + // Set to `true` when running in developer mode. + // It enables development helpers like schema validation and extra debugging features. + isDev: false, + // Set to `staging` if you don't want your events to be sent to the production cluster. Useful for CI & QA environments. + sendTo: 'production', + // The application's instrumented logger + logger, +}); +``` + +### Reporting events + +Reporting events is as simple as calling the `reportEvent` API every time your application needs to track an event: + +```typescript +analytics.reportEvent('my_unique_event_name', myEventProperties); +``` + +But first, it requires a setup phase where the application must declare the event and the structure of the `eventProperties`: + +```typescript +analytics.registerEventType({ + eventType: 'my_unique_event_name', + schema: { + my_keyword: { + type: 'keyword', + _meta: { + description: 'Represents the key property...' + } + }, + my_number: { + type: 'long', + _meta: { + description: 'Indicates the number of times...', + optional: true + } + }, + my_complex_unknown_meta_object: { + type: 'pass_through', + _meta: { + description: 'Unknown object that contains the key-values...' + } + }, + my_array_of_str: { + type: 'array', + items: { + type: 'text', + _meta: { + description: 'List of tags...' + } + } + }, + my_object: { + properties: { + my_timestamp: { + type: 'date', + _meta: { + description: 'timestamp when the user...' + } + } + } + }, + my_array_of_objects: { + type: 'array', + items: { + properties: { + my_bool_prop: { + type: 'boolean', + _meta: { + description: '`true` when...' + } + } + } + } + } + } +}); +``` + +For more information about how to declare the schemas, refer to the section [Schema definition](#schema-definition). + +### Enriching events + +Context is important! For that reason, the client internally appends the timestamp in which the event was generated and any additional context provided by the Context Providers. To register a context provider use the `registerContextProvider` API: + +```typescript +analytics.registerContextProvider({ + // RxJS Observable that emits every time the context changes. For example: a License changes from `basic` to `trial`. + context$, + // Similar to the `reportEvent` API, schema defining the structure of the expected output of the context$ observable. + schema, +}) +``` + +### Setting the user's opt-in consent + +The client cannot send any data until the user provides consent. At the beginning, the client will internally enqueue any incoming events until the consent is either granted or refused. + +To set the user's selection use the `optIn` API: + +```typescript +analytics.optIn({ + global: { + enabled: true, // The user granted consent + shippers: { + shipperA: false, // Shipper A is explicitly disabled for all events + } + }, + event_types: { + my_unique_event_name: { + enabled: true, // The consent is explictly granted to send this type of event (only if global === true) + shippers: { + shipperB: false, // Shipper B is not allowed to report this event. + } + }, + my_other_event_name: { + enabled: false, // The consent is not granted to send this type of event. + } + } +}) +``` + +### Shipping events + +In order to report the event to an analytics tool, we need to register the shippers our application wants to use. To register a shipper use the API `registerShipper`: + +```typescript +analytics.registerShipper(ShipperClass, shipperOptions); +``` + +There are some prebuilt shippers in this package that can be enabled using the API above. Additionally, each application can register their own custom shippers. + +#### Prebuilt shippers + +TODO when actually implemented + +#### Custom shippers + +To use your own shipper, you just need to implement and register it!: + +```typescript +import type { + AnalyticsClientInitContext, + Event, + EventContext, + IShipper, + TelemetryCounter +} from '@elastic/analytics'; + +class MyVeryOwnShipper implements IShipper { + constructor(myOptions: MyOptions, initContext: AnalyticsClientInitContext) { + // ... + } + + reportEvents = (events: Event[]): void => { + // Send the events to the analytics platform + } + optIn = (isOptedIn: boolean): void => { + // Start/stop any sending mechanisms + } + + extendContext = (newContext: EventContext): void => { + // Call any custom APIs to internally set the context + } + + // Emit any success/failed/dropped activity + telemetryCounter$: Observable; +} + +// Register the custom shipper +analytics.registerShipper(MyVeryOwnShipper, myOptions); +``` + +### Schema definition + +Schemas are a framework that allows us to document the structure of the events that our application will report. It is useful to understand the meaning of the events that we report. And, at the same time, it serves as an extra validation step from the developer's point of view. + +The syntax of a schema is a _simplified ES mapping on steroids_: it removes some of the ES mapping complexity, and at the same time, it includes features that are specific to the telemetry collection. + +**DISCLAIMER:** **The schema is not a direct mapping to ES indices.** The final structure of how the event is stored will depend on many factors like the context providers, shippers and final analytics solution. + +#### Schema Specification: First order data types (`string`, `number`, `boolean`) + +When declaring first-order values like `string` or `number`, the basic schema must contain both: `type` and `_meta`. + +The `type` value depends on the type of the content to report in that field. Refer to the table below for the values allowed in the schema `type`: + +| Typescript `type` | Schema `type` | +|:-----------------:|:-----------------------:| +| `boolean` | `boolean` | +| `string` | `keyword` | +| `string` | `text` | +| `string` | `date` (for ISO format) | +| `number` | `date` (for ms format) | +| `number` | `byte` | +| `number` | `short` | +| `number` | `integer` | +| `number` | `long` | +| `number` | `double` | +| `number` | `float` | + +```typescript +const stringSchema: SchemaValue = { + type: 'text', + _meta: { + description: 'Description of the feature that was broken', + optional: false, + }, +} +``` + +For the `_meta`, refer to [Schema Specification: `_meta`](#schema-specification-_meta). + +#### Schema Specification: Objects + +Declaring the schema of an object contains 2 main attributes: `properties` and an optional `_meta`: + +The `properties` attribute is an object with all the keys that the original object may include: + +```typescript +interface MyObject { + an_id: string; + a_description: string; + a_number?: number; + a_boolean: boolean; +} + +const objectSchema: SchemaObject = { + properties: { + an_id: { + type: 'keyword', + _meta: { + description: 'The ID of the element that generated the event', + optional: false, + }, + }, + a_description: { + type: 'text', + _meta: { + description: 'The human readable description of the element that generated the event', + optional: false, + }, + }, + a_number: { + type: 'long', + _meta: { + description: 'The number of times the element is used', + optional: true, + }, + }, + a_boolean: { + type: 'boolean', + _meta: { + description: 'Is the element still active', + optional: false, + }, + }, + }, + _meta: { + description: 'MyObject represents the events generated by elements in the UI when ...', + optional: false, + } +} +``` + +For the optional `_meta`, refer to [Schema Specification: `_meta`](#schema-specification-_meta). + +#### Schema Specification: Arrays + +Declaring the schema of an array contains 2 main attributes: `items` and an optional `_meta`: + +The `items` attribute is an object declaring the schema of the elements inside the array. At the moment, we only support arrays of one type, so `Array` are not allowed. + +```typescript +type MyArray = string[]; + +const arraySchema: SchemaArray = { + items: { + type: 'keyword', + _meta: { + description: 'Tag attached to the element...', + optional: false, + }, + }, + _meta: { + description: 'List of tags attached to the element...', + optional: false, + } +} +``` + +For the optional `_meta`, refer to [Schema Specification: `_meta`](#schema-specification-_meta). + +#### Schema Specification: Special type `pass_through` + +In case a property in the schema is just used to pass through some unknown content that is declared and validated somewhere else, or that it can dynamically grow and shrink, you may use the `type: 'pass_through'` option. It behaves like a [first-order data type](#schema-specification-first-order-data-types-string-number-boolean): + +```typescript +type MyUnknownType = unknown; + +const passThroughSchema: SchemaValue = { + type: 'pass_through', + _meta: { + description: 'Payload context recevied from the HTTP request...', + optional: false, + }, +} +``` + +For the optional `_meta`, refer to [Schema Specification: `_meta`](#schema-specification-_meta). + +#### Schema Specification: `_meta` + +The `_meta` adds the invaluable information of a `description` and whether a field is `optional` in the payload. + +It can be attached to any schema definition as seen in the examples above. For high-order types, like arrays or objects, the `_meta` field is optional. For first-order types, like numbers, strings, booleans or `pass_through`, the `_meta` key is mandatory. + +The `optional` field is optional by default, and there are some TS validations to enforce `optional: true` when the matching field is declared as optional in the types. However, it's highly encouraged to be explicit about declaring it even when the field is not optional. diff --git a/packages/elastic-analytics/jest.config.js b/packages/elastic-analytics/jest.config.js new file mode 100644 index 00000000000000..cc7f3da0561cd3 --- /dev/null +++ b/packages/elastic-analytics/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../..', + roots: ['/packages/elastic-analytics'], +}; diff --git a/packages/elastic-analytics/package.json b/packages/elastic-analytics/package.json new file mode 100644 index 00000000000000..bd688a0ab74d53 --- /dev/null +++ b/packages/elastic-analytics/package.json @@ -0,0 +1,7 @@ +{ + "name": "@elastic/analytics", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/packages/elastic-analytics/src/analytics_client/analytics_client.test.ts b/packages/elastic-analytics/src/analytics_client/analytics_client.test.ts new file mode 100644 index 00000000000000..ed10613a699ac1 --- /dev/null +++ b/packages/elastic-analytics/src/analytics_client/analytics_client.test.ts @@ -0,0 +1,1170 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { Observable } from 'rxjs'; +import { Subject } from 'rxjs'; +import type { MockedLogger } from '@kbn/logging-mocks'; +import { loggerMock } from '@kbn/logging-mocks'; +import { AnalyticsClient } from './analytics_client'; +import { take, toArray } from 'rxjs/operators'; +import { shippersMock } from '../shippers/mocks'; +import type { EventContext, TelemetryCounter } from '../events'; + +describe('AnalyticsClient', () => { + let analyticsClient: AnalyticsClient; + let logger: MockedLogger; + + beforeEach(() => { + logger = loggerMock.create(); + analyticsClient = new AnalyticsClient({ + logger, + isDev: true, + sendTo: 'staging', + }); + }); + + describe('registerEventType', () => { + test('successfully registers a event type', () => { + analyticsClient.registerEventType({ + eventType: 'testEvent', + schema: { + a_field: { + type: 'keyword', + _meta: { + description: 'description of a_field', + }, + }, + }, + }); + }); + + test('cannot register the same event type twice', () => { + analyticsClient.registerEventType({ + eventType: 'testEvent', + schema: { + a_field: { + type: 'keyword', + _meta: { + description: 'description of a_field', + }, + }, + }, + }); + + expect(() => + analyticsClient.registerEventType({ + eventType: 'testEvent', + schema: { + b_field: { + type: 'date', + _meta: { + description: 'description of a_field', + }, + }, + }, + }) + ).toThrowErrorMatchingInlineSnapshot(`"Event Type \\"testEvent\\" is already registered."`); + }); + + test('it can be used after deconstruction of the client', () => { + const { registerEventType } = analyticsClient; + registerEventType({ + eventType: 'testEvent', + schema: { + a_field: { + type: 'keyword', + _meta: { + description: 'description of a_field', + }, + }, + }, + }); + }); + }); + + describe('reportEvent', () => { + test('fails to report an event type because it is not registered yet', () => { + expect(() => + analyticsClient.reportEvent('testEvent', { a_field: 'a' }) + ).toThrowErrorMatchingInlineSnapshot( + `"Attempted to report event type \\"testEvent\\", before registering it. Use the \\"registerEventType\\" API to register it."` + ); + }); + + test('enqueues multiple events before specifying the optIn consent and registering a shipper', async () => { + analyticsClient.registerEventType({ + eventType: 'testEvent', + schema: { + a_field: { + type: 'keyword', + _meta: { + description: 'description of a_field', + }, + }, + }, + }); + + // eslint-disable-next-line dot-notation + const internalQueuePromise = analyticsClient['internalEventQueue$'] + .pipe(take(3), toArray()) + .toPromise(); + + const telemetryCounterPromise = analyticsClient.telemetryCounter$ + .pipe(take(3), toArray()) + .toPromise(); + + analyticsClient.reportEvent('testEvent', { a_field: 'a' }); + analyticsClient.reportEvent('testEvent', { a_field: 'b' }); + analyticsClient.reportEvent('testEvent', { a_field: 'c' }); + + // Expect 3 enqueued testEvent, but not shipped + const eventCounters = await telemetryCounterPromise; + expect(eventCounters).toHaveLength(3); + eventCounters.forEach((eventCounter) => { + expect(eventCounter).toEqual({ + type: 'enqueued', + source: 'client', + event_type: 'testEvent', + code: 'enqueued', + count: 1, + }); + }); + + // The events went to the internal queue because there are no optIn nor shippers specified yet + const enqueuedEvents = await internalQueuePromise; + expect(enqueuedEvents).toEqual([ + { + context: {}, + event_type: 'testEvent', + properties: { a_field: 'a' }, + timestamp: expect.any(String), + }, + { + context: {}, + event_type: 'testEvent', + properties: { a_field: 'b' }, + timestamp: expect.any(String), + }, + { + context: {}, + event_type: 'testEvent', + properties: { a_field: 'c' }, + timestamp: expect.any(String), + }, + ]); + }); + + test('it can be used after deconstruction of the client', () => { + const { registerEventType, reportEvent } = analyticsClient; + registerEventType({ + eventType: 'testEvent', + schema: { + a_field: { + type: 'keyword', + _meta: { + description: 'description of a_field', + }, + }, + }, + }); + reportEvent('testEvent', { a_field: 'a' }); + }); + + test('Handles errors coming from the shipper.reportEvents API', () => { + const { optIn, registerEventType, registerShipper, reportEvent } = analyticsClient; + const reportEventsMock = jest.fn().mockImplementation(() => { + throw new Error('Something went terribly wrong'); + }); + class MockedShipper extends shippersMock.MockedShipper { + reportEvents = reportEventsMock; + } + optIn({ global: { enabled: true } }); + registerShipper(MockedShipper, {}); + registerEventType({ eventType: 'testEvent', schema: {} }); + reportEvent('testEvent', {}); + expect(reportEventsMock).toHaveBeenCalledWith([ + { + timestamp: expect.any(String), + event_type: 'testEvent', + properties: {}, + context: {}, + }, + ]); + expect(logger.warn).toHaveBeenCalledWith( + `Failed to report event "testEvent" via shipper "${MockedShipper.shipperName}"`, + expect.any(Error) + ); + }); + }); + + describe('registerShipper', () => { + test('Registers a global shipper', () => { + // eslint-disable-next-line dot-notation + expect(analyticsClient['shippersRegistry'].allShippers.size).toBe(0); + analyticsClient.registerShipper(shippersMock.MockedShipper, {}); + + // eslint-disable-next-line dot-notation + expect(analyticsClient['shippersRegistry'].allShippers.size).toBe(1); + + expect( + // eslint-disable-next-line dot-notation + analyticsClient['shippersRegistry'].allShippers.get(shippersMock.MockedShipper.shipperName) + ).toBeTruthy(); + }); + + test('Fails to register the same global shipper twice', () => { + analyticsClient.registerShipper(shippersMock.MockedShipper, {}); + expect(() => + analyticsClient.registerShipper(shippersMock.MockedShipper, {}) + ).toThrowErrorMatchingInlineSnapshot(`"Shipper \\"mocked-shipper\\" is already registered"`); + }); + + test('Registers an event exclusive shipper', () => { + analyticsClient.registerShipper( + shippersMock.MockedShipper, + {}, + { exclusiveEventTypes: ['eventA', 'eventB'] } + ); + + // eslint-disable-next-line dot-notation + expect(analyticsClient['shippersRegistry'].allShippers.size).toBe(1); + + // eslint-disable-next-line dot-notation + expect(analyticsClient['shippersRegistry'].getShippersForEventType('eventA').size).toBe(1); + // eslint-disable-next-line dot-notation + expect(analyticsClient['shippersRegistry'].getShippersForEventType('eventB').size).toBe(1); + // eslint-disable-next-line dot-notation + expect(analyticsClient['shippersRegistry'].getShippersForEventType('eventC').size).toBe(0); + }); + + test('Forwards the telemetryCounter$ events from the shipper, overwriting the `source` property', async () => { + class MockedShipper extends shippersMock.MockedShipper { + constructor({ telemetryCounter$ }: { telemetryCounter$: Subject }) { + super(); + this.telemetryCounter$ = telemetryCounter$; + } + } + + const mockTelemetryCounter$ = new Subject(); + + // Typescript also helps with the config type inference <3 + analyticsClient.registerShipper(MockedShipper, { telemetryCounter$: mockTelemetryCounter$ }); + + const counterEventPromise = analyticsClient.telemetryCounter$.pipe(take(1)).toPromise(); + + const counter: TelemetryCounter = { + type: 'succeed', + source: 'a random value', + event_type: 'eventTypeA', + code: '200', + count: 1000, + }; + + mockTelemetryCounter$.next(counter); + + await expect(counterEventPromise).resolves.toEqual({ + ...counter, + source: MockedShipper.shipperName, + }); + }); + + class MockedShipper extends shippersMock.MockedShipper { + constructor({ + optInMock, + extendContextMock, + }: { + optInMock?: jest.Mock; + extendContextMock?: jest.Mock; + }) { + super(); + if (optInMock) this.optIn = optInMock; + if (extendContextMock) this.extendContext = extendContextMock; + } + } + + test('Registers a shipper and sets the opt-in status if the opt-in status was previously set', () => { + // Call the optIn method before registering the shipper + analyticsClient.optIn({ global: { enabled: true } }); + + const optIn = jest.fn(); + analyticsClient.registerShipper(MockedShipper, { optInMock: optIn }); + expect(optIn).toHaveBeenCalledWith(true); + }); + + test('Registers a shipper and spreads the opt-in status changes', () => { + const optIn = jest.fn(); + analyticsClient.registerShipper(MockedShipper, { optInMock: optIn }); + expect(optIn).not.toHaveBeenCalled(); + + // Call the optIn method after registering the shipper + analyticsClient.optIn({ global: { enabled: true } }); + expect(optIn).toHaveBeenCalledWith(true); + }); + + test('Spreads the context updates to the shipper', () => { + const extendContextMock = jest.fn(); + analyticsClient.registerShipper(MockedShipper, { extendContextMock }); + expect(extendContextMock).toHaveBeenCalledWith({}); // The initial context + + const context$ = new Subject<{ a_field: boolean }>(); + analyticsClient.registerContextProvider({ + schema: { + a_field: { + type: 'boolean', + _meta: { + description: 'a_field description', + }, + }, + }, + context$, + }); + + context$.next({ a_field: true }); + expect(extendContextMock).toHaveBeenCalledWith({ a_field: true }); // After update + }); + + test('Handles errors in the shipper', () => { + const extendContextMock = jest.fn().mockImplementation(() => { + throw new Error('Something went terribly wrong'); + }); + analyticsClient.registerShipper(MockedShipper, { extendContextMock }); + expect(extendContextMock).toHaveBeenCalledWith({}); // The initial context + expect(logger.warn).toHaveBeenCalledWith( + `Shipper "${MockedShipper.shipperName}" failed to extend the context`, + expect.any(Error) + ); + }); + }); + + describe('registerContextProvider', () => { + let globalContext$: Observable>; + + beforeEach(() => { + // eslint-disable-next-line dot-notation + globalContext$ = analyticsClient['context$']; + }); + + test('Registers a context provider', async () => { + const context$ = new Subject<{ a_field: boolean }>(); + analyticsClient.registerContextProvider({ + schema: { + a_field: { + type: 'boolean', + _meta: { + description: 'a_field description', + }, + }, + }, + context$, + }); + + const globalContextPromise = globalContext$.pipe(take(2), toArray()).toPromise(); + context$.next({ a_field: true }); + await expect(globalContextPromise).resolves.toEqual([ + {}, // Original empty state + { a_field: true }, + ]); + }); + + test('Merges all the contexts together', async () => { + const contextA$ = new Subject<{ a_field: boolean }>(); + analyticsClient.registerContextProvider({ + schema: { + a_field: { + type: 'boolean', + _meta: { + description: 'a_field description', + }, + }, + }, + context$: contextA$, + }); + + const contextB$ = new Subject<{ a_field?: boolean; b_field: number }>(); + analyticsClient.registerContextProvider({ + schema: { + a_field: { + type: 'boolean', + _meta: { + description: 'a_field description', + optional: true, + }, + }, + b_field: { + type: 'long', + _meta: { + description: 'b_field description', + }, + }, + }, + context$: contextB$, + }); + + const globalContextPromise = globalContext$.pipe(take(6), toArray()).toPromise(); + contextA$.next({ a_field: true }); + contextB$.next({ b_field: 1 }); + contextB$.next({ a_field: false, b_field: 1 }); + contextA$.next({ a_field: true }); + contextB$.next({ b_field: 2 }); + await expect(globalContextPromise).resolves.toEqual([ + {}, // Original empty state + { a_field: true }, + { a_field: true, b_field: 1 }, // Merged A & B + { a_field: false, b_field: 1 }, // a_field updated from B + { a_field: false, b_field: 1 }, // a_field still from B because it was registered later. + // We may want to change this last behaviour in the future but, for now, it's fine. + { a_field: true, b_field: 2 }, // a_field is now taken from A because B is not providing it yet. + ]); + }); + + test('The global context is not polluted by context providers removing reported fields', async () => { + const context$ = new Subject<{ a_field?: boolean; b_field: number }>(); + analyticsClient.registerContextProvider({ + schema: { + a_field: { + type: 'boolean', + _meta: { + description: 'a_field description', + optional: true, + }, + }, + b_field: { + type: 'long', + _meta: { + description: 'b_field description', + }, + }, + }, + context$, + }); + + const globalContextPromise = globalContext$.pipe(take(6), toArray()).toPromise(); + context$.next({ b_field: 1 }); + context$.next({ a_field: false, b_field: 1 }); + context$.next({ a_field: true, b_field: 1 }); + context$.next({ b_field: 1 }); + context$.next({ a_field: true, b_field: 2 }); + await expect(globalContextPromise).resolves.toEqual([ + {}, // Original empty state + { b_field: 1 }, + { a_field: false, b_field: 1 }, + { a_field: true, b_field: 1 }, + { b_field: 1 }, // a_field is removed because the context provider removed it. + { a_field: true, b_field: 2 }, + ]); + }); + + test('Removes the context provider after it completes', async () => { + const context$ = new Subject<{ a_field: boolean }>(); + + // eslint-disable-next-line dot-notation + const contextProvidersRegistry = analyticsClient['contextProvidersRegistry']; + + // The context registry is empty + expect(contextProvidersRegistry.size).toBe(0); + + analyticsClient.registerContextProvider({ + schema: { + a_field: { + type: 'boolean', + _meta: { + description: 'a_field description', + }, + }, + }, + context$, + }); + + // The size of the registry grows + expect(contextProvidersRegistry.size).toBe(1); + + const globalContextPromise = globalContext$.pipe(take(3), toArray()).toPromise(); + context$.next({ a_field: true }); + // Still in the registry + expect(contextProvidersRegistry.size).toBe(1); + context$.complete(); + // The context provider is removed from the registry + expect(contextProvidersRegistry.size).toBe(0); + await expect(globalContextPromise).resolves.toEqual([ + {}, // Original empty state + { a_field: true }, + {}, + ]); + }); + }); + + describe('optIn', () => { + let optInMock1: jest.Mock; + let optInMock2: jest.Mock; + + beforeEach(() => { + optInMock1 = jest.fn(); + + class MockedShipper1 extends shippersMock.MockedShipper { + static shipperName = 'mocked-shipper-1'; + optIn = optInMock1; + } + optInMock2 = jest.fn(); + class MockedShipper2 extends shippersMock.MockedShipper { + static shipperName = 'mocked-shipper-2'; + optIn = optInMock2; + } + + analyticsClient.registerShipper(MockedShipper1, {}); + analyticsClient.registerShipper(MockedShipper2, {}); + }); + + test('Updates global optIn config', () => { + // eslint-disable-next-line dot-notation + expect(analyticsClient['optInConfig$'].value).toBeUndefined(); + + analyticsClient.optIn({ global: { enabled: true } }); + // eslint-disable-next-line dot-notation + expect(analyticsClient['optInConfig$'].value).toEqual({ global: { enabled: true } }); + }); + + test('Updates each shipper optIn config for global opt-in: true', () => { + analyticsClient.optIn({ global: { enabled: true } }); + expect(optInMock1).toHaveBeenCalledWith(true); + expect(optInMock2).toHaveBeenCalledWith(true); + }); + + test('Updates each shipper optIn config for global opt-in: false', () => { + analyticsClient.optIn({ global: { enabled: false } }); + expect(optInMock1).toHaveBeenCalledWith(false); + expect(optInMock2).toHaveBeenCalledWith(false); + }); + + test('Updates each shipper optIn config for global opt-in: true && shipper-specific: true', () => { + analyticsClient.optIn({ + global: { enabled: true, shippers: { ['mocked-shipper-1']: true } }, + }); + expect(optInMock1).toHaveBeenCalledWith(true); // Using global and shipper-specific + expect(optInMock2).toHaveBeenCalledWith(true); // Using only global + }); + + test('Updates each shipper optIn config for global opt-in: true && shipper-specific: false', () => { + analyticsClient.optIn({ + global: { enabled: true, shippers: { ['mocked-shipper-1']: false } }, + }); + expect(optInMock1).toHaveBeenCalledWith(false); // Using global and shipper-specific + expect(optInMock2).toHaveBeenCalledWith(true); // Using only global + }); + + test('Updates each shipper optIn config for global opt-in: false && shipper-specific: true', () => { + analyticsClient.optIn({ + global: { enabled: false, shippers: { ['mocked-shipper-1']: true } }, + }); + expect(optInMock1).toHaveBeenCalledWith(false); // Using global and shipper-specific + expect(optInMock2).toHaveBeenCalledWith(false); // Using only global + }); + + test('Updates each shipper optIn config for global opt-in: false && shipper-specific: false', () => { + analyticsClient.optIn({ + global: { enabled: false, shippers: { ['mocked-shipper-1']: false } }, + }); + expect(optInMock1).toHaveBeenCalledWith(false); // Using global and shipper-specific + expect(optInMock2).toHaveBeenCalledWith(false); // Using only global + }); + test('Catches error in the shipper.optIn method', () => { + optInMock1.mockImplementation(() => { + throw new Error('Something went terribly wrong'); + }); + analyticsClient.optIn({ global: { enabled: true } }); + expect(optInMock1).toHaveBeenCalledWith(true); // Using global and shipper-specific + expect(optInMock2).toHaveBeenCalledWith(true); // Using only global + expect(logger.warn).toHaveBeenCalledWith( + 'Failed to set isOptedIn:true in shipper mocked-shipper-1', + expect.any(Error) + ); + }); + }); + + describe('E2E', () => { + class MockedShipper1 extends shippersMock.MockedShipper { + static shipperName = 'mocked-shipper-1'; + constructor({ reportEventsMock }: { reportEventsMock: jest.Mock }) { + super(); + this.reportEvents = reportEventsMock; + } + } + + class MockedShipper2 extends MockedShipper1 { + static shipperName = 'mocked-shipper-2'; + } + + beforeEach(() => { + analyticsClient.registerEventType({ + eventType: 'event-type-a', + schema: { + a_field: { + type: 'keyword', + _meta: { + description: 'description of a_field', + }, + }, + }, + }); + analyticsClient.registerEventType({ + eventType: 'event-type-b', + schema: { + b_field: { + type: 'long', + _meta: { + description: 'description of b_field', + }, + }, + }, + }); + }); + + test('Enqueues early events', async () => { + // eslint-disable-next-line dot-notation + const internalEventQueue$ = analyticsClient['internalEventQueue$']; + + const internalQueuePromise = internalEventQueue$.pipe(take(2), toArray()).toPromise(); + + const telemetryCounterPromise = analyticsClient.telemetryCounter$ + .pipe(take(2), toArray()) + .toPromise(); + + analyticsClient.reportEvent('event-type-a', { a_field: 'a' }); + analyticsClient.reportEvent('event-type-b', { b_field: 100 }); + + // Expect 2 enqueued testEvent, but not shipped + await expect(telemetryCounterPromise).resolves.toEqual([ + { + type: 'enqueued', + source: 'client', + event_type: 'event-type-a', + code: 'enqueued', + count: 1, + }, + { + type: 'enqueued', + source: 'client', + event_type: 'event-type-b', + code: 'enqueued', + count: 1, + }, + ]); + + // The events went to the internal queue because there are no optIn nor shippers specified yet + await expect(internalQueuePromise).resolves.toEqual([ + { + context: {}, + event_type: 'event-type-a', + properties: { a_field: 'a' }, + timestamp: expect.any(String), + }, + { + context: {}, + event_type: 'event-type-b', + properties: { b_field: 100 }, + timestamp: expect.any(String), + }, + ]); + }); + + test('Sends events from the internal queue when there are shippers and an opt-in response is true', async () => { + const telemetryCounterPromise = analyticsClient.telemetryCounter$ + .pipe(take(3 + 2), toArray()) // Waiting for 3 enqueued + 2 batch-shipped events + .toPromise(); + + // Send multiple events of 1 type to test the grouping logic as well + analyticsClient.reportEvent('event-type-a', { a_field: 'a' }); + analyticsClient.reportEvent('event-type-b', { b_field: 100 }); + analyticsClient.reportEvent('event-type-a', { a_field: 'b' }); + + // As proven in the previous test, the events are still enqueued. + // Let's register a shipper and opt-in to test the dequeue logic. + const reportEventsMock = jest.fn(); + analyticsClient.registerShipper(MockedShipper1, { reportEventsMock }); + analyticsClient.optIn({ global: { enabled: true } }); + + expect(reportEventsMock).toHaveBeenCalledTimes(2); + expect(reportEventsMock).toHaveBeenNthCalledWith(1, [ + { + context: {}, + event_type: 'event-type-a', + properties: { a_field: 'a' }, + timestamp: expect.any(String), + }, + { + context: {}, + event_type: 'event-type-a', + properties: { a_field: 'b' }, + timestamp: expect.any(String), + }, + ]); + expect(reportEventsMock).toHaveBeenNthCalledWith(2, [ + { + context: {}, + event_type: 'event-type-b', + properties: { b_field: 100 }, + timestamp: expect.any(String), + }, + ]); + + // Expect 3 enqueued events, and 2 sent_to_shipper batched requests + await expect(telemetryCounterPromise).resolves.toEqual([ + { + type: 'enqueued', + source: 'client', + event_type: 'event-type-a', + code: 'enqueued', + count: 1, + }, + { + type: 'enqueued', + source: 'client', + event_type: 'event-type-b', + code: 'enqueued', + count: 1, + }, + { + type: 'enqueued', + source: 'client', + event_type: 'event-type-a', + code: 'enqueued', + count: 1, + }, + { + type: 'sent_to_shipper', + source: 'client', + event_type: 'event-type-a', + code: 'OK', + count: 2, + }, + { + type: 'sent_to_shipper', + source: 'client', + event_type: 'event-type-b', + code: 'OK', + count: 1, + }, + ]); + }); + + test('Discards events from the internal queue when there are shippers and an opt-in response is false', async () => { + const telemetryCounterPromise = analyticsClient.telemetryCounter$ + .pipe(take(3), toArray()) // Waiting for 3 enqueued + .toPromise(); + + // Send multiple events of 1 type to test the grouping logic as well + analyticsClient.reportEvent('event-type-a', { a_field: 'a' }); + analyticsClient.reportEvent('event-type-b', { b_field: 100 }); + analyticsClient.reportEvent('event-type-a', { a_field: 'b' }); + + const reportEventsMock = jest.fn(); + analyticsClient.registerShipper(MockedShipper1, { reportEventsMock }); + analyticsClient.optIn({ global: { enabled: false } }); + + expect(reportEventsMock).toHaveBeenCalledTimes(0); + + // Expect 2 enqueued, but not shipped + await expect(telemetryCounterPromise).resolves.toEqual([ + { + type: 'enqueued', + source: 'client', + event_type: 'event-type-a', + code: 'enqueued', + count: 1, + }, + { + type: 'enqueued', + source: 'client', + event_type: 'event-type-b', + code: 'enqueued', + count: 1, + }, + { + type: 'enqueued', + source: 'client', + event_type: 'event-type-a', + code: 'enqueued', + count: 1, + }, + ]); + }); + + test('Discards only one type of the enqueued events based on event_type config', async () => { + const telemetryCounterPromise = analyticsClient.telemetryCounter$ + .pipe(take(3 + 1), toArray()) // Waiting for 3 enqueued + 1 batch-shipped events + .toPromise(); + + // Send multiple events of 1 type to test the grouping logic as well + analyticsClient.reportEvent('event-type-a', { a_field: 'a' }); + analyticsClient.reportEvent('event-type-b', { b_field: 100 }); + analyticsClient.reportEvent('event-type-a', { a_field: 'b' }); + + const reportEventsMock = jest.fn(); + analyticsClient.registerShipper(MockedShipper1, { reportEventsMock }); + analyticsClient.optIn({ + global: { enabled: true }, + event_types: { ['event-type-a']: { enabled: false } }, + }); + + expect(reportEventsMock).toHaveBeenCalledTimes(1); + expect(reportEventsMock).toHaveBeenNthCalledWith(1, [ + { + context: {}, + event_type: 'event-type-b', + properties: { b_field: 100 }, + timestamp: expect.any(String), + }, + ]); + + // Expect 3 enqueued events, and 1 sent_to_shipper batched request + await expect(telemetryCounterPromise).resolves.toEqual([ + { + type: 'enqueued', + source: 'client', + event_type: 'event-type-a', + code: 'enqueued', + count: 1, + }, + { + type: 'enqueued', + source: 'client', + event_type: 'event-type-b', + code: 'enqueued', + count: 1, + }, + { + type: 'enqueued', + source: 'client', + event_type: 'event-type-a', + code: 'enqueued', + count: 1, + }, + { + type: 'sent_to_shipper', + source: 'client', + event_type: 'event-type-b', + code: 'OK', + count: 1, + }, + ]); + }); + + test('Discards the event at the shipper level (for a specific event)', async () => { + const telemetryCounterPromise = analyticsClient.telemetryCounter$ + .pipe(take(3 + 2), toArray()) // Waiting for 3 enqueued + 2 batch-shipped events + .toPromise(); + + // Send multiple events of 1 type to test the grouping logic as well + analyticsClient.reportEvent('event-type-a', { a_field: 'a' }); + analyticsClient.reportEvent('event-type-b', { b_field: 100 }); + analyticsClient.reportEvent('event-type-a', { a_field: 'b' }); + + // Register 2 shippers and set 1 of them as disabled for event-type-a + const reportEventsMock1 = jest.fn(); + const reportEventsMock2 = jest.fn(); + analyticsClient.registerShipper(MockedShipper1, { reportEventsMock: reportEventsMock1 }); + analyticsClient.registerShipper(MockedShipper2, { reportEventsMock: reportEventsMock2 }); + analyticsClient.optIn({ + global: { enabled: true }, + event_types: { + ['event-type-a']: { enabled: true, shippers: { [MockedShipper2.shipperName]: false } }, + }, + }); + + expect(reportEventsMock1).toHaveBeenCalledTimes(2); + expect(reportEventsMock1).toHaveBeenNthCalledWith(1, [ + { + context: {}, + event_type: 'event-type-a', + properties: { a_field: 'a' }, + timestamp: expect.any(String), + }, + { + context: {}, + event_type: 'event-type-a', + properties: { a_field: 'b' }, + timestamp: expect.any(String), + }, + ]); + expect(reportEventsMock1).toHaveBeenNthCalledWith(2, [ + { + context: {}, + event_type: 'event-type-b', + properties: { b_field: 100 }, + timestamp: expect.any(String), + }, + ]); + expect(reportEventsMock2).toHaveBeenCalledTimes(1); + expect(reportEventsMock2).toHaveBeenNthCalledWith(1, [ + { + context: {}, + event_type: 'event-type-b', + properties: { b_field: 100 }, + timestamp: expect.any(String), + }, + ]); + + // Expect 3 enqueued events, and 2 sent_to_shipper batched requests + await expect(telemetryCounterPromise).resolves.toEqual([ + { + type: 'enqueued', + source: 'client', + event_type: 'event-type-a', + code: 'enqueued', + count: 1, + }, + { + type: 'enqueued', + source: 'client', + event_type: 'event-type-b', + code: 'enqueued', + count: 1, + }, + { + type: 'enqueued', + source: 'client', + event_type: 'event-type-a', + code: 'enqueued', + count: 1, + }, + { + type: 'sent_to_shipper', + source: 'client', + event_type: 'event-type-a', + code: 'OK', + count: 2, + }, + { + type: 'sent_to_shipper', + source: 'client', + event_type: 'event-type-b', + code: 'OK', + count: 1, + }, + ]); + }); + + test('Discards all the events at the shipper level (globally disabled)', async () => { + const telemetryCounterPromise = analyticsClient.telemetryCounter$ + .pipe(take(3 + 2), toArray()) // Waiting for 3 enqueued + 2 batch-shipped events + .toPromise(); + + // Send multiple events of 1 type to test the grouping logic as well + analyticsClient.reportEvent('event-type-a', { a_field: 'a' }); + analyticsClient.reportEvent('event-type-b', { b_field: 100 }); + analyticsClient.reportEvent('event-type-a', { a_field: 'b' }); + + // Register 2 shippers and set 1 of them as globally disabled + const reportEventsMock1 = jest.fn(); + const reportEventsMock2 = jest.fn(); + analyticsClient.registerShipper(MockedShipper1, { reportEventsMock: reportEventsMock1 }); + analyticsClient.registerShipper(MockedShipper2, { reportEventsMock: reportEventsMock2 }); + analyticsClient.optIn({ + global: { enabled: true, shippers: { [MockedShipper2.shipperName]: false } }, + event_types: { + ['event-type-a']: { enabled: true }, + }, + }); + + expect(reportEventsMock1).toHaveBeenCalledTimes(2); + expect(reportEventsMock1).toHaveBeenNthCalledWith(1, [ + { + context: {}, + event_type: 'event-type-a', + properties: { a_field: 'a' }, + timestamp: expect.any(String), + }, + { + context: {}, + event_type: 'event-type-a', + properties: { a_field: 'b' }, + timestamp: expect.any(String), + }, + ]); + expect(reportEventsMock1).toHaveBeenNthCalledWith(2, [ + { + context: {}, + event_type: 'event-type-b', + properties: { b_field: 100 }, + timestamp: expect.any(String), + }, + ]); + expect(reportEventsMock2).toHaveBeenCalledTimes(0); + + // Expect 3 enqueued events, and 2 sent_to_shipper batched requests + await expect(telemetryCounterPromise).resolves.toEqual([ + { + type: 'enqueued', + source: 'client', + event_type: 'event-type-a', + code: 'enqueued', + count: 1, + }, + { + type: 'enqueued', + source: 'client', + event_type: 'event-type-b', + code: 'enqueued', + count: 1, + }, + { + type: 'enqueued', + source: 'client', + event_type: 'event-type-a', + code: 'enqueued', + count: 1, + }, + { + type: 'sent_to_shipper', + source: 'client', + event_type: 'event-type-a', + code: 'OK', + count: 2, + }, + { + type: 'sent_to_shipper', + source: 'client', + event_type: 'event-type-b', + code: 'OK', + count: 1, + }, + ]); + }); + + test('Discards incoming events when opt-in response is false', async () => { + // Set OptIn and shipper first to test the "once-set up" scenario + const reportEventsMock = jest.fn(); + analyticsClient.registerShipper(MockedShipper1, { reportEventsMock }); + analyticsClient.optIn({ global: { enabled: false } }); + + const telemetryCounterPromise = analyticsClient.telemetryCounter$ + .pipe(take(3), toArray()) // Waiting for 3 enqueued + .toPromise(); + + // Send multiple events of 1 type to test the non-grouping logic at this stage as well + analyticsClient.reportEvent('event-type-a', { a_field: 'a' }); + analyticsClient.reportEvent('event-type-b', { b_field: 100 }); + analyticsClient.reportEvent('event-type-a', { a_field: 'b' }); + + expect(reportEventsMock).toHaveBeenCalledTimes(0); + + // Expect 2 enqueued, but not shipped + await expect(telemetryCounterPromise).resolves.toEqual([ + { + type: 'enqueued', + source: 'client', + event_type: 'event-type-a', + code: 'enqueued', + count: 1, + }, + { + type: 'enqueued', + source: 'client', + event_type: 'event-type-b', + code: 'enqueued', + count: 1, + }, + { + type: 'enqueued', + source: 'client', + event_type: 'event-type-a', + code: 'enqueued', + count: 1, + }, + ]); + }); + + test('Forwards incoming events to the shippers when opt-in response is true', async () => { + // Set OptIn and shipper first to test the "once-set up" scenario + const reportEventsMock = jest.fn(); + analyticsClient.registerShipper(MockedShipper1, { reportEventsMock }); + analyticsClient.optIn({ global: { enabled: true } }); + + const telemetryCounterPromise = analyticsClient.telemetryCounter$ + .pipe(take(3 * 2), toArray()) // Waiting for 2 events per each reportEvent call: enqueued and sent_to_shipper + .toPromise(); + + // Send multiple events of 1 type to test the non-grouping logic at this stage as well + analyticsClient.reportEvent('event-type-a', { a_field: 'a' }); + analyticsClient.reportEvent('event-type-b', { b_field: 100 }); + analyticsClient.reportEvent('event-type-a', { a_field: 'b' }); + + // This time the reportEvent API is called once per event (no grouping/batching applied at this stage) + expect(reportEventsMock).toHaveBeenCalledTimes(3); + expect(reportEventsMock).toHaveBeenNthCalledWith(1, [ + { + context: {}, + event_type: 'event-type-a', + properties: { a_field: 'a' }, + timestamp: expect.any(String), + }, + ]); + expect(reportEventsMock).toHaveBeenNthCalledWith(2, [ + { + context: {}, + event_type: 'event-type-b', + properties: { b_field: 100 }, + timestamp: expect.any(String), + }, + ]); + expect(reportEventsMock).toHaveBeenNthCalledWith(3, [ + { + context: {}, + event_type: 'event-type-a', + properties: { a_field: 'b' }, + timestamp: expect.any(String), + }, + ]); + + // Expect 2 enqueued, but not shipped + await expect(telemetryCounterPromise).resolves.toEqual([ + { + type: 'enqueued', + source: 'client', + event_type: 'event-type-a', + code: 'enqueued', + count: 1, + }, + { + type: 'sent_to_shipper', + source: 'client', + event_type: 'event-type-a', + code: 'OK', + count: 1, + }, + { + type: 'enqueued', + source: 'client', + event_type: 'event-type-b', + code: 'enqueued', + count: 1, + }, + { + type: 'sent_to_shipper', + source: 'client', + event_type: 'event-type-b', + code: 'OK', + count: 1, + }, + { + type: 'enqueued', + source: 'client', + event_type: 'event-type-a', + code: 'enqueued', + count: 1, + }, + { + type: 'sent_to_shipper', + source: 'client', + event_type: 'event-type-a', + code: 'OK', + count: 1, + }, + ]); + }); + }); +}); diff --git a/packages/elastic-analytics/src/analytics_client/analytics_client.ts b/packages/elastic-analytics/src/analytics_client/analytics_client.ts new file mode 100644 index 00000000000000..901cfa6e35e44e --- /dev/null +++ b/packages/elastic-analytics/src/analytics_client/analytics_client.ts @@ -0,0 +1,331 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { Observable, Subscription } from 'rxjs'; +import { BehaviorSubject, Subject, combineLatest, from } from 'rxjs'; +import { + buffer, + bufferCount, + concatMap, + filter, + groupBy, + map, + mergeMap, + share, + shareReplay, + takeUntil, + tap, +} from 'rxjs/operators'; +import type { IShipper } from '../shippers'; +import type { + AnalyticsClientInitContext, + ContextProviderOpts, + EventType, + EventTypeOpts, + IAnalyticsClient, + OptInConfig, + RegisterShipperOpts, + ShipperClassConstructor, +} from './types'; +import type { Event, EventContext, TelemetryCounter } from '../events'; +import type { OptInConfigPerType } from './types'; +import { ShippersRegistry } from './shippers_registry'; + +export class AnalyticsClient implements IAnalyticsClient { + public readonly telemetryCounter$: Observable; + private readonly internalTelemetryCounter$ = new Subject(); + /** + * This queue holds all the events until both conditions occur: + * 1. We know the user's optIn decision. + * 2. We have, at least, one registered shipper. + * @private + */ + private readonly internalEventQueue$ = new Subject(); + private readonly shippersRegistry = new ShippersRegistry(); + /** + * Observable used to report when a shipper is registered. + * @private + */ + private readonly shipperRegistered$ = new Subject(); + private readonly eventTypeRegistry = new Map>(); + private readonly context$ = new BehaviorSubject>({}); + private readonly contextWithReplay$ = this.context$.pipe(shareReplay(1)); + private readonly contextProvidersRegistry = new Map< + Observable>, + { subscription: Subscription; context: Partial } + >(); + private readonly optInConfig$ = new BehaviorSubject(undefined); + private readonly optInConfigWithReplay$ = this.optInConfig$.pipe( + filter((optInConfig): optInConfig is OptInConfig => typeof optInConfig !== 'undefined'), + shareReplay(1) + ); + + constructor(private readonly initContext: AnalyticsClientInitContext) { + this.telemetryCounter$ = this.internalTelemetryCounter$.pipe(share()); // Using `share` so we can have multiple subscribers + + // Observer that will emit when both events occur: the OptInConfig is set + a shipper has been registered + const configReceivedAndShipperReceivedObserver$ = combineLatest([ + this.optInConfig$.pipe(filter((optInConfig) => typeof optInConfig !== 'undefined')), + this.shipperRegistered$, + ]); + + // Flush the internal queue when we get any optInConfig and, at least, 1 shipper + this.internalEventQueue$ + .pipe( + // Take until will close the observer once we reach the condition below + takeUntil(configReceivedAndShipperReceivedObserver$), + + // Accumulate the events until we can send them + buffer(configReceivedAndShipperReceivedObserver$), + + // Flatten the array of events + concatMap((events) => from(events)), + + // Discard opted-out events + filter((event) => { + const optInConfig = this.optInConfig$.value; + const isGloballyOptedIn = optInConfig?.global.enabled === true; + const eventIsNotOptedOut = + (optInConfig?.event_types && + // Checking it's not `false` because if a shipper is not explicitly specified, we assume opted-in based on the global state + optInConfig.event_types[event.event_type]?.enabled !== false) ?? + true; + return isGloballyOptedIn && eventIsNotOptedOut; + }), + + // Let's group the requests per eventType for easier batching + groupBy((event) => event.event_type), + mergeMap((groupedObservable) => + groupedObservable.pipe( + bufferCount(1000), // Batching up-to 1000 events per event type for backpressure reasons + map((events) => ({ eventType: groupedObservable.key, events })) + ) + ) + ) + .subscribe(({ eventType, events }) => { + const eventTypeOptInConfig = + this.optInConfig$.value?.event_types && this.optInConfig$.value?.event_types[eventType]; + this.sendToShipper(eventType, events, eventTypeOptInConfig); + }); + } + + public reportEvent = >( + eventType: EventType, + eventData: EventTypeData + ) => { + // Fetch the timestamp as soon as we receive the event. + const timestamp = new Date().toISOString(); + + this.internalTelemetryCounter$.next({ + type: 'enqueued', + source: 'client', + event_type: eventType, + code: 'enqueued', + count: 1, + }); + + if (!this.eventTypeRegistry.get(eventType)) { + this.internalTelemetryCounter$.next({ + type: 'dropped', + source: 'client', + event_type: eventType, + code: 'UnregisteredType', + count: 1, + }); + throw new Error( + `Attempted to report event type "${eventType}", before registering it. Use the "registerEventType" API to register it.` + ); + } + + if (this.initContext.isDev) { + // TODO: In the future we may need to validate the eventData based on the eventType's registered schema (only if isDev) + } + + const optInConfig = this.optInConfig$.value; + const eventTypeOptInConfig = optInConfig?.event_types && optInConfig?.event_types[eventType]; + + if (optInConfig?.global.enabled === false || eventTypeOptInConfig?.enabled === false) { + // If opted out, skip early + return; + } + + const event: Event = { + timestamp, + event_type: eventType, + context: this.context$.value, + properties: eventData, + }; + + if (typeof optInConfig === 'undefined') { + // If the opt-in config is not provided yet, we need to enqueue the event to an internal queue + this.internalEventQueue$.next(event); + } else { + this.sendToShipper(eventType, [event], eventTypeOptInConfig); + } + }; + + public registerEventType = (eventTypeOps: EventTypeOpts) => { + if (this.eventTypeRegistry.get(eventTypeOps.eventType)) { + throw new Error(`Event Type "${eventTypeOps.eventType}" is already registered.`); + } + this.eventTypeRegistry.set(eventTypeOps.eventType, eventTypeOps); + }; + + public optIn = (optInConfig: OptInConfig) => { + this.optInConfig$.next(optInConfig); + }; + + public registerContextProvider = (contextProviderOpts: ContextProviderOpts) => { + const subscription = contextProviderOpts.context$ + .pipe( + tap((ctx) => { + if (this.initContext.isDev) { + // TODO: In the future we may need to validate the input of the context based on the schema (only if isDev) + } + }) + ) + .subscribe({ + next: (ctx) => { + this.contextProvidersRegistry.get(contextProviderOpts.context$)!.context = ctx; + + // For every context change, we rebuild the global context. + // It's better to do it here than to rebuild it for every reportEvent. + this.updateGlobalContext(); + }, + complete: () => { + // Delete the context provider from the registry when the observable completes + this.contextProvidersRegistry.delete(contextProviderOpts.context$); + this.updateGlobalContext(); + }, + }); + + // We store each context linked to the context provider so they can increase and reduce + // the number of fields they report without having left-overs in the global context. + this.contextProvidersRegistry.set(contextProviderOpts.context$, { subscription, context: {} }); + }; + + public registerShipper = ( + ShipperClass: ShipperClassConstructor, + shipperConfig: ShipperConfig, + { exclusiveEventTypes = [] }: RegisterShipperOpts = {} + ) => { + const shipperName = ShipperClass.shipperName; + const shipper = new ShipperClass(shipperConfig, { + ...this.initContext, + logger: this.initContext.logger.get('shipper', shipperName), + }); + if (exclusiveEventTypes.length) { + // This feature is not intended to be supported in the MVP. + // I can remove it if we think it causes more bad than good. + exclusiveEventTypes.forEach((eventType) => { + this.shippersRegistry.addEventExclusiveShipper(eventType, shipperName, shipper); + }); + } else { + this.shippersRegistry.addGlobalShipper(shipperName, shipper); + } + + // Subscribe to the shipper's telemetryCounter$ and pass it over to the client's-level observable + shipper.telemetryCounter$?.subscribe((counter) => + this.internalTelemetryCounter$.next({ + ...counter, + source: shipperName, // Enforce the shipper's name in the `source` + }) + ); + + // Spread the optIn configuration updates + this.optInConfigWithReplay$.subscribe((optInConfig) => { + const isShipperExplicitlyOptedIn = + (optInConfig.global.shippers && optInConfig.global.shippers[shipperName]) ?? true; + const isOptedIn = optInConfig.global.enabled && isShipperExplicitlyOptedIn; + try { + shipper.optIn(isOptedIn); + } catch (err) { + this.initContext.logger.warn( + `Failed to set isOptedIn:${isOptedIn} in shipper ${shipperName}`, + err + ); + } + }); + + // Spread the global context if it has custom extendContext method + if (shipper.extendContext) { + this.contextWithReplay$.subscribe((context) => { + try { + shipper.extendContext!(context); + } catch (err) { + this.initContext.logger.warn( + `Shipper "${shipperName}" failed to extend the context`, + err + ); + } + }); + } + + // Notify that a shipper is registered + this.shipperRegistered$.next(); + }; + + /** + * Forwards the `events` to the registered shippers, bearing in mind if the shipper is opted-in for that eventType. + * @param eventType The event type's name + * @param events A bulk array of events matching the eventType. + * @param eventTypeOptInConfig The optIn config for the sepecific eventType. + * @private + */ + private sendToShipper( + eventType: EventType, + events: Event[], + eventTypeOptInConfig?: OptInConfigPerType + ) { + let sentToShipper = false; + this.shippersRegistry.getShippersForEventType(eventType).forEach((shipper, shipperName) => { + const isShipperOptedIn = + ((this.optInConfig$.value?.global.shippers && + this.optInConfig$.value.global.shippers[shipperName]) ?? + true) && + ((eventTypeOptInConfig?.shippers && eventTypeOptInConfig.shippers[shipperName]) ?? true); + + // Only send it to the non-explicitly opted-out shippers + if (isShipperOptedIn) { + sentToShipper = true; + try { + shipper.reportEvents(events); + } catch (err) { + this.initContext.logger.warn( + `Failed to report event "${eventType}" via shipper "${shipperName}"`, + err + ); + } + } + }); + if (sentToShipper) { + this.internalTelemetryCounter$.next({ + type: 'sent_to_shipper', + source: 'client', + event_type: eventType, + code: 'OK', + count: events.length, + }); + } + } + + /** + * Loops through all the context providers and sets the global context + * @private + */ + private updateGlobalContext() { + this.context$.next( + [...this.contextProvidersRegistry.values()].reduce((acc, { context }) => { + return { + ...acc, + ...context, + }; + }, {} as Partial) + ); + } +} diff --git a/packages/elastic-analytics/src/analytics_client/index.ts b/packages/elastic-analytics/src/analytics_client/index.ts new file mode 100644 index 00000000000000..360f7baf528f54 --- /dev/null +++ b/packages/elastic-analytics/src/analytics_client/index.ts @@ -0,0 +1,27 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export type { + IAnalyticsClient, + // Types for the constructor + AnalyticsClientInitContext, + // Types for the registerShipper API + ShipperClassConstructor, + RegisterShipperOpts, + // Types for the optIn API + OptInConfig, + OptInConfigPerType, + ShipperName, + EventType, + // Types for the registerContextProvider API + ContextProviderOpts, + // Types for the registerEventType API + EventTypeOpts, +} from './types'; + +export { AnalyticsClient } from './analytics_client'; diff --git a/packages/elastic-analytics/src/analytics_client/shippers_registry.test.ts b/packages/elastic-analytics/src/analytics_client/shippers_registry.test.ts new file mode 100644 index 00000000000000..55fcac6c9b273a --- /dev/null +++ b/packages/elastic-analytics/src/analytics_client/shippers_registry.test.ts @@ -0,0 +1,123 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { ShippersRegistry } from './shippers_registry'; +import { shippersMock } from '../shippers/mocks'; + +describe('ShippersRegistry', () => { + let shippersRegistry: ShippersRegistry; + + beforeEach(() => { + shippersRegistry = new ShippersRegistry(); + }); + + describe('Global Shippers', () => { + test('adds a shipper without an error', () => { + const shipper = shippersMock.createShipper(); + expect(shippersRegistry.allShippers.size).toBe(0); + shippersRegistry.addGlobalShipper('testShipper', shipper); + expect(shippersRegistry.allShippers.size).toBe(1); + }); + + test('fails to add the same shipper name twice (even when the shipper implementation is different)', () => { + const shipper1 = shippersMock.createShipper(); + const shipper2 = shippersMock.createShipper(); + shippersRegistry.addGlobalShipper('testShipper', shipper1); + expect(() => + shippersRegistry.addGlobalShipper('testShipper', shipper2) + ).toThrowErrorMatchingInlineSnapshot(`"Shipper \\"testShipper\\" is already registered"`); + }); + + test('adds multiple shippers with different names (even when the shipper implementation is the same)', () => { + const shipper = shippersMock.createShipper(); // Explicitly testing with the same shipper implementation + + expect(shippersRegistry.allShippers.size).toBe(0); + shippersRegistry.addGlobalShipper('testShipper1', shipper); + expect(shippersRegistry.allShippers.size).toBe(1); + shippersRegistry.addGlobalShipper('testShipper2', shipper); + expect(shippersRegistry.allShippers.size).toBe(2); + }); + + test('returns a global shipper if there is no event-type specific shipper', () => { + const shipper = shippersMock.createShipper(); + const shipperName = 'testShipper'; + expect(shippersRegistry.allShippers.size).toBe(0); + shippersRegistry.addGlobalShipper(shipperName, shipper); + expect(shippersRegistry.allShippers.size).toBe(1); + + const shippersForEventType = shippersRegistry.getShippersForEventType( + `RandomEvent${Date.now()}` + ); + // eslint-disable-next-line dot-notation + expect(shippersForEventType).toBe(shippersRegistry['shippersRegistry'].global); + expect(shippersForEventType.size).toBe(1); + expect(shippersForEventType.get(shipperName)).toBe(shipper); + }); + }); + + describe('Event-Exclusive Shippers', () => { + test('adds a shipper without an error', () => { + const shipper = shippersMock.createShipper(); + expect(shippersRegistry.allShippers.size).toBe(0); + shippersRegistry.addEventExclusiveShipper('testEvent', 'testShipper', shipper); + expect(shippersRegistry.allShippers.size).toBe(1); + }); + + test('fails to add the same shipper name twice (even when the shipper implementation is different)', () => { + const shipper1 = shippersMock.createShipper(); + const shipper2 = shippersMock.createShipper(); + shippersRegistry.addEventExclusiveShipper('testEvent', 'testShipper', shipper1); + expect(() => + shippersRegistry.addEventExclusiveShipper('testEvent', 'testShipper', shipper2) + ).toThrowErrorMatchingInlineSnapshot( + `"testShipper is already registered for event-type testEvent"` + ); + }); + + test('adds multiple shippers with different names (even when the shipper implementation is the same)', () => { + const shipper = shippersMock.createShipper(); // Explicitly testing with the same shipper implementation + + expect(shippersRegistry.allShippers.size).toBe(0); + shippersRegistry.addEventExclusiveShipper('testEvent', 'testShipper1', shipper); + expect(shippersRegistry.allShippers.size).toBe(1); + shippersRegistry.addEventExclusiveShipper('testEvent', 'testShipper2', shipper); + expect(shippersRegistry.allShippers.size).toBe(2); + }); + + test('adds the same shipper to different event types. The allShippers count does not increase', () => { + const shipper = shippersMock.createShipper(); // Explicitly testing with the same shipper implementation + + expect(shippersRegistry.allShippers.size).toBe(0); + shippersRegistry.addEventExclusiveShipper('testEvent1', 'testShipper', shipper); + expect(shippersRegistry.allShippers.size).toBe(1); + shippersRegistry.addEventExclusiveShipper('testEvent2', 'testShipper', shipper); + expect(shippersRegistry.allShippers.size).toBe(1); // This is still 1 because the shipper is the same + }); + + test('returns an event-specific shipper', () => { + const shipper = shippersMock.createShipper(); + const shipperName = 'testShipper'; + const eventTypeName = 'testEvent'; + expect(shippersRegistry.allShippers.size).toBe(0); + shippersRegistry.addEventExclusiveShipper(eventTypeName, shipperName, shipper); + expect(shippersRegistry.allShippers.size).toBe(1); + + const shippersForEventType = shippersRegistry.getShippersForEventType(eventTypeName); + expect(shippersForEventType.size).toBe(1); + expect(shippersForEventType.get(shipperName)).toBe(shipper); + + // No event-specific shipper found, returns global but no shippers found in global + const shippersForEventTypeNotFound = shippersRegistry.getShippersForEventType( + `RandomEvent${Date.now()}` + ); + // eslint-disable-next-line dot-notation + expect(shippersForEventTypeNotFound).toBe(shippersRegistry['shippersRegistry'].global); + expect(shippersForEventTypeNotFound.size).toBe(0); + }); + }); +}); diff --git a/packages/elastic-analytics/src/analytics_client/shippers_registry.ts b/packages/elastic-analytics/src/analytics_client/shippers_registry.ts new file mode 100644 index 00000000000000..f3468e513acf5c --- /dev/null +++ b/packages/elastic-analytics/src/analytics_client/shippers_registry.ts @@ -0,0 +1,90 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { EventType, ShipperName } from './types'; +import { IShipper } from '../shippers'; + +/** + * Holds the map of the { [shipperName]: shipperInstance } + */ +export type ShippersMap = Map; + +/** + * Registry of shippers at different levels + */ +interface ShippersRegistries { + /** + * Holds all the shippers: global and eventTypeExclusive. + * This helps to avoid looping over all the shippers when we just need them all. + */ + allShippers: ShippersMap; + /** + * Holds the shippers that are not registered as exclusive to any event-type + */ + global: ShippersMap; + /** + * Holds the shippers that are exclusive to an event-type in the format of { [eventType]: ShippersMap } + */ + eventTypeExclusive: Map; +} + +export class ShippersRegistry { + private readonly shippersRegistry: ShippersRegistries = { + allShippers: new Map(), + global: new Map(), + eventTypeExclusive: new Map(), + }; + + /** + * Adds shipper to the registry. + * @param shipperName The unique name of the shipper. + * @param shipper The initialized shipper. + */ + public addGlobalShipper(shipperName: ShipperName, shipper: IShipper) { + if (this.shippersRegistry.global.get(shipperName)) { + throw new Error(`Shipper "${shipperName}" is already registered`); + } + this.shippersRegistry.global.set(shipperName, shipper); + this.shippersRegistry.allShippers.set(shipperName, shipper); + } + + /** + * Adds an event-type exclusive shipper. + * @param eventType The name of the event type + * @param shipperName The unique name for the shipper. + * @param shipper The initialized shipper. + */ + public addEventExclusiveShipper( + eventType: EventType, + shipperName: ShipperName, + shipper: IShipper + ) { + const eventExclusiveMap = this.shippersRegistry.eventTypeExclusive.get(eventType) || new Map(); + if (eventExclusiveMap.get(shipperName)) { + throw new Error(`${shipperName} is already registered for event-type ${eventType}`); + } + eventExclusiveMap.set(shipperName, shipper); + this.shippersRegistry.eventTypeExclusive.set(eventType, eventExclusiveMap); + this.shippersRegistry.allShippers.set(shipperName, shipper); + } + + /** + * Returns all the registered shippers + */ + public get allShippers(): ShippersMap { + return this.shippersRegistry.allShippers; + } + + /** + * Returns the shippers that must be used for the specified event type. + * @param eventType The name of the event type. + */ + public getShippersForEventType(eventType: EventType): ShippersMap { + return this.shippersRegistry.eventTypeExclusive.get(eventType) || this.shippersRegistry.global; + } +} diff --git a/packages/elastic-analytics/src/analytics_client/types.ts b/packages/elastic-analytics/src/analytics_client/types.ts new file mode 100644 index 00000000000000..efc10e7263ce27 --- /dev/null +++ b/packages/elastic-analytics/src/analytics_client/types.ts @@ -0,0 +1,204 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { Observable } from 'rxjs'; + +// If we are going to export this to a separate NPM module in the future, +// we'll need to revisit this import. +import type { Logger } from '@kbn/logging'; + +import type { IShipper } from '../shippers'; +import type { EventContext, TelemetryCounter } from '../events'; +import type { RootSchema } from '../schema'; + +/** + * General settings of the analytics client + */ +export interface AnalyticsClientInitContext { + /** + * Boolean indicating if it's running in developer mode. + */ + isDev: boolean; + /** + * Specify if the shippers should send their data to the production or staging environments. + */ + sendTo: 'production' | 'staging'; + /** + * Application-provided logger. + */ + logger: Logger; +} + +/** + * Constructor of a {@link IShipper} + */ +export interface ShipperClassConstructor { + /** + * The shipper's unique name + */ + shipperName: string; + + /** + * The constructor + * @param config The shipper's custom config + * @param initContext Common context {@link AnalyticsClientInitContext} + */ + new (config: Config, initContext: AnalyticsClientInitContext): Shipper; +} + +/** + * Optional options to register a shipper + */ +export interface RegisterShipperOpts { + /** + * List of event types that will be received only by this shipper. + * @deprecated + * @internal Set as internal and deprecated until we come up with the best design for this. + * Not in the scope of the initial MVP. + */ + exclusiveEventTypes?: string[]; +} + +/** + * Shipper Name used for indexed structures. Only used to improve the readability of the types + */ +export type ShipperName = string; +/** + * Event Type used for indexed structures. Only used to improve the readability of the types + */ +export type EventType = string; + +/** + * Sets whether a type of event is enabled/disabled globally or per shipper. + */ +export interface OptInConfigPerType { + /** + * The event type is globally enabled. + */ + enabled: boolean; + /** + * Controls if an event type should be disabled for a specific type of shipper. + * @example If the event type is automatically tracked by ShipperA, the config would look like: + * ``` + * { + * enabled: true, + * shippers: { + * ShipperA: false + * } + * } + * ``` + */ + shippers?: Record; +} + +/** + * + */ +export interface OptInConfig { + /** + * Controls the global enabled/disabled behaviour of the client and shippers. + */ + global: OptInConfigPerType; + /** + * Controls if an event type should be disabled for a specific type of shipper. + * @example If "clicks" are automatically tracked by ShipperA, the config would look like: + * ``` + * { + * global: { enabled: true }, + * event_types: { + * click: { + * enabled: true, + * shippers: { + * ShipperA: false + * } + * } + * } + * } + * ``` + */ + event_types?: Record; +} + +/** + * Definition of a context provider + */ +export interface ContextProviderOpts> { + /** + * Observable that emits the custom context. + */ + context$: Observable; + /** + * Schema declaring and documenting the expected output in the context$ + * + * @remark During development, it may be used to validate the provided values. + */ + schema: RootSchema; +} + +/** + * Definition of an Event Type. + */ +export interface EventTypeOpts { + /** + * The event type's unique name. + */ + eventType: string; + /** + * Schema declaring and documenting the expected structure of this event type. + * + * @remark During development, it may be used to validate the provided values. + */ + schema: RootSchema; +} + +/** + * Analytics client's public APIs + */ +export interface IAnalyticsClient { + /** + * Reports a telemetry event. + * @param eventType The event type registered via the `registerEventType` API. + * @param eventData The properties matching the schema declared in the `registerEventType` API. + */ + reportEvent: >( + eventType: EventType, + eventData: EventTypeData + ) => void; + /** + * Registers the event type that will be emitted via the reportEvent API. + * @param eventTypeOps + */ + registerEventType: (eventTypeOps: EventTypeOpts) => void; + + /** + * Set up the shipper that will be used to report the telemetry events. + * @param Shipper The {@link IShipper} class to instantiate the shipper. + * @param shipperConfig The config specific to the Shipper to instantiate. + * @param opts Additional options to register the shipper {@link RegisterShipperOpts}. + */ + registerShipper: ( + Shipper: ShipperClassConstructor, + shipperConfig: ShipperConfig, + opts?: RegisterShipperOpts + ) => void; + /** + * Used to control the user's consent to report the data. + * In the advanced mode, it allows to "cherry-pick" which events and shippers are enabled/disabled. + * @param optInConfig {@link OptInConfig} + */ + optIn: (optInConfig: OptInConfig) => void; + /** + * Registers the context provider to enrich the any reported events. + * @param contextProviderOpts {@link ContextProviderOpts} + */ + registerContextProvider: (contextProviderOpts: ContextProviderOpts) => void; + /** + * Observable to emit the stats of the processed events. + */ + readonly telemetryCounter$: Observable; +} diff --git a/packages/elastic-analytics/src/events/index.ts b/packages/elastic-analytics/src/events/index.ts new file mode 100644 index 00000000000000..701e93b952d8a9 --- /dev/null +++ b/packages/elastic-analytics/src/events/index.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export type { Event, EventContext, TelemetryCounter } from './types'; diff --git a/packages/elastic-analytics/src/events/types.ts b/packages/elastic-analytics/src/events/types.ts new file mode 100644 index 00000000000000..97f9ef15b41891 --- /dev/null +++ b/packages/elastic-analytics/src/events/types.ts @@ -0,0 +1,60 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export interface EventContext { + // TODO: Extend with known keys + [key: string]: unknown; +} + +/** + * Shape of the events emitted by the telemetryCounter$ observable + */ +export interface TelemetryCounter { + /** + * Indicates if the event contains data about succeeded, failed or dropped events. + */ + type: 'enqueued' | 'sent_to_shipper' | 'succeed' | 'failed' | 'dropped'; + /** + * Who emitted the event? It can be "client" or the name of the shipper. + */ + source: 'client' | string; + /** + * The event type the success/failure/drop event refers to. + */ + event_type: string; + /** + * Code to provide additional information about the success or failure. Examples are 200/400/504/ValidationError/UnknownError + */ + code: string; + /** + * The number of events that met this event. + */ + count: number; +} + +/** + * Definition of the full event structure + */ +export interface Event { + /** + * The time the event was generated in ISO format. + */ + timestamp: string; + /** + * The event type. + */ + event_type: string; + /** + * The specific properties of the event type. + */ + properties: Record; + /** + * The {@link EventContext} enriched during the processing pipeline. + */ + context: EventContext; +} diff --git a/packages/elastic-analytics/src/index.ts b/packages/elastic-analytics/src/index.ts new file mode 100644 index 00000000000000..c9226b49451872 --- /dev/null +++ b/packages/elastic-analytics/src/index.ts @@ -0,0 +1,48 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { AnalyticsClientInitContext } from './analytics_client'; +import { AnalyticsClient } from './analytics_client'; + +export function createAnalytics(initContext: AnalyticsClientInitContext) { + return new AnalyticsClient(initContext); +} + +export type { + IAnalyticsClient, + // Types for the constructor + AnalyticsClientInitContext, + // Types for the registerShipper API + ShipperClassConstructor, + RegisterShipperOpts, + // Types for the optIn API + OptInConfig, + OptInConfigPerType, + ShipperName, + EventType, + // Types for the registerContextProvider API + ContextProviderOpts, + // Types for the registerEventType API + EventTypeOpts, +} from './analytics_client'; +export type { Event, EventContext, TelemetryCounter } from './events'; +export type { + RootSchema, + SchemaObject, + SchemaArray, + SchemaChildValue, + SchemaMeta, + SchemaValue, + SchemaMetaOptional, + PossibleSchemaTypes, + AllowedSchemaBooleanTypes, + AllowedSchemaNumberTypes, + AllowedSchemaStringTypes, + AllowedSchemaTypes, +} from './schema'; +export type { IShipper } from './shippers'; diff --git a/packages/elastic-analytics/src/schema/index.ts b/packages/elastic-analytics/src/schema/index.ts new file mode 100644 index 00000000000000..e351a785c13ba1 --- /dev/null +++ b/packages/elastic-analytics/src/schema/index.ts @@ -0,0 +1,22 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export type { + RootSchema, + SchemaObject, + SchemaArray, + SchemaChildValue, + SchemaMeta, + SchemaValue, + SchemaMetaOptional, + PossibleSchemaTypes, + AllowedSchemaBooleanTypes, + AllowedSchemaNumberTypes, + AllowedSchemaStringTypes, + AllowedSchemaTypes, +} from './types'; diff --git a/packages/elastic-analytics/src/schema/types.test.ts b/packages/elastic-analytics/src/schema/types.test.ts new file mode 100644 index 00000000000000..3ed25e46d6dc9d --- /dev/null +++ b/packages/elastic-analytics/src/schema/types.test.ts @@ -0,0 +1,548 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { PossibleSchemaTypes, RootSchema, SchemaValue } from './types'; + +describe('schema types', () => { + describe('PossibleSchemaTypes', () => { + test('it should only allow "string" types', () => { + let valueType: PossibleSchemaTypes = 'keyword'; + valueType = 'text'; + valueType = 'date'; + + // @ts-expect-error + valueType = 'boolean'; + // @ts-expect-error + valueType = 'long'; + // @ts-expect-error + valueType = 'integer'; + // @ts-expect-error + valueType = 'short'; + // @ts-expect-error + valueType = 'byte'; + // @ts-expect-error + valueType = 'double'; + // @ts-expect-error + valueType = 'float'; + + expect(valueType).not.toBeUndefined(); // <-- Only to stop the var-not-used complain + }); + test('it should only allow "number" types', () => { + let valueType: PossibleSchemaTypes = 'long'; + valueType = 'integer'; + valueType = 'short'; + valueType = 'byte'; + valueType = 'double'; + valueType = 'float'; + valueType = 'date'; + + // @ts-expect-error + valueType = 'boolean'; + // @ts-expect-error + valueType = 'keyword'; + + expect(valueType).not.toBeUndefined(); // <-- Only to stop the var-not-used complain + }); + test('it should only allow "boolean" types', () => { + let valueType: PossibleSchemaTypes = 'boolean'; + // @ts-expect-error + valueType = 'integer'; + // @ts-expect-error + valueType = 'short'; + // @ts-expect-error + valueType = 'byte'; + // @ts-expect-error + valueType = 'double'; + // @ts-expect-error + valueType = 'float'; + // @ts-expect-error + valueType = 'date'; + + // @ts-expect-error + valueType = 'keyword'; + + expect(valueType).not.toBeUndefined(); // <-- Only to stop the var-not-used complain + }); + }); + + describe('SchemaValue', () => { + describe('Pass Through', () => { + test('it should allow "pass_through" and enforce the _meta.description', () => { + let valueType: SchemaValue = { + type: 'pass_through', + _meta: { + description: 'Some description', + }, + }; + + valueType = { + type: 'pass_through', + _meta: { + description: 'Some description', + optional: false, + }, + }; + + valueType = { + type: 'pass_through', + _meta: { + description: 'Some description', + // @ts-expect-error optional can't be true when the types don't set the value as optional + optional: true, + }, + }; + + // @ts-expect-error because it's missing the _meta.description + valueType = { type: 'pass_through' }; + expect(valueType).not.toBeUndefined(); // <-- Only to stop the var-not-used complain + }); + test('it should enforce `_meta.optional: true`', () => { + let valueType: SchemaValue = { + type: 'pass_through', + _meta: { + description: 'Some description', + optional: true, + }, + }; + + valueType = { + type: 'pass_through', + _meta: { + description: 'Some description', + // @ts-expect-error because optional can't be false when the value can be undefined + optional: false, + }, + }; + expect(valueType).not.toBeUndefined(); // <-- Only to stop the var-not-used complain + }); + }); + + describe('Plain value', () => { + test('it should allow the correct type and enforce the _meta.description', () => { + let valueType: SchemaValue = { + type: 'keyword', + _meta: { + description: 'Some description', + }, + }; + + valueType = { + type: 'keyword', + _meta: { + description: 'Some description', + optional: false, + }, + }; + + valueType = { + // @ts-expect-error because the type does not match + type: 'long', + _meta: { + description: 'Some description', + optional: false, + }, + }; + + valueType = { + type: 'keyword', + _meta: { + description: 'Some description', + // @ts-expect-error optional can't be true when the types don't set the value as optional + optional: true, + }, + }; + + // @ts-expect-error because it's missing the _meta.description + valueType = { type: 'keyword' }; + expect(valueType).not.toBeUndefined(); // <-- Only to stop the var-not-used complain + }); + test('it should enforce `_meta.optional: true`', () => { + let valueType: SchemaValue = { + type: 'keyword', + _meta: { + description: 'Some description', + optional: true, + }, + }; + + valueType = { + type: 'keyword', + _meta: { + description: 'Some description', + // @ts-expect-error because optional can't be false when the value can be undefined + optional: false, + }, + }; + expect(valueType).not.toBeUndefined(); // <-- Only to stop the var-not-used complain + }); + }); + + describe('Object value', () => { + test('it should allow "pass_through" and enforce the _meta.description', () => { + let valueType: SchemaValue<{ a_value: string }> = { + type: 'pass_through', + _meta: { + description: 'Some description', + }, + }; + + // @ts-expect-error because it's missing the _meta.description + valueType = { type: 'pass_through' }; + expect(valueType).not.toBeUndefined(); // <-- Only to stop the var-not-used complain + }); + + test('it should expect the proper object-schema definition, and allows some _meta at the object level as well', () => { + let valueType: SchemaValue<{ a_value: string }> = { + properties: { + a_value: { + type: 'keyword', + _meta: { + description: 'Some description', + }, + }, + }, + }; + + valueType = { + properties: { + a_value: { + type: 'keyword', + _meta: { + description: 'Some description', + optional: false, + }, + }, + }, + _meta: { + description: 'Description at the object level', + }, + }; + + valueType = { + properties: { + a_value: { + type: 'keyword', + _meta: { + description: 'Some description', + optional: false, + }, + }, + // @ts-expect-error b_value does not exist in the object definition + b_value: { + type: 'keyword', + _meta: { + description: 'Some description', + optional: true, + }, + }, + }, + _meta: { + description: 'Description at the object level', + }, + }; + + // @ts-expect-error because it's missing object properties + valueType = { properties: {} }; + expect(valueType).not.toBeUndefined(); // <-- Only to stop the var-not-used complain + }); + + test('it should enforce `_meta.optional: true`', () => { + const objectValueType: SchemaValue<{ a_value: string } | undefined> = { + properties: { + a_value: { + type: 'keyword', + _meta: { + description: 'Some description', + }, + }, + }, + _meta: { + description: 'Optional object', + optional: true, + }, + }; + expect(objectValueType).not.toBeUndefined(); // <-- Only to stop the var-not-used complain + + let valueType: SchemaValue<{ a_value?: string }> = { + properties: { + a_value: { + type: 'keyword', + _meta: { + description: 'Some description', + optional: true, + }, + }, + }, + }; + + valueType = { + properties: { + a_value: { + type: 'keyword', + // @ts-expect-error because it should provide optional: true + _meta: { + description: 'Some description', + }, + }, + }, + }; + expect(valueType).not.toBeUndefined(); // <-- Only to stop the var-not-used complain + }); + }); + + describe('Array value', () => { + test('it should allow "pass_through" and enforce the _meta.description', () => { + let valueType: SchemaValue> = { + type: 'pass_through', + _meta: { + description: 'Some description', + }, + }; + + // @ts-expect-error because it's missing the _meta.description + valueType = { type: 'pass_through' }; + expect(valueType).not.toBeUndefined(); // <-- Only to stop the var-not-used complain + }); + + test('it should expect the proper array-schema definition, and allows some _meta at the object level as well', () => { + let valueType: SchemaValue> = { + type: 'array', + items: { + properties: { + a_value: { + type: 'keyword', + _meta: { + description: 'Some description', + }, + }, + }, + }, + }; + + valueType = { + type: 'array', + items: { + properties: { + a_value: { + type: 'keyword', + _meta: { + description: 'Some description', + optional: false, + }, + }, + }, + _meta: { + description: 'Description at the object level', + }, + }, + }; + + // @ts-expect-error because it's missing the items definition + valueType = { type: 'array' }; + // @ts-expect-error because it's missing the items definition + valueType = { type: 'array', items: {} }; + // @ts-expect-error because it's missing the items' properties definition + valueType = { type: 'array', items: { properties: {} } }; + expect(valueType).not.toBeUndefined(); // <-- Only to stop the var-not-used complain + }); + + test('it should enforce `_meta.optional: true`', () => { + const arrayValueType: SchemaValue | undefined> = { + type: 'array', + items: { + properties: { + a_value: { + type: 'keyword', + _meta: { + description: 'Some description', + }, + }, + }, + }, + _meta: { + description: 'Optional object', + optional: true, + }, + }; + expect(arrayValueType).not.toBeUndefined(); // <-- Only to stop the var-not-used complain + + const objectValueType: SchemaValue> = { + type: 'array', + items: { + properties: { + a_value: { + type: 'keyword', + _meta: { + description: 'Some description', + }, + }, + }, + _meta: { + description: 'Optional object', + optional: true, + }, + }, + }; + expect(objectValueType).not.toBeUndefined(); // <-- Only to stop the var-not-used complain + + let valueType: SchemaValue> = { + type: 'array', + items: { + properties: { + a_value: { + type: 'keyword', + _meta: { + description: 'Some description', + optional: true, + }, + }, + }, + }, + }; + + valueType = { + type: 'array', + items: { + properties: { + a_value: { + type: 'keyword', + // @ts-expect-error because it should provide optional: true + _meta: { + description: 'Some description', + }, + }, + }, + }, + }; + expect(valueType).not.toBeUndefined(); // <-- Only to stop the var-not-used complain + }); + }); + }); + + describe('RootSchema', () => { + const registerSchema = (schema: RootSchema) => schema; + test('it works with the explicit types', () => { + registerSchema<{ + my_keyword: string; + my_number?: number; + my_complex_unknown_meta_object: Record; + my_array_of_str: string[]; + my_object: { my_timestamp: string }; + my_array_of_objects: Array<{ my_bool_prop: boolean }>; + }>({ + my_keyword: { + type: 'keyword', + _meta: { + description: 'Represents the key property...', + }, + }, + my_number: { + type: 'long', + _meta: { + description: 'Indicates the number of times...', + optional: true, + }, + }, + my_complex_unknown_meta_object: { + type: 'pass_through', + _meta: { + description: 'Unknown object that contains the key-values...', + }, + }, + my_array_of_str: { + type: 'array', + items: { + type: 'text', + _meta: { + description: 'List of tags...', + }, + }, + }, + my_object: { + properties: { + my_timestamp: { + type: 'date', + _meta: { + description: 'timestamp when the user...', + }, + }, + }, + }, + my_array_of_objects: { + type: 'array', + items: { + properties: { + my_bool_prop: { + type: 'boolean', + _meta: { + description: '`true` when...', + }, + }, + }, + }, + }, + }); + }); + test('it works with implicit types', () => { + registerSchema({}); + registerSchema({ + my_keyword: { + type: 'keyword', + _meta: { + description: 'Represents the key property...', + }, + }, + my_number: { + type: 'long', + _meta: { + description: 'Indicates the number of times...', + optional: true, + }, + }, + my_complex_unknown_meta_object: { + type: 'pass_through', + _meta: { + description: 'Unknown object that contains the key-values...', + }, + }, + my_array_of_str: { + type: 'array', + items: { + type: 'text', + _meta: { + description: 'List of tags...', + }, + }, + }, + my_object: { + properties: { + my_timestamp: { + type: 'date', + _meta: { + description: 'timestamp when the user...', + }, + }, + }, + }, + my_array_of_objects: { + type: 'array', + items: { + properties: { + my_bool_prop: { + type: 'boolean', + _meta: { + description: '`true` when...', + }, + }, + }, + }, + }, + }); + }); + }); +}); diff --git a/packages/elastic-analytics/src/schema/types.ts b/packages/elastic-analytics/src/schema/types.ts new file mode 100644 index 00000000000000..8bac1ceaad6204 --- /dev/null +++ b/packages/elastic-analytics/src/schema/types.ts @@ -0,0 +1,166 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +/** Types matching number values **/ +export type AllowedSchemaNumberTypes = + | 'long' + | 'integer' + | 'short' + | 'byte' + | 'double' + | 'float' + | 'date'; +/** Types matching string values **/ +export type AllowedSchemaStringTypes = 'keyword' | 'text' | 'date'; +/** Types matching boolean values **/ +export type AllowedSchemaBooleanTypes = 'boolean'; + +/** + * Possible type values in the schema + */ +export type AllowedSchemaTypes = + | AllowedSchemaNumberTypes + | AllowedSchemaStringTypes + | AllowedSchemaBooleanTypes; + +/** + * Helper to ensure the declared types match the schema types + */ +export type PossibleSchemaTypes = Value extends string + ? AllowedSchemaStringTypes + : Value extends number + ? AllowedSchemaNumberTypes + : Value extends boolean + ? AllowedSchemaBooleanTypes + : // allow any schema type from the union if typescript is unable to resolve the exact U type + AllowedSchemaTypes; + +export interface SchemaChildValue { + type: PossibleSchemaTypes>; + _meta: { + description: string; // Intentionally enforcing the descriptions here + } & SchemaMetaOptional; +} + +/** + * Type that defines all the possible values that the Schema accepts. + * These types definitions are helping to identify earlier the possible missing `properties` nesting when + * manually defining the schemas. + */ +export type SchemaValue = + // Always allow the pass_through no matter what the value is + | { + type: 'pass_through'; + _meta: { + description: string; // Intentionally enforcing the descriptions here + } & SchemaMetaOptional; + } + | (unknown extends Value + ? // If the Value is unknown (TS can't infer the type), allow any type of schema + SchemaArray | SchemaObject | SchemaChildValue + : // Otherwise, try to infer the type and enforce the schema + NonNullable extends Array + ? SchemaArray + : NonNullable extends object + ? SchemaObject + : SchemaChildValue); + +/** + * Enforces { optional: true } if the value can be undefined + */ +export type SchemaMetaOptional = unknown extends Value + ? { optional?: boolean } + : undefined extends Value + ? { optional: true } + : { optional?: false }; + +/** + * Schema meta with optional description + */ +export interface SchemaMeta { + _meta?: { + description?: string; + } & SchemaMetaOptional; +} + +/** + * Schema to represent an array + */ +export interface SchemaArray extends SchemaMeta { + type: 'array'; + items: SchemaValue; +} + +/** + * Schema to represent an object + */ +export interface SchemaObject extends SchemaMeta { + properties: { + [Key in keyof Required]: SchemaValue; + }; +} + +/** + * Schema definition to match the structure of the properties provided. + * + * @example + * { + * my_keyword: { + * type: 'keyword', + * _meta: { + * description: 'Represents the key property...' + * } + * }, + * my_number: { + * type: 'long', + * _meta: { + * description: 'Indicates the number of times...', + * optional: true + * } + * }, + * my_complex_unknown_meta_object: { + * type: 'pass_through', + * _meta: { + * description: 'Unknown object that contains the key-values...' + * } + * }, + * my_array_of_str: { + * type: 'array', + * items: { + * type: 'text', + * _meta: { + * description: 'List of tags...' + * } + * } + * }, + * my_object: { + * properties: { + * my_timestamp: { + * type: 'date', + * _meta: { + * description: 'timestamp when the user...' + * } + * } + * } + * }, + * my_array_of_objects: { + * type: 'array', + * items: { + * properties: { + * my_bool_prop: { + * type: 'boolean', + * _meta: { + * description: '`true` when...' + * } + * } + * } + * } + * } + * } + */ +export type RootSchema = SchemaObject['properties']; diff --git a/packages/elastic-analytics/src/shippers/index.ts b/packages/elastic-analytics/src/shippers/index.ts new file mode 100644 index 00000000000000..7a4ab7d85b9f20 --- /dev/null +++ b/packages/elastic-analytics/src/shippers/index.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export type { IShipper } from './types'; diff --git a/packages/elastic-analytics/src/shippers/mocks.ts b/packages/elastic-analytics/src/shippers/mocks.ts new file mode 100644 index 00000000000000..6f80d91675c977 --- /dev/null +++ b/packages/elastic-analytics/src/shippers/mocks.ts @@ -0,0 +1,31 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { Subject } from 'rxjs'; +import type { IShipper } from './types'; +import type { TelemetryCounter } from '../events'; + +function createShipper(): jest.Mocked { + return new MockedShipper(); +} + +class MockedShipper implements IShipper { + public static shipperName = 'mocked-shipper'; + + constructor() {} + + public optIn = jest.fn(); + public reportEvents = jest.fn(); + public extendContext = jest.fn(); + public telemetryCounter$ = new Subject(); +} + +export const shippersMock = { + createShipper, + MockedShipper, +}; diff --git a/packages/elastic-analytics/src/shippers/types.ts b/packages/elastic-analytics/src/shippers/types.ts new file mode 100644 index 00000000000000..945ea08dae58ae --- /dev/null +++ b/packages/elastic-analytics/src/shippers/types.ts @@ -0,0 +1,35 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { Observable } from 'rxjs'; +import { Event, EventContext, TelemetryCounter } from '../events'; + +/** + * Basic structure of a Shipper + */ +export interface IShipper { + /** + * Adapts and ships the event to the persisting/analytics solution. + * @param events batched events {@link Event} + */ + reportEvents: (events: Event[]) => void; + /** + * Stops/restarts the shipping mechanism based on the value of isOptedIn + * @param isOptedIn `true` for resume sending events. `false` to stop. + */ + optIn: (isOptedIn: boolean) => void; + /** + * Perform any necessary calls to the persisting/analytics solution to set the event's context. + * @param newContext + */ + extendContext?: (newContext: EventContext) => void; + /** + * Observable to emit the stats of the processed events. + */ + telemetryCounter$?: Observable; +} diff --git a/packages/elastic-analytics/tsconfig.json b/packages/elastic-analytics/tsconfig.json new file mode 100644 index 00000000000000..139f53ae99db63 --- /dev/null +++ b/packages/elastic-analytics/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "emitDeclarationOnly": true, + "isolatedModules": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/yarn.lock b/yarn.lock index 5163a6e68be50b..36891918ad2aa8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1396,6 +1396,10 @@ dependencies: tslib "^2.0.0" +"@elastic/analytics@link:bazel-bin/packages/elastic-analytics": + version "0.0.0" + uid "" + "@elastic/apm-rum-core@^5.14.1": version "5.14.1" resolved "https://registry.yarnpkg.com/@elastic/apm-rum-core/-/apm-rum-core-5.14.1.tgz#8f65060967c8d68498f2c520e4169ec07eb3b5bb" @@ -5513,6 +5517,10 @@ resolved "https://registry.yarnpkg.com/@types/ejs/-/ejs-3.0.6.tgz#aca442289df623bfa8e47c23961f0357847b83fe" integrity sha512-fj1hi+ZSW0xPLrJJD+YNwIh9GZbyaIepG26E/gXvp8nCa2pYokxUYO1sK9qjGxp2g8ryZYuon7wmjpwE2cyASQ== +"@types/elastic__analytics@link:bazel-bin/packages/elastic-analytics/npm_module_types": + version "0.0.0" + uid "" + "@types/elastic__apm-synthtrace@link:bazel-bin/packages/elastic-apm-synthtrace/npm_module_types": version "0.0.0" uid "" From 867b98315bbc87cc121b4f7aafc73a33954df2a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Wed, 23 Mar 2022 19:07:00 +0100 Subject: [PATCH 02/31] Export mocks from the client --- packages/elastic-analytics/BUILD.bazel | 2 ++ .../src/analytics_client/mocks.ts | 32 +++++++++++++++++++ packages/elastic-analytics/src/mocks.ts | 10 ++++++ 3 files changed, 44 insertions(+) create mode 100644 packages/elastic-analytics/src/analytics_client/mocks.ts create mode 100644 packages/elastic-analytics/src/mocks.ts diff --git a/packages/elastic-analytics/BUILD.bazel b/packages/elastic-analytics/BUILD.bazel index 4f452cb35f96fa..a1cc469b2823b9 100644 --- a/packages/elastic-analytics/BUILD.bazel +++ b/packages/elastic-analytics/BUILD.bazel @@ -37,6 +37,7 @@ NPM_MODULE_EXTRA_FILES = [ # eg. "@npm//lodash" RUNTIME_DEPS = [ "@npm//rxjs", + "//packages/kbn-logging-mocks", ] # In this array place dependencies necessary to build the types, which will include the @@ -53,6 +54,7 @@ TYPES_DEPS = [ "@npm//@types/jest", "@npm//rxjs", "//packages/kbn-logging:npm_module_types", + "//packages/kbn-logging-mocks:npm_module_types", ] jsts_transpiler( diff --git a/packages/elastic-analytics/src/analytics_client/mocks.ts b/packages/elastic-analytics/src/analytics_client/mocks.ts new file mode 100644 index 00000000000000..32981a62cb9f6a --- /dev/null +++ b/packages/elastic-analytics/src/analytics_client/mocks.ts @@ -0,0 +1,32 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { loggerMock } from '@kbn/logging-mocks'; +import type { IAnalyticsClient } from './types'; +import { AnalyticsClient } from './analytics_client'; + +function createMockedAnalyticsClient(): jest.Mocked { + const analyticsClient = new AnalyticsClient({ + isDev: true, + sendTo: 'production', + logger: loggerMock.create(), + }); + + return { + optIn: jest.fn().mockImplementation(analyticsClient.optIn), + reportEvent: jest.fn().mockImplementation(analyticsClient.reportEvent), + registerEventType: jest.fn().mockImplementation(analyticsClient.registerEventType), + registerContextProvider: jest.fn().mockImplementation(analyticsClient.registerContextProvider), + registerShipper: jest.fn().mockImplementation(analyticsClient.registerShipper), + telemetryCounter$: analyticsClient.telemetryCounter$, + }; +} + +export const analyticsClientMock = { + create: createMockedAnalyticsClient, +}; diff --git a/packages/elastic-analytics/src/mocks.ts b/packages/elastic-analytics/src/mocks.ts new file mode 100644 index 00000000000000..84a8f0854773a3 --- /dev/null +++ b/packages/elastic-analytics/src/mocks.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { shippersMock } from './shippers/mocks'; +export { analyticsClientMock } from './analytics_client/mocks'; From 1d6b58aea77e357cd45f42277054d27be7b118c8 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 23 Mar 2022 18:17:26 +0000 Subject: [PATCH 03/31] [CI] Auto-commit changed files from 'node scripts/generate packages_build_manifest' --- packages/BUILD.bazel | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/BUILD.bazel b/packages/BUILD.bazel index 31b138a3e29a3a..6d210b92f69193 100644 --- a/packages/BUILD.bazel +++ b/packages/BUILD.bazel @@ -9,6 +9,7 @@ filegroup( name = "build_pkg_code", srcs = [ + "//packages/elastic-analytics:build", "//packages/elastic-apm-synthtrace:build", "//packages/elastic-datemath:build", "//packages/elastic-eslint-config-kibana:build", @@ -28,7 +29,6 @@ filegroup( "//packages/kbn-dev-utils:build", "//packages/kbn-doc-links:build", "//packages/kbn-docs-utils:build", - "//packages/elastic-analytics:build", "//packages/kbn-es-archiver:build", "//packages/kbn-es-query:build", "//packages/kbn-es:build", @@ -95,6 +95,7 @@ filegroup( filegroup( name = "build_pkg_types", srcs = [ + "//packages/elastic-analytics:build_types", "//packages/elastic-apm-synthtrace:build_types", "//packages/elastic-datemath:build_types", "//packages/elastic-safer-lodash-set:build_types", @@ -111,7 +112,6 @@ filegroup( "//packages/kbn-dev-utils:build_types", "//packages/kbn-doc-links:build_types", "//packages/kbn-docs-utils:build_types", - "//packages/elastic-analytics:build_types", "//packages/kbn-es-archiver:build_types", "//packages/kbn-es-query:build_types", "//packages/kbn-field-types:build_types", From b88de5f94b80958a717a02840adf7e24ab1dcf8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Thu, 24 Mar 2022 10:35:43 +0100 Subject: [PATCH 04/31] Add CODEOWNERS --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1ccad2a3ac36dc..6fab2a39009d57 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -265,6 +265,7 @@ /x-pack/plugins/saved_objects_tagging/ @elastic/kibana-core /x-pack/test/saved_objects_field_count/ @elastic/kibana-core /x-pack/test/saved_object_tagging/ @elastic/kibana-core +/packages/elastic-analytics/ @elastic/kibana-core /packages/kbn-config-schema/ @elastic/kibana-core /packages/kbn-std/ @elastic/kibana-core /packages/kbn-config/ @elastic/kibana-core From f9342effce0d5b6a137a96478240e13dea823947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Thu, 24 Mar 2022 10:44:51 +0100 Subject: [PATCH 05/31] Add eslint-disable for max-classes-per-file limit --- .../src/analytics_client/analytics_client.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/elastic-analytics/src/analytics_client/analytics_client.test.ts b/packages/elastic-analytics/src/analytics_client/analytics_client.test.ts index ed10613a699ac1..543617740834e6 100644 --- a/packages/elastic-analytics/src/analytics_client/analytics_client.test.ts +++ b/packages/elastic-analytics/src/analytics_client/analytics_client.test.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ +// eslint-disable-next-line max-classes-per-file import type { Observable } from 'rxjs'; import { Subject } from 'rxjs'; import type { MockedLogger } from '@kbn/logging-mocks'; From 8fbd699c9010b42a1abc0d079fb2aaa55baac24c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Thu, 24 Mar 2022 13:42:22 +0100 Subject: [PATCH 06/31] Add `server/core.analytics` service --- api_docs/deprecations_by_api.mdx | 207 +- api_docs/deprecations_by_plugin.mdx | 318 ++-- api_docs/deprecations_by_team.mdx | 168 +- api_docs/elastic_analytics.devdocs.json | 1660 +++++++++++++++++ api_docs/elastic_analytics.mdx | 33 + api_docs/plugin_directory.mdx | 70 +- ...gin-core-server.analyticsservicepreboot.md | 13 + ...lugin-core-server.analyticsservicesetup.md | 13 + ...lugin-core-server.analyticsservicestart.md | 13 + ...lugin-core-server.corepreboot.analytics.md | 13 + .../kibana-plugin-core-server.corepreboot.md | 1 + ...-plugin-core-server.coresetup.analytics.md | 13 + .../kibana-plugin-core-server.coresetup.md | 1 + ...-plugin-core-server.corestart.analytics.md | 13 + .../kibana-plugin-core-server.corestart.md | 1 + .../core/server/kibana-plugin-core-server.md | 3 + packages/elastic-analytics/src/index.ts | 17 +- .../analytics/analytics_service.mock.ts | 47 + .../server/analytics/analytics_service.ts | 75 + src/core/server/analytics/index.ts | 25 + src/core/server/index.ts | 25 + src/core/server/internal_types.ts | 8 + src/core/server/mocks.ts | 13 +- src/core/server/plugins/plugin_context.ts | 24 + src/core/server/server.api.md | 45 + src/core/server/server.ts | 11 + 26 files changed, 2486 insertions(+), 344 deletions(-) create mode 100644 api_docs/elastic_analytics.devdocs.json create mode 100644 api_docs/elastic_analytics.mdx create mode 100644 docs/development/core/server/kibana-plugin-core-server.analyticsservicepreboot.md create mode 100644 docs/development/core/server/kibana-plugin-core-server.analyticsservicesetup.md create mode 100644 docs/development/core/server/kibana-plugin-core-server.analyticsservicestart.md create mode 100644 docs/development/core/server/kibana-plugin-core-server.corepreboot.analytics.md create mode 100644 docs/development/core/server/kibana-plugin-core-server.coresetup.analytics.md create mode 100644 docs/development/core/server/kibana-plugin-core-server.corestart.analytics.md create mode 100644 src/core/server/analytics/analytics_service.mock.ts create mode 100644 src/core/server/analytics/analytics_service.ts create mode 100644 src/core/server/analytics/index.ts diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index 4236c0599f5fdc..b5177bfd56b2a0 100644 --- a/api_docs/deprecations_by_api.mdx +++ b/api_docs/deprecations_by_api.mdx @@ -3,7 +3,7 @@ id: kibDevDocsDeprecationsByApi slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-api title: Deprecated API usage by API summary: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2022-03-15 +date: 2022-03-24 tags: ['contributor', 'dev', 'apidocs', 'kibana'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. --- @@ -13,54 +13,43 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Referencing plugin(s) | Remove By | | ---------------|-----------|-----------| -| | dataViews, visTypeTimeseries, maps, data | - | -| | dataViews, lens, maps, graph, stackAlerts, transform, visTypeTimelion, data | - | -| | dataViews, visTypeTimeseries, dataVisualizer, transform, ux, lens, savedObjects, dataViewEditor, visualizations, graph, stackAlerts, uptime, maps, visDefaultEditor, visTypeVega, data | - | -| | dataViews, dataVisualizer, lens, dataViewEditor, maps, visDefaultEditor, visTypeTimeseries, discover, data | - | -| | dataViews, monitoring, stackAlerts, transform | - | -| | dataViews, transform, canvas, discover | - | -| | dataViews, monitoring, stackAlerts, transform, data | - | -| | dataViews, transform, canvas, discover, data | - | -| | dataViews, lens, maps, graph, stackAlerts, transform, visTypeTimelion, data | - | -| | dataViews, visualizations, data | - | -| | dataViews, dataVisualizer, lens, dataViewEditor, maps, visDefaultEditor, visTypeTimeseries, discover, data | - | -| | dataViews, visTypeTimeseries, maps, data | - | -| | dataViews, visualizations, dashboard, lens | - | -| | dataViews, visTypeTimeseries, dataVisualizer, transform, ux, lens, savedObjects, dataViewEditor, visualizations, graph, stackAlerts, uptime, maps, visDefaultEditor, visTypeVega, data | - | +| | dataViews, maps, data | - | +| | dataViews, maps, graph, transform, data | - | +| | dataViews, upgradeAssistant, dashboard, discover, transform, ux, savedObjects, dataViewEditor, graph, uptime, maps, visDefaultEditor, data | - | +| | dataViews, dataViewEditor, maps, visDefaultEditor, data | - | +| | dataViews, monitoring, transform | - | +| | dataViews, transform, canvas | - | +| | dataViews, monitoring, transform, data | - | +| | dataViews, transform, canvas, data | - | +| | dataViews, maps, graph, transform, data | - | +| | dataViews, data | - | +| | dataViews, dataViewEditor, maps, visDefaultEditor, data | - | +| | dataViews, maps, data | - | +| | dataViews | - | +| | dataViews, upgradeAssistant, dashboard, discover, transform, ux, savedObjects, dataViewEditor, graph, uptime, maps, visDefaultEditor, data | - | | | dataViews, maps | - | | | dataViewManagement, dataViews | - | | | visTypeTimeseries, graph, dataViewManagement, dataViews | - | | | dataViews, dataViewManagement | - | -| | dataViews, transform, canvas, discover | - | -| | dataViews, dataVisualizer, lens, dataViewEditor, maps, visDefaultEditor, visTypeTimeseries, discover | - | -| | dataViews, visTypeTimeseries, dataVisualizer, transform, ux, lens, savedObjects, dataViewEditor, visualizations, graph, stackAlerts, uptime, maps, visDefaultEditor, visTypeVega | - | -| | dataViews, visTypeTimeseries, maps | - | +| | dataViews, transform, canvas | - | +| | dataViews, dataViewEditor, maps, visDefaultEditor | - | +| | dataViews, upgradeAssistant, dashboard, discover, transform, ux, savedObjects, dataViewEditor, graph, uptime, maps, visDefaultEditor | - | +| | dataViews, maps | - | | | dataViews, maps | - | | | dataViewManagement, dataViews | - | | | visTypeTimeseries, graph, dataViewManagement, dataViews | - | | | dataViews, dataViewManagement | - | -| | discover, visualizations, lens, maps, fileUpload, dataVisualizer, infra, graph, monitoring, securitySolution, stackAlerts, transform, uptime, inputControlVis, visTypeTimelion, visTypeTimeseries, visTypeVega, savedObjects | - | -| | discover, dashboard, lens, stackAlerts, visTypeTable, visTypeTimeseries, visTypeXy, visTypeVislib, expressionPartitionVis | - | -| | visTypeTimeseries | - | -| | visTypeTimeseries, graph, dataViewManagement | - | -| | data, lens, visTypeTimeseries, infra, maps, visTypeTimelion | - | +| | discover, maps, fileUpload, infra, graph, monitoring, securitySolution, stackAlerts, transform, uptime, inputControlVis, savedObjects | - | | | maps | - | +| | data, infra, maps | - | | | dashboard, maps | - | -| | visualizations, dashboard, maps, graph | - | -| | visualizations, dashboard, lens, maps, ml, securitySolution, security | - | -| | lens, dashboard, maps | - | -| | visualizations, dashboard, lens | - | -| | savedObjectsTaggingOss, visualizations, dashboard, lens | - | -| | embeddable, presentationUtil, discover, dashboard, graph | - | -| | spaces, security, actions, alerting, ml, remoteClusters, graph, indexLifecycleManagement, mapsEms, painlessLab, rollup, searchprofiler, snapshotRestore, transform, upgradeAssistant | - | -| | visTypeVega | - | -| | monitoring, visTypeVega | - | +| | visTypeTimeseries, graph, dataViewManagement | - | +| | discover, dashboard, lens, stackAlerts, visTypeTable, visTypeTimeseries, visTypeXy, visTypeVislib, expressionPartitionVis | - | | | discover | - | | | discover | - | | | data, discover, embeddable | - | | | advancedSettings, discover | - | | | advancedSettings, discover | - | -| | monitoring, kibanaUsageCollection | - | | | canvas, visTypeXy | - | | | canvas | - | | | canvas | - | @@ -71,48 +60,68 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | canvas | - | | | canvas | - | | | canvas, visTypeXy | - | -| | apm, security, securitySolution | - | -| | apm, security, securitySolution | - | | | encryptedSavedObjects, actions, cloud, ml, dataEnhanced, logstash, securitySolution | - | -| | securitySolution | - | -| | dashboard | - | -| | actions, alerting | - | -| | cloud, apm | - | -| | security, licenseManagement, ml, apm, crossClusterReplication, logstash, painlessLab, searchprofiler, watcher | - | +| | visTypeTimeseries | - | | | dataViewManagement | - | | | dataViewManagement | - | -| | actions, ml, enterpriseSearch, savedObjectsTagging | - | | | visTypeGauge | - | | | visTypePie | - | | | visTypePie | - | -| | security, fleet | - | -| | security | - | -| | security, fleet | - | -| | security, fleet | - | -| | security | - | -| | management, fleet, security, kibanaOverview | - | -| | ml | - | | | spaces, savedObjectsManagement | - | | | spaces, savedObjectsManagement | - | -| | mapsEms | - | +| | actions, alerting | - | +| | actions, ml, enterpriseSearch, savedObjectsTagging | - | | | console | - | | | discover, maps, inputControlVis | 8.1 | | | discover, discoverEnhanced, maps | 8.1 | -| | dashboard, discoverEnhanced, urlDrilldown, discover, maps | 8.1 | -| | dashboard, discoverEnhanced, urlDrilldown, discover, maps | 8.1 | +| | discover, dashboard, discoverEnhanced, urlDrilldown, maps | 8.1 | +| | discover, dashboard, discoverEnhanced, urlDrilldown, maps | 8.1 | | | discover, maps, inputControlVis | 8.1 | -| | dashboard, discoverEnhanced, urlDrilldown, discover, maps | 8.1 | -| | apm, graph, stackAlerts | 8.1 | -| | stackAlerts | 8.1 | +| | discover, dashboard, discoverEnhanced, urlDrilldown, maps | 8.1 | +| | apm, graph | 8.1 | | | discoverEnhanced | 8.1 | | | discoverEnhanced | 8.1 | -| | alerting, dataEnhanced | 8.1 | -| | alerting, dataEnhanced | 8.1 | -| | actions, alerting, dataEnhanced | 8.1 | -| | alerting, dataEnhanced | 8.1 | -| | dataViews, stackAlerts | 8.2 | -| | dataViews, stackAlerts, data | 8.2 | -| | dataViews, stackAlerts | 8.2 | +| | dataEnhanced | 8.1 | +| | dataEnhanced | 8.1 | +| | dataEnhanced | 8.1 | +| | dataEnhanced | 8.1 | +| | dataViews | 8.2 | +| | dataViews, data | 8.2 | +| | dataViews | 8.2 | +| | visualizations, dashboard, maps, graph | 8.8.0 | +| | visualizations, dashboard, lens, maps, ml, securitySolution, security | 8.8.0 | +| | lens, dashboard, maps | 8.8.0 | +| | embeddable, presentationUtil, discover, dashboard, graph | 8.8.0 | +| | spaces, security, actions, alerting, ml, remoteClusters, graph, indexLifecycleManagement, mapsEms, painlessLab, rollup, searchprofiler, snapshotRestore, transform, upgradeAssistant | 8.8.0 | +| | savedObjectsTaggingOss, visualizations, dashboard, lens | 8.8.0 | +| | dashboard | 8.8.0 | +| | monitoring, visTypeVega | 8.8.0 | +| | monitoring, kibanaUsageCollection | 8.8.0 | +| | apm, security, securitySolution | 8.8.0 | +| | apm, security, securitySolution | 8.8.0 | +| | securitySolution | 8.8.0 | +| | cloud, apm | 8.8.0 | +| | security, licenseManagement, ml, apm, crossClusterReplication, logstash, painlessLab, searchprofiler, watcher | 8.8.0 | +| | security, fleet | 8.8.0 | +| | security, fleet | 8.8.0 | +| | security, fleet | 8.8.0 | +| | spaces, security, alerting | 8.8.0 | +| | security | 8.8.0 | +| | management, fleet, security, kibanaOverview | 8.8.0 | +| | mapsEms | 8.8.0 | +| | visTypeVega | 8.8.0 | +| | ml | 8.8.0 + +Note to maintainers: when looking at usages, mind that typical use could be inside a `catch` block, +so TS and code-reference navigation might not highlight them. | +| | security | 8.8.0 + +This is relied on by the reporting feature, and should be removed once reporting +migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/issues/19914 | +| | security | 8.8.0 + +This is relied on by the reporting feature, and should be removed once reporting +migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/issues/19914 | ## Unreferenced deprecated APIs @@ -129,63 +138,69 @@ Safe to remove. | | data | | | data | | | data | -| | data | -| | data | -| | data | -| | data | -| | data | -| | data | -| | data | -| | data | -| | data | -| | data | -| | data | -| | data | -| | data | -| | data | -| | data | -| | data | +| | data | +| | data | +| | data | +| | data | +| | data | +| | data | +| | data | | | data | -| | data | -| | data | +| | data | +| | data | +| | data | | | data | | | data | -| | data | -| | data | | | data | -| | data | +| | data | +| | data | +| | data | +| | data | | | data | -| | data | -| | data | +| | data | | | data | -| | data | -| | data | -| | data | -| | data | -| | data | -| | data | -| | data | -| | data | -| | data | -| | data | +| | data | +| | data | +| | data | +| | data | | | data | -| | data | +| | data | +| | data | +| | data | +| | data | +| | data | +| | data | | | data | +| | data | +| | data | +| | data | +| | data | | | data | +| | data | +| | data | +| | data | +| | data | +| | data | +| | data | | | data | | | data | | | data | | | data | +| | dataViews | +| | dataViews | | | expressions | | | expressions | | | expressions | +| | expressions | | | expressions | | | expressions | +| | expressions | | | expressions | | | expressions | | | expressions | | | expressions | | | expressions | +| | expressions | | | licensing | | | licensing | | | licensing | diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index e226f7c46d494b..1445e955b5a030 100644 --- a/api_docs/deprecations_by_plugin.mdx +++ b/api_docs/deprecations_by_plugin.mdx @@ -3,7 +3,7 @@ id: kibDevDocsDeprecationsByPlugin slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-plugin title: Deprecated API usage by plugin summary: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2022-03-15 +date: 2022-03-24 tags: ['contributor', 'dev', 'apidocs', 'kibana'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. --- @@ -13,8 +13,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [find_and_cleanup_tasks.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/cleanup_failed_executions/find_and_cleanup_tasks.ts#:~:text=nodeBuilder), [find_and_cleanup_tasks.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/cleanup_failed_executions/find_and_cleanup_tasks.ts#:~:text=nodeBuilder), [find_and_cleanup_tasks.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/cleanup_failed_executions/find_and_cleanup_tasks.ts#:~:text=nodeBuilder), [find_and_cleanup_tasks.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/cleanup_failed_executions/find_and_cleanup_tasks.ts#:~:text=nodeBuilder), [find_and_cleanup_tasks.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/cleanup_failed_executions/find_and_cleanup_tasks.ts#:~:text=nodeBuilder) | 8.1 | -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/plugin.ts#:~:text=license%24), [license_state.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/lib/license_state.test.ts#:~:text=license%24), [license_state.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/lib/license_state.test.ts#:~:text=license%24) | - | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/plugin.ts#:~:text=license%24), [license_state.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/lib/license_state.test.ts#:~:text=license%24), [license_state.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/lib/license_state.test.ts#:~:text=license%24) | 8.8.0 | | | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/plugin.ts#:~:text=authc) | - | | | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/plugin.ts#:~:text=authz) | - | | | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/plugin.ts#:~:text=index), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/plugin.ts#:~:text=index) | - | @@ -34,11 +33,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode) | 8.1 | -| | [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode) | 8.1 | -| | [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=nodeBuilder), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=nodeBuilder), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=nodeBuilder) | 8.1 | -| | [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode) | 8.1 | -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/plugin.ts#:~:text=license%24), [license_state.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/lib/license_state.test.ts#:~:text=license%24), [license_state.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/lib/license_state.test.ts#:~:text=license%24) | - | +| | [plugin.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/plugin.test.ts#:~:text=getKibanaFeatures) | 8.8.0 | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/plugin.ts#:~:text=license%24), [license_state.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/lib/license_state.test.ts#:~:text=license%24), [license_state.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/lib/license_state.test.ts#:~:text=license%24) | 8.8.0 | | | [task.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/usage/task.ts#:~:text=index) | - | @@ -48,10 +44,10 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/public/components/shared/kuery_bar/index.tsx#:~:text=esKuery), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/public/components/shared/kuery_bar/index.tsx#:~:text=esKuery), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/public/components/shared/kuery_bar/index.tsx#:~:text=esKuery) | 8.1 | -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/public/plugin.ts#:~:text=environment) | - | -| | [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode)+ 2 more | - | -| | [license_context.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/public/context/license/license_context.tsx#:~:text=license%24) | - | -| | [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode)+ 2 more | - | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/public/plugin.ts#:~:text=environment) | 8.8.0 | +| | [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode)+ 2 more | 8.8.0 | +| | [license_context.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/public/context/license/license_context.tsx#:~:text=license%24) | 8.8.0 | +| | [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode)+ 2 more | 8.8.0 | @@ -66,7 +62,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [setup_expressions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/public/setup_expressions.ts#:~:text=getFunction) | - | | | [application.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/public/application.tsx#:~:text=getFunctions), [functions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/server/routes/functions/functions.ts#:~:text=getFunctions), [functions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/server/routes/functions/functions.ts#:~:text=getFunctions), [functions.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/server/routes/functions/functions.test.ts#:~:text=getFunctions) | - | | | [setup_expressions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/public/setup_expressions.ts#:~:text=getTypes), [application.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/public/application.tsx#:~:text=getTypes), [functions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/server/routes/functions/functions.ts#:~:text=getTypes) | - | -| | [state.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/types/state.ts#:~:text=Render), [state.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/types/state.ts#:~:text=Render), [markdown.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/canvas_plugin_src/functions/browser/markdown.ts#:~:text=Render), [markdown.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/canvas_plugin_src/functions/browser/markdown.ts#:~:text=Render), [timefilterControl.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/canvas_plugin_src/functions/common/timefilterControl.ts#:~:text=Render), [timefilterControl.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/canvas_plugin_src/functions/common/timefilterControl.ts#:~:text=Render), [pie.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/public/functions/pie.ts#:~:text=Render), [pie.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/public/functions/pie.ts#:~:text=Render), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/public/functions/plot/index.ts#:~:text=Render), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/public/functions/plot/index.ts#:~:text=Render)+ 2 more | - | +| | [index.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/target/types/public/functions/index.d.ts#:~:text=Render), [index.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/target/types/public/functions/index.d.ts#:~:text=Render), [state.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/types/state.ts#:~:text=Render), [state.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/types/state.ts#:~:text=Render), [state.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/target/types/types/state.d.ts#:~:text=Render), [state.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/target/types/types/state.d.ts#:~:text=Render), [markdown.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/canvas_plugin_src/functions/browser/markdown.ts#:~:text=Render), [markdown.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/canvas_plugin_src/functions/browser/markdown.ts#:~:text=Render), [timefilterControl.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/canvas_plugin_src/functions/common/timefilterControl.ts#:~:text=Render), [timefilterControl.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/canvas_plugin_src/functions/common/timefilterControl.ts#:~:text=Render)+ 8 more | - | | | [embeddable.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/canvas_plugin_src/functions/external/embeddable.ts#:~:text=context), [filters.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/common/functions/filters.ts#:~:text=context), [escount.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/canvas_plugin_src/functions/browser/escount.ts#:~:text=context), [esdocs.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/canvas_plugin_src/functions/browser/esdocs.ts#:~:text=context), [essql.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/canvas_plugin_src/functions/browser/essql.ts#:~:text=context), [neq.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/canvas_plugin_src/functions/common/neq.ts#:~:text=context), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/canvas_plugin_src/functions/server/pointseries/index.ts#:~:text=context), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/canvas_plugin_src/functions/server/demodata/index.ts#:~:text=context) | - | | | [setup_expressions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/public/setup_expressions.ts#:~:text=getFunction) | - | | | [application.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/public/application.tsx#:~:text=getFunctions), [functions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/server/routes/functions/functions.ts#:~:text=getFunctions), [functions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/server/routes/functions/functions.ts#:~:text=getFunctions), [functions.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas/server/routes/functions/functions.test.ts#:~:text=getFunctions) | - | @@ -79,7 +75,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [plugin.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cloud/public/plugin.tsx#:~:text=environment) | - | +| | [plugin.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cloud/public/plugin.tsx#:~:text=environment) | 8.8.0 | | | [chat.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cloud/server/routes/chat.ts#:~:text=authc) | - | @@ -96,7 +92,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cross_cluster_replication/public/plugin.ts#:~:text=license%24) | - | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cross_cluster_replication/public/plugin.ts#:~:text=license%24) | 8.8.0 | @@ -104,19 +100,20 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| +| | [load_saved_dashboard_state.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/target/types/public/application/lib/load_saved_dashboard_state.d.ts#:~:text=IndexPattern), [load_saved_dashboard_state.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/target/types/public/application/lib/load_saved_dashboard_state.d.ts#:~:text=IndexPattern) | - | | | [export_csv_action.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/actions/export_csv_action.tsx#:~:text=fieldFormats) | - | | | [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=Filter), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter)+ 5 more | 8.1 | -| | [load_saved_dashboard_state.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/load_saved_dashboard_state.ts#:~:text=ensureDefaultDataView), [load_saved_dashboard_state.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/load_saved_dashboard_state.ts#:~:text=ensureDefaultDataView) | - | | | [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=Filter), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter)+ 5 more | 8.1 | +| | [load_saved_dashboard_state.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/target/types/public/application/lib/load_saved_dashboard_state.d.ts#:~:text=IndexPattern), [load_saved_dashboard_state.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/target/types/public/application/lib/load_saved_dashboard_state.d.ts#:~:text=IndexPattern) | - | +| | [load_saved_dashboard_state.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/target/types/public/application/lib/load_saved_dashboard_state.d.ts#:~:text=IndexPattern) | - | | | [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=Filter), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter)+ 5 more | 8.1 | -| | [load_saved_dashboard_state.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/load_saved_dashboard_state.ts#:~:text=ensureDefaultDataView) | - | | | [kibana_react.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/services/kibana_react.ts#:~:text=ExitFullScreenButton), [plugin.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/plugin.tsx#:~:text=ExitFullScreenButton), [plugin.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/plugin.tsx#:~:text=ExitFullScreenButton), [plugin.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/plugin.tsx#:~:text=ExitFullScreenButton) | - | -| | [saved_objects.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/services/saved_objects.ts#:~:text=SavedObjectSaveModal), [save_modal.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/top_nav/save_modal.tsx#:~:text=SavedObjectSaveModal), [save_modal.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/top_nav/save_modal.tsx#:~:text=SavedObjectSaveModal) | - | -| | [saved_object_loader.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/services/saved_object_loader.ts#:~:text=SavedObject), [saved_object_loader.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/services/saved_object_loader.ts#:~:text=SavedObject), [saved_object_loader.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/services/saved_object_loader.ts#:~:text=SavedObject), [saved_objects.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/services/saved_objects.ts#:~:text=SavedObject), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=SavedObject), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=SavedObject), [dashboard_tagging.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts#:~:text=SavedObject), [dashboard_tagging.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject)+ 1 more | - | -| | [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=SavedObjectClass) | - | -| | [dashboard_listing.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/listing/dashboard_listing.tsx#:~:text=settings), [dashboard_listing.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/listing/dashboard_listing.tsx#:~:text=settings) | - | -| | [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/types.ts#:~:text=onAppLeave), [dashboard_router.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/dashboard_router.tsx#:~:text=onAppLeave), [plugin.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/plugin.tsx#:~:text=onAppLeave) | - | -| | [migrations_730.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/server/saved_objects/migrations_730.ts#:~:text=warning), [migrations_730.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/server/saved_objects/migrations_730.ts#:~:text=warning) | - | +| | [saved_objects.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/services/saved_objects.ts#:~:text=SavedObjectSaveModal), [save_modal.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/top_nav/save_modal.tsx#:~:text=SavedObjectSaveModal), [save_modal.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/top_nav/save_modal.tsx#:~:text=SavedObjectSaveModal) | 8.8.0 | +| | [saved_object_loader.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/services/saved_object_loader.ts#:~:text=SavedObject), [saved_object_loader.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/services/saved_object_loader.ts#:~:text=SavedObject), [saved_object_loader.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/services/saved_object_loader.ts#:~:text=SavedObject), [saved_objects.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/services/saved_objects.ts#:~:text=SavedObject), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=SavedObject), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=SavedObject), [dashboard_tagging.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts#:~:text=SavedObject), [dashboard_tagging.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject)+ 1 more | 8.8.0 | +| | [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=SavedObjectClass) | 8.8.0 | +| | [dashboard_listing.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/listing/dashboard_listing.tsx#:~:text=settings), [dashboard_listing.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/listing/dashboard_listing.tsx#:~:text=settings) | 8.8.0 | +| | [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/types.ts#:~:text=onAppLeave), [dashboard_router.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/dashboard_router.tsx#:~:text=onAppLeave), [plugin.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/plugin.tsx#:~:text=onAppLeave), [types.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/target/types/public/types.d.ts#:~:text=onAppLeave) | 8.8.0 | +| | [migrations_730.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/server/saved_objects/migrations_730.ts#:~:text=warning), [migrations_730.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/server/saved_objects/migrations_730.ts#:~:text=warning) | 8.8.0 | @@ -125,17 +122,17 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/aggs/param_types/field.ts#:~:text=IndexPatternField), [field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/aggs/param_types/field.ts#:~:text=IndexPatternField), [field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/aggs/param_types/field.ts#:~:text=IndexPatternField), [field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/aggs/param_types/field.ts#:~:text=IndexPatternField), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IndexPatternField), [kibana_context_type.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/expressions/kibana_context_type.ts#:~:text=IndexPatternField), [kibana_context_type.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/expressions/kibana_context_type.ts#:~:text=IndexPatternField), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPatternField), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPatternField), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPatternField)+ 16 more | - | -| | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IndexPatternsContract), [create_search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/create_search_source.ts#:~:text=IndexPatternsContract), [create_search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/create_search_source.ts#:~:text=IndexPatternsContract), [search_source_service.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source_service.ts#:~:text=IndexPatternsContract), [search_source_service.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source_service.ts#:~:text=IndexPatternsContract), [esaggs_fn.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/expressions/esaggs/esaggs_fn.ts#:~:text=IndexPatternsContract), [esaggs_fn.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/expressions/esaggs/esaggs_fn.ts#:~:text=IndexPatternsContract), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/search/types.ts#:~:text=IndexPatternsContract), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/search/types.ts#:~:text=IndexPatternsContract), [create_search_source.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/create_search_source.test.ts#:~:text=IndexPatternsContract)+ 25 more | - | +| | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IndexPatternsContract), [create_search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/create_search_source.ts#:~:text=IndexPatternsContract), [create_search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/create_search_source.ts#:~:text=IndexPatternsContract), [search_source_service.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source_service.ts#:~:text=IndexPatternsContract), [search_source_service.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source_service.ts#:~:text=IndexPatternsContract), [esaggs_fn.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/expressions/esaggs/esaggs_fn.ts#:~:text=IndexPatternsContract), [esaggs_fn.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/expressions/esaggs/esaggs_fn.ts#:~:text=IndexPatternsContract), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/search/types.ts#:~:text=IndexPatternsContract), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/search/types.ts#:~:text=IndexPatternsContract), [create_search_source.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/create_search_source.test.ts#:~:text=IndexPatternsContract)+ 29 more | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IndexPatternsService), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/server/index.ts#:~:text=IndexPatternsService), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/server/index.ts#:~:text=IndexPatternsService), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/server/index.ts#:~:text=IndexPatternsService), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/index.ts#:~:text=IndexPatternsService) | - | -| | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/types.ts#:~:text=IndexPattern), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPattern), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPattern), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPattern), [tabify_docs.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/tabify/tabify_docs.ts#:~:text=IndexPattern), [tabify_docs.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/tabify/tabify_docs.ts#:~:text=IndexPattern)+ 89 more | - | +| | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/types.ts#:~:text=IndexPattern), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPattern), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPattern), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPattern), [tabify_docs.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/tabify/tabify_docs.ts#:~:text=IndexPattern), [tabify_docs.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/tabify/tabify_docs.ts#:~:text=IndexPattern)+ 90 more | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE) | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IFieldType), [date_histogram.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/aggs/buckets/date_histogram.ts#:~:text=IFieldType), [date_histogram.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/aggs/buckets/date_histogram.ts#:~:text=IFieldType), [filter_editor_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/ui/filter_bar/filter_editor/lib/filter_editor_utils.ts#:~:text=IFieldType), [filter_editor_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/ui/filter_bar/filter_editor/lib/filter_editor_utils.ts#:~:text=IFieldType), [filter_editor_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/ui/filter_bar/filter_editor/lib/filter_editor_utils.ts#:~:text=IFieldType), [filter_editor_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/ui/filter_bar/filter_editor/lib/filter_editor_utils.ts#:~:text=IFieldType), [generate_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/query/filter_manager/lib/generate_filters.ts#:~:text=IFieldType), [generate_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/query/filter_manager/lib/generate_filters.ts#:~:text=IFieldType), [generate_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/query/filter_manager/lib/generate_filters.ts#:~:text=IFieldType)+ 43 more | 8.2 | | | [field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/aggs/param_types/field.ts#:~:text=IndexPatternField), [field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/aggs/param_types/field.ts#:~:text=IndexPatternField), [field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/aggs/param_types/field.ts#:~:text=IndexPatternField), [field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/aggs/param_types/field.ts#:~:text=IndexPatternField), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IndexPatternField), [kibana_context_type.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/expressions/kibana_context_type.ts#:~:text=IndexPatternField), [kibana_context_type.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/expressions/kibana_context_type.ts#:~:text=IndexPatternField), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPatternField), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPatternField), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPatternField)+ 16 more | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IIndexPattern), [get_time.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/query/timefilter/get_time.ts#:~:text=IIndexPattern), [get_time.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/query/timefilter/get_time.ts#:~:text=IIndexPattern), [get_time.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/query/timefilter/get_time.ts#:~:text=IIndexPattern), [get_time.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/query/timefilter/get_time.ts#:~:text=IIndexPattern), [normalize_sort_request.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/normalize_sort_request.ts#:~:text=IIndexPattern), [normalize_sort_request.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/normalize_sort_request.ts#:~:text=IIndexPattern), [normalize_sort_request.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/normalize_sort_request.ts#:~:text=IIndexPattern), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IIndexPattern), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IIndexPattern)+ 64 more | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IndexPatternAttributes), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/index.ts#:~:text=IndexPatternAttributes), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/server/index.ts#:~:text=IndexPatternAttributes) | - | -| | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IndexPatternsContract), [create_search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/create_search_source.ts#:~:text=IndexPatternsContract), [create_search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/create_search_source.ts#:~:text=IndexPatternsContract), [search_source_service.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source_service.ts#:~:text=IndexPatternsContract), [search_source_service.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source_service.ts#:~:text=IndexPatternsContract), [esaggs_fn.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/expressions/esaggs/esaggs_fn.ts#:~:text=IndexPatternsContract), [esaggs_fn.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/expressions/esaggs/esaggs_fn.ts#:~:text=IndexPatternsContract), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/search/types.ts#:~:text=IndexPatternsContract), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/search/types.ts#:~:text=IndexPatternsContract), [create_search_source.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/create_search_source.test.ts#:~:text=IndexPatternsContract)+ 25 more | - | +| | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IndexPatternsContract), [create_search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/create_search_source.ts#:~:text=IndexPatternsContract), [create_search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/create_search_source.ts#:~:text=IndexPatternsContract), [search_source_service.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source_service.ts#:~:text=IndexPatternsContract), [search_source_service.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source_service.ts#:~:text=IndexPatternsContract), [esaggs_fn.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/expressions/esaggs/esaggs_fn.ts#:~:text=IndexPatternsContract), [esaggs_fn.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/expressions/esaggs/esaggs_fn.ts#:~:text=IndexPatternsContract), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/search/types.ts#:~:text=IndexPatternsContract), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/search/types.ts#:~:text=IndexPatternsContract), [create_search_source.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/create_search_source.test.ts#:~:text=IndexPatternsContract)+ 29 more | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IndexPatternsService), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/server/index.ts#:~:text=IndexPatternsService), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/server/index.ts#:~:text=IndexPatternsService), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/server/index.ts#:~:text=IndexPatternsService), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/index.ts#:~:text=IndexPatternsService) | - | -| | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/types.ts#:~:text=IndexPattern), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPattern), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPattern), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPattern), [tabify_docs.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/tabify/tabify_docs.ts#:~:text=IndexPattern), [tabify_docs.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/tabify/tabify_docs.ts#:~:text=IndexPattern)+ 89 more | - | +| | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/index.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/types.ts#:~:text=IndexPattern), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPattern), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPattern), [search_source.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/search_source/search_source.ts#:~:text=IndexPattern), [tabify_docs.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/tabify/tabify_docs.ts#:~:text=IndexPattern), [tabify_docs.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/common/search/tabify/tabify_docs.ts#:~:text=IndexPattern)+ 90 more | - | | | [aggs_service.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/server/search/aggs/aggs_service.ts#:~:text=indexPatternsServiceFactory), [esaggs.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/server/search/expressions/esaggs.ts#:~:text=indexPatternsServiceFactory), [search_service.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data/server/search/search_service.ts#:~:text=indexPatternsServiceFactory) | - | | | [data_table.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/utils/table_inspector_view/components/data_table.tsx#:~:text=executeTriggerActions), [data_table.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/data/public/utils/table_inspector_view/components/data_table.tsx#:~:text=executeTriggerActions) | - | @@ -145,10 +142,10 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/types.ts#:~:text=KueryNode), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/types.ts#:~:text=KueryNode), [get_search_session_page.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/get_search_session_page.ts#:~:text=KueryNode), [get_search_session_page.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/get_search_session_page.ts#:~:text=KueryNode), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=KueryNode), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=KueryNode), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=KueryNode), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=KueryNode), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=KueryNode), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=KueryNode) | 8.1 | -| | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/types.ts#:~:text=KueryNode), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/types.ts#:~:text=KueryNode), [get_search_session_page.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/get_search_session_page.ts#:~:text=KueryNode), [get_search_session_page.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/get_search_session_page.ts#:~:text=KueryNode), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=KueryNode), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=KueryNode), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=KueryNode), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=KueryNode), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=KueryNode), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=KueryNode) | 8.1 | +| | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/types.ts#:~:text=KueryNode), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/types.ts#:~:text=KueryNode), [get_search_session_page.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/get_search_session_page.ts#:~:text=KueryNode), [get_search_session_page.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/get_search_session_page.ts#:~:text=KueryNode), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=KueryNode), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=KueryNode), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=KueryNode), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=KueryNode), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=KueryNode), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=KueryNode)+ 2 more | 8.1 | | | [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=nodeBuilder), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=nodeBuilder), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=nodeBuilder), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=nodeBuilder), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=nodeBuilder), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=nodeBuilder), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=nodeBuilder), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=nodeBuilder), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=nodeBuilder), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=nodeBuilder)+ 2 more | 8.1 | -| | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/types.ts#:~:text=KueryNode), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/types.ts#:~:text=KueryNode), [get_search_session_page.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/get_search_session_page.ts#:~:text=KueryNode), [get_search_session_page.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/get_search_session_page.ts#:~:text=KueryNode), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=KueryNode), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=KueryNode), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=KueryNode), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=KueryNode), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=KueryNode), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=KueryNode) | 8.1 | +| | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/types.ts#:~:text=KueryNode), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/types.ts#:~:text=KueryNode), [get_search_session_page.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/get_search_session_page.ts#:~:text=KueryNode), [get_search_session_page.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/get_search_session_page.ts#:~:text=KueryNode), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=KueryNode), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=KueryNode), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=KueryNode), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=KueryNode), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=KueryNode), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=KueryNode)+ 2 more | 8.1 | +| | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/types.ts#:~:text=KueryNode), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/types.ts#:~:text=KueryNode), [get_search_session_page.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/get_search_session_page.ts#:~:text=KueryNode), [get_search_session_page.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/get_search_session_page.ts#:~:text=KueryNode), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=KueryNode), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=KueryNode), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=KueryNode), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=KueryNode), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=KueryNode), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=KueryNode)+ 2 more | 8.1 | | | [session_service.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/session_service.ts#:~:text=authc) | - | @@ -218,42 +215,25 @@ warning: This document is auto-generated and is meant to be viewed inside our ex -## dataVisualizer - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [geo_point_content_with_map.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/geo_point_content_with_map/geo_point_content_with_map.tsx#:~:text=IndexPattern), [geo_point_content_with_map.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/geo_point_content_with_map/geo_point_content_with_map.tsx#:~:text=IndexPattern), [index_based_expanded_row.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/index_based_expanded_row.tsx#:~:text=IndexPattern), [index_based_expanded_row.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/index_based_expanded_row.tsx#:~:text=IndexPattern), [saved_search_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.ts#:~:text=IndexPattern), [saved_search_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.ts#:~:text=IndexPattern), [saved_search_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.ts#:~:text=IndexPattern), [search_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx#:~:text=IndexPattern), [search_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx#:~:text=IndexPattern), [actions_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx#:~:text=IndexPattern)+ 44 more | - | -| | [field_data_row.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/types/field_data_row.ts#:~:text=IndexPatternField), [field_data_row.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/types/field_data_row.ts#:~:text=IndexPatternField), [field_types_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/util/field_types_utils.ts#:~:text=IndexPatternField), [field_types_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/util/field_types_utils.ts#:~:text=IndexPatternField), [index_based_expanded_row.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/index_based_expanded_row.tsx#:~:text=IndexPatternField), [index_based_expanded_row.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/index_based_expanded_row.tsx#:~:text=IndexPatternField), [search_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx#:~:text=IndexPatternField), [search_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx#:~:text=IndexPatternField), [grid_embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/embeddables/grid_embeddable/grid_embeddable.tsx#:~:text=IndexPatternField), [grid_embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/embeddables/grid_embeddable/grid_embeddable.tsx#:~:text=IndexPatternField)+ 20 more | - | -| | [file_data_visualizer.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/file_data_visualizer.tsx#:~:text=indexPatterns), [index_data_visualizer.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx#:~:text=indexPatterns) | - | -| | [field_data_row.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/types/field_data_row.ts#:~:text=IndexPatternField), [field_data_row.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/types/field_data_row.ts#:~:text=IndexPatternField), [field_types_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/util/field_types_utils.ts#:~:text=IndexPatternField), [field_types_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/util/field_types_utils.ts#:~:text=IndexPatternField), [index_based_expanded_row.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/index_based_expanded_row.tsx#:~:text=IndexPatternField), [index_based_expanded_row.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/index_based_expanded_row.tsx#:~:text=IndexPatternField), [search_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx#:~:text=IndexPatternField), [search_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx#:~:text=IndexPatternField), [grid_embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/embeddables/grid_embeddable/grid_embeddable.tsx#:~:text=IndexPatternField), [grid_embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/embeddables/grid_embeddable/grid_embeddable.tsx#:~:text=IndexPatternField)+ 20 more | - | -| | [geo_point_content_with_map.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/geo_point_content_with_map/geo_point_content_with_map.tsx#:~:text=IndexPattern), [geo_point_content_with_map.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/geo_point_content_with_map/geo_point_content_with_map.tsx#:~:text=IndexPattern), [index_based_expanded_row.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/index_based_expanded_row.tsx#:~:text=IndexPattern), [index_based_expanded_row.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/index_based_expanded_row.tsx#:~:text=IndexPattern), [saved_search_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.ts#:~:text=IndexPattern), [saved_search_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.ts#:~:text=IndexPattern), [saved_search_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.ts#:~:text=IndexPattern), [search_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx#:~:text=IndexPattern), [search_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx#:~:text=IndexPattern), [actions_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx#:~:text=IndexPattern)+ 44 more | - | -| | [field_data_row.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/types/field_data_row.ts#:~:text=IndexPatternField), [field_data_row.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/types/field_data_row.ts#:~:text=IndexPatternField), [field_types_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/util/field_types_utils.ts#:~:text=IndexPatternField), [field_types_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/util/field_types_utils.ts#:~:text=IndexPatternField), [index_based_expanded_row.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/index_based_expanded_row.tsx#:~:text=IndexPatternField), [index_based_expanded_row.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/index_based_expanded_row.tsx#:~:text=IndexPatternField), [search_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx#:~:text=IndexPatternField), [search_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx#:~:text=IndexPatternField), [grid_embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/embeddables/grid_embeddable/grid_embeddable.tsx#:~:text=IndexPatternField), [grid_embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/embeddables/grid_embeddable/grid_embeddable.tsx#:~:text=IndexPatternField)+ 5 more | - | -| | [geo_point_content_with_map.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/geo_point_content_with_map/geo_point_content_with_map.tsx#:~:text=IndexPattern), [geo_point_content_with_map.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/geo_point_content_with_map/geo_point_content_with_map.tsx#:~:text=IndexPattern), [index_based_expanded_row.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/index_based_expanded_row.tsx#:~:text=IndexPattern), [index_based_expanded_row.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/index_based_expanded_row.tsx#:~:text=IndexPattern), [saved_search_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.ts#:~:text=IndexPattern), [saved_search_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.ts#:~:text=IndexPattern), [saved_search_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.ts#:~:text=IndexPattern), [search_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx#:~:text=IndexPattern), [search_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx#:~:text=IndexPattern), [actions_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx#:~:text=IndexPattern)+ 17 more | - | - - - ## discover | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [discover_field_visualize_inner.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/sidebar/discover_field_visualize_inner.tsx#:~:text=IndexPatternField), [discover_field_visualize_inner.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/sidebar/discover_field_visualize_inner.tsx#:~:text=IndexPatternField), [fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/sidebar/__stories__/fields.ts#:~:text=IndexPatternField), [fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/sidebar/__stories__/fields.ts#:~:text=IndexPatternField), [discover_field_visualize_inner.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/sidebar/discover_field_visualize_inner.tsx#:~:text=IndexPatternField), [discover_field_visualize_inner.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/sidebar/discover_field_visualize_inner.tsx#:~:text=IndexPatternField), [fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/sidebar/__stories__/fields.ts#:~:text=IndexPatternField), [fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/sidebar/__stories__/fields.ts#:~:text=IndexPatternField) | - | -| | [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/layout/types.ts#:~:text=IndexPatternAttributes), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/layout/types.ts#:~:text=IndexPatternAttributes), [discover_main_app.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/discover_main_app.tsx#:~:text=IndexPatternAttributes), [discover_main_app.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/discover_main_app.tsx#:~:text=IndexPatternAttributes), [discover_main_route.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/discover_main_route.tsx#:~:text=IndexPatternAttributes), [discover_main_route.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/discover_main_route.tsx#:~:text=IndexPatternAttributes), [discover_main_route.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/discover_main_route.tsx#:~:text=IndexPatternAttributes) | - | +| | [use_discover_state.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/target/types/public/application/main/utils/use_discover_state.d.ts#:~:text=IndexPattern), [use_discover_state.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/target/types/public/application/main/utils/use_discover_state.d.ts#:~:text=IndexPattern) | - | | | [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=create), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=create) | - | | | [anchor.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/anchor.ts#:~:text=fetch), [fetch_hits_in_interval.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/utils/fetch_hits_in_interval.ts#:~:text=fetch) | 8.1 | -| | [build_services.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/build_services.ts#:~:text=indexPatterns), [discover_main_route.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/discover_main_route.tsx#:~:text=indexPatterns), [discover_main_route.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/discover_main_route.tsx#:~:text=indexPatterns), [plugin.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/plugin.tsx#:~:text=indexPatterns) | - | +| | [plugin.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/plugin.tsx#:~:text=indexPatterns) | - | | | [histogram.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/chart/histogram.tsx#:~:text=fieldFormats) | - | | | [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=esFilters), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=esFilters) | 8.1 | -| | [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=Filter), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=Filter) | 8.1 | -| | [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/layout/types.ts#:~:text=IndexPatternAttributes), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/layout/types.ts#:~:text=IndexPatternAttributes), [discover_main_app.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/discover_main_app.tsx#:~:text=IndexPatternAttributes), [discover_main_app.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/discover_main_app.tsx#:~:text=IndexPatternAttributes), [discover_main_route.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/discover_main_route.tsx#:~:text=IndexPatternAttributes), [discover_main_route.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/discover_main_route.tsx#:~:text=IndexPatternAttributes), [discover_main_route.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/discover_main_route.tsx#:~:text=IndexPatternAttributes), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/layout/types.ts#:~:text=IndexPatternAttributes), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/layout/types.ts#:~:text=IndexPatternAttributes), [discover_main_app.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/discover_main_app.tsx#:~:text=IndexPatternAttributes)+ 4 more | - | -| | [discover_field_visualize_inner.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/sidebar/discover_field_visualize_inner.tsx#:~:text=IndexPatternField), [discover_field_visualize_inner.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/sidebar/discover_field_visualize_inner.tsx#:~:text=IndexPatternField), [fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/sidebar/__stories__/fields.ts#:~:text=IndexPatternField), [fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/sidebar/__stories__/fields.ts#:~:text=IndexPatternField), [discover_field_visualize_inner.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/sidebar/discover_field_visualize_inner.tsx#:~:text=IndexPatternField), [discover_field_visualize_inner.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/sidebar/discover_field_visualize_inner.tsx#:~:text=IndexPatternField), [fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/sidebar/__stories__/fields.ts#:~:text=IndexPatternField), [fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/sidebar/__stories__/fields.ts#:~:text=IndexPatternField) | - | -| | [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=Filter), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=Filter) | 8.1 | +| | [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=Filter), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter) | 8.1 | +| | [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=Filter), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter) | 8.1 | +| | [use_discover_state.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/target/types/public/application/main/utils/use_discover_state.d.ts#:~:text=IndexPattern), [use_discover_state.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/target/types/public/application/main/utils/use_discover_state.d.ts#:~:text=IndexPattern) | - | | | [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=create), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=create) | - | | | [anchor.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/anchor.ts#:~:text=fetch), [fetch_hits_in_interval.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/utils/fetch_hits_in_interval.ts#:~:text=fetch) | 8.1 | -| | [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/layout/types.ts#:~:text=IndexPatternAttributes), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/layout/types.ts#:~:text=IndexPatternAttributes), [discover_main_app.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/discover_main_app.tsx#:~:text=IndexPatternAttributes), [discover_main_app.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/discover_main_app.tsx#:~:text=IndexPatternAttributes), [discover_main_route.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/discover_main_route.tsx#:~:text=IndexPatternAttributes), [discover_main_route.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/discover_main_route.tsx#:~:text=IndexPatternAttributes), [discover_main_route.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/discover_main_route.tsx#:~:text=IndexPatternAttributes) | - | -| | [discover_field_visualize_inner.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/sidebar/discover_field_visualize_inner.tsx#:~:text=IndexPatternField), [discover_field_visualize_inner.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/sidebar/discover_field_visualize_inner.tsx#:~:text=IndexPatternField), [fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/sidebar/__stories__/fields.ts#:~:text=IndexPatternField), [fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/sidebar/__stories__/fields.ts#:~:text=IndexPatternField) | - | -| | [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=Filter), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=Filter) | 8.1 | -| | [on_save_search.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx#:~:text=SavedObjectSaveModal), [on_save_search.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx#:~:text=SavedObjectSaveModal) | - | -| | [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=executeTriggerActions), [search_embeddable_factory.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/search_embeddable_factory.ts#:~:text=executeTriggerActions), [plugin.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/plugin.tsx#:~:text=executeTriggerActions) | - | +| | [use_discover_state.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/target/types/public/application/main/utils/use_discover_state.d.ts#:~:text=IndexPattern) | - | +| | [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=Filter), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter) | 8.1 | +| | [on_save_search.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx#:~:text=SavedObjectSaveModal), [on_save_search.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx#:~:text=SavedObjectSaveModal) | 8.8.0 | +| | [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=executeTriggerActions), [search_embeddable_factory.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/search_embeddable_factory.ts#:~:text=executeTriggerActions), [plugin.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/plugin.tsx#:~:text=executeTriggerActions), [search_embeddable_factory.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/target/types/public/embeddable/search_embeddable_factory.d.ts#:~:text=executeTriggerActions) | - | | | [ui_settings.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/server/ui_settings.ts#:~:text=metric), [ui_settings.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/server/ui_settings.ts#:~:text=metric), [ui_settings.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/server/ui_settings.ts#:~:text=metric) | - | | | [ui_settings.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/server/ui_settings.ts#:~:text=metric), [ui_settings.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/server/ui_settings.ts#:~:text=metric), [ui_settings.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/server/ui_settings.ts#:~:text=metric) | - | @@ -276,7 +256,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [attribute_service.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx#:~:text=SavedObjectSaveModal), [attribute_service.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx#:~:text=SavedObjectSaveModal) | - | +| | [attribute_service.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx#:~:text=SavedObjectSaveModal), [attribute_service.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx#:~:text=SavedObjectSaveModal) | 8.8.0 | | | [container.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/embeddable/public/tests/container.test.ts#:~:text=executeTriggerActions), [container.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/embeddable/public/tests/container.test.ts#:~:text=executeTriggerActions), [container.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/embeddable/public/tests/container.test.ts#:~:text=executeTriggerActions), [container.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/embeddable/public/tests/container.test.ts#:~:text=executeTriggerActions), [explicit_input.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/embeddable/public/tests/explicit_input.test.ts#:~:text=executeTriggerActions) | - | @@ -301,7 +281,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [get_layers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_layers.test.ts#:~:text=fieldFormats), [get_layers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_layers.test.ts#:~:text=fieldFormats), [get_layers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_layers.test.ts#:~:text=fieldFormats), [get_layers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_layers.test.ts#:~:text=fieldFormats), [get_layers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_layers.test.ts#:~:text=fieldFormats), [get_layers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_layers.test.ts#:~:text=fieldFormats) | - | +| | [get_layers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_layers.test.ts#:~:text=fieldFormats), [get_layers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_layers.test.ts#:~:text=fieldFormats), [get_layers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_layers.test.ts#:~:text=fieldFormats), [get_layers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_layers.test.ts#:~:text=fieldFormats), [get_layers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_layers.test.ts#:~:text=fieldFormats), [get_layers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_layers.test.ts#:~:text=fieldFormats), [get_layers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_layers.test.ts#:~:text=fieldFormats), [get_layers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_layers.test.ts#:~:text=fieldFormats) | - | @@ -317,10 +297,10 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/server/plugin.ts#:~:text=disabled) | - | -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/server/plugin.ts#:~:text=disabled) | - | -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/server/plugin.ts#:~:text=disabled) | - | -| | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/public/applications/integrations/index.tsx#:~:text=appBasePath) | - | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/server/plugin.ts#:~:text=disabled) | 8.8.0 | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/server/plugin.ts#:~:text=disabled) | 8.8.0 | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/server/plugin.ts#:~:text=disabled) | 8.8.0 | +| | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/public/applications/integrations/index.tsx#:~:text=appBasePath), [index.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/target/types/public/applications/integrations/index.d.ts#:~:text=appBasePath) | 8.8.0 | @@ -338,9 +318,9 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [app_state.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/types/app_state.ts#:~:text=IndexPattern), [app_state.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/types/app_state.ts#:~:text=IndexPattern), [deserialize.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/services/persistence/deserialize.ts#:~:text=IndexPattern), [deserialize.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/services/persistence/deserialize.ts#:~:text=IndexPattern), [deserialize.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/services/persistence/deserialize.ts#:~:text=IndexPattern), [deserialize.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/services/persistence/deserialize.ts#:~:text=IndexPattern), [datasource.sagas.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/state_management/datasource.sagas.ts#:~:text=IndexPattern), [datasource.sagas.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/state_management/datasource.sagas.ts#:~:text=IndexPattern), [persistence.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/state_management/persistence.ts#:~:text=IndexPattern), [persistence.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/state_management/persistence.ts#:~:text=IndexPattern)+ 19 more | - | | | [deserialize.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/services/persistence/deserialize.ts#:~:text=getNonScriptedFields), [datasource.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/state_management/datasource.test.ts#:~:text=getNonScriptedFields), [deserialize.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/services/persistence/deserialize.test.ts#:~:text=getNonScriptedFields), [deserialize.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/services/persistence/deserialize.test.ts#:~:text=getNonScriptedFields) | - | | | [deserialize.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/services/persistence/deserialize.ts#:~:text=getNonScriptedFields), [datasource.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/state_management/datasource.test.ts#:~:text=getNonScriptedFields), [deserialize.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/services/persistence/deserialize.test.ts#:~:text=getNonScriptedFields), [deserialize.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/services/persistence/deserialize.test.ts#:~:text=getNonScriptedFields) | - | -| | [save_modal.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/components/save_modal.tsx#:~:text=SavedObjectSaveModal), [save_modal.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/components/save_modal.tsx#:~:text=SavedObjectSaveModal) | - | -| | [listing_route.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/apps/listing_route.tsx#:~:text=settings), [listing_route.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/apps/listing_route.tsx#:~:text=settings) | - | -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/server/plugin.ts#:~:text=license%24) | - | +| | [save_modal.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/components/save_modal.tsx#:~:text=SavedObjectSaveModal), [save_modal.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/components/save_modal.tsx#:~:text=SavedObjectSaveModal) | 8.8.0 | +| | [listing_route.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/apps/listing_route.tsx#:~:text=settings), [listing_route.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/apps/listing_route.tsx#:~:text=settings) | 8.8.0 | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/server/plugin.ts#:~:text=license%24) | 8.8.0 | @@ -348,7 +328,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [license.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_lifecycle_management/server/services/license.ts#:~:text=license%24) | - | +| | [license.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_lifecycle_management/server/services/license.ts#:~:text=license%24) | 8.8.0 | @@ -356,7 +336,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [editor.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/alerting/log_threshold/components/expression_editor/editor.tsx#:~:text=indexPatterns), [log_stream.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/components/log_stream/log_stream.tsx#:~:text=indexPatterns), [log_stream.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/components/log_stream/log_stream.tsx#:~:text=indexPatterns), [logs_overview_fetchers.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/utils/logs_overview_fetchers.ts#:~:text=indexPatterns), [redirect_to_node_logs.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/link_to/redirect_to_node_logs.tsx#:~:text=indexPatterns), [use_kibana_index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/hooks/use_kibana_index_patterns.ts#:~:text=indexPatterns), [page_providers.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/logs/page_providers.tsx#:~:text=indexPatterns), [logs_overview_fetches.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/utils/logs_overview_fetches.test.ts#:~:text=indexPatterns) | - | +| | [redirect_to_node_logs.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/link_to/redirect_to_node_logs.tsx#:~:text=indexPatterns), [editor.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/alerting/log_threshold/components/expression_editor/editor.tsx#:~:text=indexPatterns), [log_stream.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/components/log_stream/log_stream.tsx#:~:text=indexPatterns), [log_stream.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/components/log_stream/log_stream.tsx#:~:text=indexPatterns), [logs_overview_fetchers.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/utils/logs_overview_fetchers.ts#:~:text=indexPatterns), [use_kibana_index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/hooks/use_kibana_index_patterns.ts#:~:text=indexPatterns), [page_providers.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/logs/page_providers.tsx#:~:text=indexPatterns), [logs_overview_fetches.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/utils/logs_overview_fetches.test.ts#:~:text=indexPatterns) | - | | | [kibana_framework_adapter.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/server/lib/adapters/framework/kibana_framework_adapter.ts#:~:text=indexPatternsServiceFactory), [log_entries_search_strategy.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/server/services/log_entries/log_entries_search_strategy.ts#:~:text=indexPatternsServiceFactory), [log_entry_search_strategy.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/server/services/log_entries/log_entry_search_strategy.ts#:~:text=indexPatternsServiceFactory) | - | @@ -375,7 +355,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [application.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/kibana_overview/public/application.tsx#:~:text=appBasePath) | - | +| | [application.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/kibana_overview/public/application.tsx#:~:text=appBasePath) | 8.8.0 | @@ -383,7 +363,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [ops_stats_collector.ts](https://github.com/elastic/kibana/tree/master/src/plugins/kibana_usage_collection/server/collectors/ops_stats/ops_stats_collector.ts#:~:text=process) | - | +| | [ops_stats_collector.ts](https://github.com/elastic/kibana/tree/master/src/plugins/kibana_usage_collection/server/collectors/ops_stats/ops_stats_collector.ts#:~:text=process) | 8.8.0 | @@ -391,22 +371,10 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=IndexPatternsContract), [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=IndexPatternsContract), [utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/utils.ts#:~:text=IndexPatternsContract), [utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/utils.ts#:~:text=IndexPatternsContract), [loader.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/loader.ts#:~:text=IndexPatternsContract), [loader.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/loader.ts#:~:text=IndexPatternsContract), [embeddable_factory.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable_factory.ts#:~:text=IndexPatternsContract), [embeddable_factory.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable_factory.ts#:~:text=IndexPatternsContract), [loader.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/loader.test.ts#:~:text=IndexPatternsContract), [loader.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/loader.test.ts#:~:text=IndexPatternsContract)+ 18 more | - | -| | [existing_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.test.ts#:~:text=IndexPattern), [existing_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.test.ts#:~:text=IndexPattern), [existing_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.test.ts#:~:text=IndexPattern), [existing_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.test.ts#:~:text=IndexPattern), [loader.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/loader.ts#:~:text=IndexPattern), [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=IndexPattern), [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=IndexPattern), [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=IndexPattern), [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=IndexPattern), [utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/utils.ts#:~:text=IndexPattern)+ 22 more | - | -| | [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField) | - | -| | [datapanel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/datapanel.tsx#:~:text=indexPatterns), [datapanel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/datapanel.tsx#:~:text=indexPatterns), [datapanel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/datapanel.tsx#:~:text=indexPatterns), [datapanel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/datapanel.tsx#:~:text=indexPatterns), [indexpattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern.tsx#:~:text=indexPatterns), [lens_top_nav.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx#:~:text=indexPatterns), [lens_top_nav.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx#:~:text=indexPatterns), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/plugin.ts#:~:text=indexPatterns), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/plugin.ts#:~:text=indexPatterns) | - | | | [ranges.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/ranges.tsx#:~:text=fieldFormats), [droppable.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/droppable/droppable.test.ts#:~:text=fieldFormats) | - | -| | [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=IndexPatternsContract), [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=IndexPatternsContract), [utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/utils.ts#:~:text=IndexPatternsContract), [utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/utils.ts#:~:text=IndexPatternsContract), [loader.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/loader.ts#:~:text=IndexPatternsContract), [loader.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/loader.ts#:~:text=IndexPatternsContract), [embeddable_factory.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable_factory.ts#:~:text=IndexPatternsContract), [embeddable_factory.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable_factory.ts#:~:text=IndexPatternsContract), [loader.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/loader.test.ts#:~:text=IndexPatternsContract), [loader.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/loader.test.ts#:~:text=IndexPatternsContract)+ 18 more | - | -| | [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField) | - | -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/plugin.ts#:~:text=ensureDefaultDataView), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/plugin.ts#:~:text=ensureDefaultDataView) | - | -| | [existing_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.test.ts#:~:text=IndexPattern), [existing_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.test.ts#:~:text=IndexPattern), [existing_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.test.ts#:~:text=IndexPattern), [existing_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.test.ts#:~:text=IndexPattern), [loader.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/loader.ts#:~:text=IndexPattern), [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=IndexPattern), [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=IndexPattern), [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=IndexPattern), [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=IndexPattern), [utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/utils.ts#:~:text=IndexPattern)+ 22 more | - | -| | [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField) | - | -| | [existing_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.test.ts#:~:text=IndexPattern), [existing_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.test.ts#:~:text=IndexPattern), [existing_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.test.ts#:~:text=IndexPattern), [existing_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.test.ts#:~:text=IndexPattern), [loader.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/loader.ts#:~:text=IndexPattern), [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=IndexPattern), [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=IndexPattern), [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=IndexPattern), [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=IndexPattern), [utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/utils.ts#:~:text=IndexPattern)+ 6 more | - | -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/plugin.ts#:~:text=ensureDefaultDataView) | - | -| | [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=indexPatternsServiceFactory) | - | -| | [display_duplicate_title_confirm_modal.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/persistence/saved_objects_utils/display_duplicate_title_confirm_modal.ts#:~:text=SavedObject), [display_duplicate_title_confirm_modal.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/persistence/saved_objects_utils/display_duplicate_title_confirm_modal.ts#:~:text=SavedObject), [check_for_duplicate_title.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/persistence/saved_objects_utils/check_for_duplicate_title.ts#:~:text=SavedObject), [check_for_duplicate_title.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/persistence/saved_objects_utils/check_for_duplicate_title.ts#:~:text=SavedObject) | - | -| | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/app_plugin/types.ts#:~:text=onAppLeave), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/app_plugin/types.ts#:~:text=onAppLeave), [mounter.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/app_plugin/mounter.tsx#:~:text=onAppLeave) | - | -| | [saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/migrations/saved_object_migrations.ts#:~:text=warning), [saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/migrations/saved_object_migrations.ts#:~:text=warning) | - | +| | [display_duplicate_title_confirm_modal.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/persistence/saved_objects_utils/display_duplicate_title_confirm_modal.ts#:~:text=SavedObject), [display_duplicate_title_confirm_modal.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/persistence/saved_objects_utils/display_duplicate_title_confirm_modal.ts#:~:text=SavedObject), [check_for_duplicate_title.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/persistence/saved_objects_utils/check_for_duplicate_title.ts#:~:text=SavedObject), [check_for_duplicate_title.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/persistence/saved_objects_utils/check_for_duplicate_title.ts#:~:text=SavedObject), [check_for_duplicate_title.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/public/persistence/saved_objects_utils/check_for_duplicate_title.d.ts#:~:text=SavedObject), [check_for_duplicate_title.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/public/persistence/saved_objects_utils/check_for_duplicate_title.d.ts#:~:text=SavedObject), [display_duplicate_title_confirm_modal.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/public/persistence/saved_objects_utils/display_duplicate_title_confirm_modal.d.ts#:~:text=SavedObject), [display_duplicate_title_confirm_modal.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/public/persistence/saved_objects_utils/display_duplicate_title_confirm_modal.d.ts#:~:text=SavedObject) | 8.8.0 | +| | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/app_plugin/types.ts#:~:text=onAppLeave), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/app_plugin/types.ts#:~:text=onAppLeave), [mounter.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/app_plugin/mounter.tsx#:~:text=onAppLeave) | 8.8.0 | +| | [saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/migrations/saved_object_migrations.ts#:~:text=warning), [saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/migrations/saved_object_migrations.ts#:~:text=warning) | 8.8.0 | @@ -414,7 +382,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/license_management/public/plugin.ts#:~:text=license%24) | - | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/license_management/public/plugin.ts#:~:text=license%24) | 8.8.0 | @@ -422,7 +390,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/logstash/public/plugin.ts#:~:text=license%24) | - | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/logstash/public/plugin.ts#:~:text=license%24) | 8.8.0 | | | [save.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/logstash/server/routes/pipeline/save.ts#:~:text=authc) | - | @@ -431,7 +399,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [application.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/management/public/application.tsx#:~:text=appBasePath) | - | +| | [application.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/management/public/application.tsx#:~:text=appBasePath), [application.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/management/target/types/public/application.d.ts#:~:text=appBasePath) | 8.8.0 | @@ -440,21 +408,21 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [create_doc_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/create_doc_source.ts#:~:text=IndexPatternsService), [create_doc_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/create_doc_source.ts#:~:text=IndexPatternsService), [create_doc_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/create_doc_source.ts#:~:text=IndexPatternsService), [create_doc_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/create_doc_source.ts#:~:text=IndexPatternsService) | - | -| | [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/lazy_load_bundle/index.ts#:~:text=IndexPatternsContract), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/lazy_load_bundle/index.ts#:~:text=IndexPatternsContract), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/lazy_load_bundle/index.ts#:~:text=IndexPatternsContract), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/lazy_load_bundle/index.ts#:~:text=IndexPatternsContract) | - | +| | [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/lazy_load_bundle/index.ts#:~:text=IndexPatternsContract), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/lazy_load_bundle/index.ts#:~:text=IndexPatternsContract), [index.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/public/lazy_load_bundle/index.d.ts#:~:text=IndexPatternsContract), [index.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/public/lazy_load_bundle/index.d.ts#:~:text=IndexPatternsContract), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/lazy_load_bundle/index.ts#:~:text=IndexPatternsContract), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/lazy_load_bundle/index.ts#:~:text=IndexPatternsContract), [index.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/public/lazy_load_bundle/index.d.ts#:~:text=IndexPatternsContract), [index.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/public/lazy_load_bundle/index.d.ts#:~:text=IndexPatternsContract) | - | | | [es_tooltip_property.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/tooltips/es_tooltip_property.test.ts#:~:text=IndexPattern), [es_tooltip_property.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/tooltips/es_tooltip_property.test.ts#:~:text=IndexPattern), [percentile_agg_field.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/percentile_agg_field.test.ts#:~:text=IndexPattern), [percentile_agg_field.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/percentile_agg_field.test.ts#:~:text=IndexPattern), [get_docvalue_source_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/util/get_docvalue_source_fields.test.ts#:~:text=IndexPattern), [get_docvalue_source_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/util/get_docvalue_source_fields.test.ts#:~:text=IndexPattern), [get_docvalue_source_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/util/get_docvalue_source_fields.test.ts#:~:text=IndexPattern), [es_tooltip_property.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/tooltips/es_tooltip_property.test.ts#:~:text=IndexPattern), [es_tooltip_property.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/tooltips/es_tooltip_property.test.ts#:~:text=IndexPattern), [percentile_agg_field.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/percentile_agg_field.test.ts#:~:text=IndexPattern)+ 4 more | - | -| | [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField)+ 84 more | - | +| | [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField)+ 130 more | - | | | [es_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_source/es_source.ts#:~:text=fetch), [es_search_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=fetch), [es_search_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=fetch) | 8.1 | | | [kibana_services.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/kibana_services.ts#:~:text=indexPatterns) | - | | | [locators.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/locators.test.ts#:~:text=esFilters), [locators.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/locators.test.ts#:~:text=esFilters) | 8.1 | | | [can_skip_fetch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/util/can_skip_fetch.test.ts#:~:text=Filter), [can_skip_fetch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/util/can_skip_fetch.test.ts#:~:text=Filter), [can_skip_fetch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/util/can_skip_fetch.test.ts#:~:text=Filter), [can_skip_fetch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/util/can_skip_fetch.test.ts#:~:text=Filter) | 8.1 | -| | [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/lazy_load_bundle/index.ts#:~:text=IndexPatternsContract), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/lazy_load_bundle/index.ts#:~:text=IndexPatternsContract), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/lazy_load_bundle/index.ts#:~:text=IndexPatternsContract), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/lazy_load_bundle/index.ts#:~:text=IndexPatternsContract) | - | -| | [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField)+ 84 more | - | +| | [can_skip_fetch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/util/can_skip_fetch.test.ts#:~:text=Filter), [can_skip_fetch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/util/can_skip_fetch.test.ts#:~:text=Filter), [can_skip_fetch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/util/can_skip_fetch.test.ts#:~:text=Filter), [can_skip_fetch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/util/can_skip_fetch.test.ts#:~:text=Filter) | 8.1 | +| | [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/lazy_load_bundle/index.ts#:~:text=IndexPatternsContract), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/lazy_load_bundle/index.ts#:~:text=IndexPatternsContract), [index.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/public/lazy_load_bundle/index.d.ts#:~:text=IndexPatternsContract), [index.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/public/lazy_load_bundle/index.d.ts#:~:text=IndexPatternsContract), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/lazy_load_bundle/index.ts#:~:text=IndexPatternsContract), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/lazy_load_bundle/index.ts#:~:text=IndexPatternsContract), [index.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/public/lazy_load_bundle/index.d.ts#:~:text=IndexPatternsContract), [index.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/public/lazy_load_bundle/index.d.ts#:~:text=IndexPatternsContract) | - | +| | [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField)+ 130 more | - | | | [create_doc_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/create_doc_source.ts#:~:text=IndexPatternsService), [create_doc_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/create_doc_source.ts#:~:text=IndexPatternsService), [create_doc_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/create_doc_source.ts#:~:text=IndexPatternsService), [create_doc_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/create_doc_source.ts#:~:text=IndexPatternsService) | - | | | [es_tooltip_property.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/tooltips/es_tooltip_property.test.ts#:~:text=IndexPattern), [es_tooltip_property.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/tooltips/es_tooltip_property.test.ts#:~:text=IndexPattern), [percentile_agg_field.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/percentile_agg_field.test.ts#:~:text=IndexPattern), [percentile_agg_field.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/percentile_agg_field.test.ts#:~:text=IndexPattern), [get_docvalue_source_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/util/get_docvalue_source_fields.test.ts#:~:text=IndexPattern), [get_docvalue_source_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/util/get_docvalue_source_fields.test.ts#:~:text=IndexPattern), [get_docvalue_source_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/util/get_docvalue_source_fields.test.ts#:~:text=IndexPattern), [es_tooltip_property.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/tooltips/es_tooltip_property.test.ts#:~:text=IndexPattern), [es_tooltip_property.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/tooltips/es_tooltip_property.test.ts#:~:text=IndexPattern), [percentile_agg_field.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/percentile_agg_field.test.ts#:~:text=IndexPattern)+ 4 more | - | | | [es_search_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit), [es_search_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit), [es_search_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit), [es_search_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit) | - | -| | [can_skip_fetch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/util/can_skip_fetch.test.ts#:~:text=Filter), [can_skip_fetch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/util/can_skip_fetch.test.ts#:~:text=Filter), [can_skip_fetch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/util/can_skip_fetch.test.ts#:~:text=Filter), [can_skip_fetch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/util/can_skip_fetch.test.ts#:~:text=Filter) | 8.1 | | | [es_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_source/es_source.ts#:~:text=fetch), [es_search_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=fetch), [es_search_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=fetch) | 8.1 | -| | [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField)+ 37 more | - | +| | [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/components/single_field_select.tsx#:~:text=IndexPatternField)+ 60 more | - | | | [es_tooltip_property.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/tooltips/es_tooltip_property.test.ts#:~:text=IndexPattern), [es_tooltip_property.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/tooltips/es_tooltip_property.test.ts#:~:text=IndexPattern), [percentile_agg_field.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/percentile_agg_field.test.ts#:~:text=IndexPattern), [percentile_agg_field.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/agg/percentile_agg_field.test.ts#:~:text=IndexPattern), [get_docvalue_source_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/util/get_docvalue_source_fields.test.ts#:~:text=IndexPattern), [get_docvalue_source_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/util/get_docvalue_source_fields.test.ts#:~:text=IndexPattern), [get_docvalue_source_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/util/get_docvalue_source_fields.test.ts#:~:text=IndexPattern) | - | | | [create_doc_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/create_doc_source.ts#:~:text=IndexPatternsService), [create_doc_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/create_doc_source.ts#:~:text=IndexPatternsService), [create_doc_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/create_doc_source.ts#:~:text=IndexPatternsService), [create_doc_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/create_doc_source.ts#:~:text=IndexPatternsService) | - | | | [es_search_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit), [es_search_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit) | - | @@ -462,9 +430,9 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [es_search_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit), [es_search_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=flattenHit) | - | | | [kibana_server_services.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/kibana_server_services.ts#:~:text=indexPatternsServiceFactory), [indexing_routes.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/data_indexing/indexing_routes.ts#:~:text=indexPatternsServiceFactory) | - | | | [map_container.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/connected_components/map_container/map_container.tsx#:~:text=ExitFullScreenButton), [map_container.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/connected_components/map_container/map_container.tsx#:~:text=ExitFullScreenButton) | - | -| | [maps_list_view.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/routes/list_page/maps_list_view.tsx#:~:text=settings), [maps_list_view.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/routes/list_page/maps_list_view.tsx#:~:text=settings), [maps_list_view.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/routes/list_page/maps_list_view.tsx#:~:text=settings) | - | -| | [render_app.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/render_app.tsx#:~:text=onAppLeave), [map_app.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx#:~:text=onAppLeave), [map_page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/routes/map_page/map_page.tsx#:~:text=onAppLeave) | - | -| | [saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/saved_objects/saved_object_migrations.ts#:~:text=warning) | - | +| | [maps_list_view.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/routes/list_page/maps_list_view.tsx#:~:text=settings), [maps_list_view.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/routes/list_page/maps_list_view.tsx#:~:text=settings), [maps_list_view.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/routes/list_page/maps_list_view.tsx#:~:text=settings) | 8.8.0 | +| | [render_app.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/render_app.tsx#:~:text=onAppLeave), [map_app.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx#:~:text=onAppLeave), [map_page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/routes/map_page/map_page.tsx#:~:text=onAppLeave), [render_app.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/public/render_app.d.ts#:~:text=onAppLeave), [map_page.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/public/routes/map_page/map_page.d.ts#:~:text=onAppLeave), [map_app.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/public/routes/map_page/map_app/map_app.d.ts#:~:text=onAppLeave) | 8.8.0 | +| | [saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/saved_objects/saved_object_migrations.ts#:~:text=warning) | 8.8.0 | @@ -472,8 +440,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/maps_ems/server/index.ts#:~:text=license%24) | - | -| | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/maps_ems/server/index.ts#:~:text=refresh) | - | +| | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/maps_ems/server/index.ts#:~:text=license%24) | 8.8.0 | +| | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/maps_ems/server/index.ts#:~:text=refresh) | 8.8.0 | @@ -481,12 +449,15 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [check_license.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/license/check_license.tsx#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/plugin.ts#:~:text=license%24) | - | -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/plugin.ts#:~:text=license%24) | - | +| | [check_license.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/license/check_license.tsx#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/plugin.ts#:~:text=license%24) | 8.8.0 | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/plugin.ts#:~:text=license%24) | 8.8.0 | | | [annotations.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/routes/annotations.ts#:~:text=authc) | - | | | [initialization.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/saved_objects/initialization/initialization.ts#:~:text=authz), [sync_task.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/saved_objects/sync_task.ts#:~:text=authz), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/plugin.ts#:~:text=authz), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/plugin.ts#:~:text=authz) | - | -| | [app.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/app.tsx#:~:text=onAppLeave) | - | -| | [errors.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/common/util/errors/errors.test.ts#:~:text=req), [errors.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/common/util/errors/errors.test.ts#:~:text=req) | - | +| | [app.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/app.tsx#:~:text=onAppLeave) | 8.8.0 | +| | [errors.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/common/util/errors/errors.test.ts#:~:text=req), [errors.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/common/util/errors/errors.test.ts#:~:text=req) | 8.8.0 + +Note to maintainers: when looking at usages, mind that typical use could be inside a `catch` block, +so TS and code-reference navigation might not highlight them. | @@ -494,11 +465,11 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IIndexPattern), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IIndexPattern), [with_kuery_autocompletion.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/with_kuery_autocompletion.tsx#:~:text=IIndexPattern), [with_kuery_autocompletion.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/with_kuery_autocompletion.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/index.tsx#:~:text=IIndexPattern), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/lib/kuery.ts#:~:text=IIndexPattern), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/lib/kuery.ts#:~:text=IIndexPattern) | - | +| | [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IIndexPattern), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IIndexPattern), [with_kuery_autocompletion.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/with_kuery_autocompletion.tsx#:~:text=IIndexPattern), [with_kuery_autocompletion.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/with_kuery_autocompletion.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/index.tsx#:~:text=IIndexPattern), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/lib/kuery.ts#:~:text=IIndexPattern), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/lib/kuery.ts#:~:text=IIndexPattern), [with_kuery_autocompletion.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/target/types/public/components/kuery_bar/with_kuery_autocompletion.d.ts#:~:text=IIndexPattern), [with_kuery_autocompletion.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/target/types/public/components/kuery_bar/with_kuery_autocompletion.d.ts#:~:text=IIndexPattern)+ 2 more | - | | | [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=indexPatterns), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=indexPatterns) | - | -| | [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IIndexPattern), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IIndexPattern), [with_kuery_autocompletion.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/with_kuery_autocompletion.tsx#:~:text=IIndexPattern), [with_kuery_autocompletion.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/with_kuery_autocompletion.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/index.tsx#:~:text=IIndexPattern), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/lib/kuery.ts#:~:text=IIndexPattern), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/lib/kuery.ts#:~:text=IIndexPattern), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IIndexPattern), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IIndexPattern)+ 6 more | - | -| | [legacy_shims.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/legacy_shims.ts#:~:text=injectedMetadata) | - | -| | [bulk_uploader.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/server/kibana_monitoring/bulk_uploader.ts#:~:text=process) | - | +| | [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IIndexPattern), [use_derived_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx#:~:text=IIndexPattern), [with_kuery_autocompletion.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/with_kuery_autocompletion.tsx#:~:text=IIndexPattern), [with_kuery_autocompletion.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/with_kuery_autocompletion.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/components/kuery_bar/index.tsx#:~:text=IIndexPattern), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/lib/kuery.ts#:~:text=IIndexPattern), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/lib/kuery.ts#:~:text=IIndexPattern), [with_kuery_autocompletion.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/target/types/public/components/kuery_bar/with_kuery_autocompletion.d.ts#:~:text=IIndexPattern), [with_kuery_autocompletion.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/target/types/public/components/kuery_bar/with_kuery_autocompletion.d.ts#:~:text=IIndexPattern)+ 14 more | - | +| | [legacy_shims.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/legacy_shims.ts#:~:text=injectedMetadata) | 8.8.0 | +| | [bulk_uploader.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/server/kibana_monitoring/bulk_uploader.ts#:~:text=process) | 8.8.0 | @@ -506,8 +477,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [plugin.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/painless_lab/public/plugin.tsx#:~:text=license%24), [plugin.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/painless_lab/public/plugin.tsx#:~:text=license%24) | - | -| | [license.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/painless_lab/server/services/license.ts#:~:text=license%24) | - | +| | [plugin.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/painless_lab/public/plugin.tsx#:~:text=license%24), [plugin.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/painless_lab/public/plugin.tsx#:~:text=license%24) | 8.8.0 | +| | [license.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/painless_lab/server/services/license.ts#:~:text=license%24) | 8.8.0 | @@ -515,7 +486,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [saved_object_save_modal_dashboard.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/presentation_util/public/components/saved_object_save_modal_dashboard.tsx#:~:text=SavedObjectSaveModal), [saved_object_save_modal_dashboard.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/presentation_util/public/components/saved_object_save_modal_dashboard.tsx#:~:text=SavedObjectSaveModal) | - | +| | [saved_object_save_modal_dashboard.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/presentation_util/public/components/saved_object_save_modal_dashboard.tsx#:~:text=SavedObjectSaveModal), [saved_object_save_modal_dashboard.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/presentation_util/public/components/saved_object_save_modal_dashboard.tsx#:~:text=SavedObjectSaveModal) | 8.8.0 | @@ -523,7 +494,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/remote_clusters/server/plugin.ts#:~:text=license%24) | - | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/remote_clusters/server/plugin.ts#:~:text=license%24) | 8.8.0 | @@ -531,7 +502,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [license.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/rollup/server/services/license.ts#:~:text=license%24) | - | +| | [license.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/rollup/server/services/license.ts#:~:text=license%24) | 8.8.0 | @@ -567,7 +538,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [api.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_tagging_oss/public/api.ts#:~:text=SavedObject), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_tagging_oss/public/decorator/types.ts#:~:text=SavedObject), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_tagging_oss/public/decorator/types.ts#:~:text=SavedObject), [api.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_tagging_oss/public/api.ts#:~:text=SavedObject), [api.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_tagging_oss/public/api.ts#:~:text=SavedObject) | - | +| | [api.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_tagging_oss/public/api.ts#:~:text=SavedObject), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_tagging_oss/public/decorator/types.ts#:~:text=SavedObject), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_tagging_oss/public/decorator/types.ts#:~:text=SavedObject), [api.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_tagging_oss/public/api.ts#:~:text=SavedObject), [api.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_tagging_oss/public/api.ts#:~:text=SavedObject) | 8.8.0 | @@ -575,8 +546,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/searchprofiler/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/searchprofiler/public/plugin.ts#:~:text=license%24) | - | -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/searchprofiler/server/plugin.ts#:~:text=license%24) | - | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/searchprofiler/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/searchprofiler/public/plugin.ts#:~:text=license%24) | 8.8.0 | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/searchprofiler/server/plugin.ts#:~:text=license%24) | 8.8.0 | @@ -584,17 +555,25 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [elasticsearch_role.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.ts#:~:text=disabled), [put_payload.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts#:~:text=disabled), [put_payload.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts#:~:text=disabled), [primary_feature_privilege.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/model/primary_feature_privilege.ts#:~:text=disabled), [elasticsearch_role.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.test.ts#:~:text=disabled), [kibana_features.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/__fixtures__/kibana_features.ts#:~:text=disabled), [put.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/put.test.ts#:~:text=disabled), [put_payload.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.test.ts#:~:text=disabled) | - | -| | [disable_ui_capabilities.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/disable_ui_capabilities.ts#:~:text=requiredRoles) | - | -| | [elasticsearch_role.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.ts#:~:text=disabled), [put_payload.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts#:~:text=disabled), [put_payload.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts#:~:text=disabled), [primary_feature_privilege.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/model/primary_feature_privilege.ts#:~:text=disabled), [elasticsearch_role.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.test.ts#:~:text=disabled), [kibana_features.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/__fixtures__/kibana_features.ts#:~:text=disabled), [put.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/put.test.ts#:~:text=disabled), [put_payload.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.test.ts#:~:text=disabled) | - | -| | [elasticsearch_role.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.ts#:~:text=disabled), [put_payload.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts#:~:text=disabled), [put_payload.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts#:~:text=disabled), [primary_feature_privilege.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/model/primary_feature_privilege.ts#:~:text=disabled), [elasticsearch_role.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.test.ts#:~:text=disabled), [kibana_features.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/__fixtures__/kibana_features.ts#:~:text=disabled), [put.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/put.test.ts#:~:text=disabled), [put_payload.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.test.ts#:~:text=disabled) | - | -| | [disable_ui_capabilities.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/disable_ui_capabilities.ts#:~:text=requiredRoles) | - | -| | [license_service.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/common/licensing/license_service.test.ts#:~:text=mode), [license_service.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/common/licensing/license_service.test.ts#:~:text=mode) | - | -| | [plugin.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/plugin.tsx#:~:text=license%24) | - | -| | [license_service.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/common/licensing/license_service.test.ts#:~:text=mode), [license_service.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/common/licensing/license_service.test.ts#:~:text=mode) | - | -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/plugin.ts#:~:text=license%24) | - | -| | [logout_app.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/authentication/logout/logout_app.test.ts#:~:text=appBasePath) | - | -| | [logout_app.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/authentication/logout/logout_app.test.ts#:~:text=onAppLeave) | - | +| | [elasticsearch_role.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.ts#:~:text=disabled), [put_payload.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts#:~:text=disabled), [put_payload.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts#:~:text=disabled), [primary_feature_privilege.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/model/primary_feature_privilege.ts#:~:text=disabled), [elasticsearch_role.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.test.ts#:~:text=disabled), [kibana_features.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/__fixtures__/kibana_features.ts#:~:text=disabled), [put.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/put.test.ts#:~:text=disabled), [put_payload.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.test.ts#:~:text=disabled) | 8.8.0 | +| | [disable_ui_capabilities.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/disable_ui_capabilities.ts#:~:text=requiredRoles) | 8.8.0 + +This is relied on by the reporting feature, and should be removed once reporting +migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/issues/19914 | +| | [elasticsearch_role.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.ts#:~:text=disabled), [put_payload.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts#:~:text=disabled), [put_payload.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts#:~:text=disabled), [primary_feature_privilege.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/model/primary_feature_privilege.ts#:~:text=disabled), [elasticsearch_role.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.test.ts#:~:text=disabled), [kibana_features.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/__fixtures__/kibana_features.ts#:~:text=disabled), [put.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/put.test.ts#:~:text=disabled), [put_payload.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.test.ts#:~:text=disabled) | 8.8.0 | +| | [elasticsearch_role.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.ts#:~:text=disabled), [put_payload.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts#:~:text=disabled), [put_payload.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts#:~:text=disabled), [primary_feature_privilege.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/model/primary_feature_privilege.ts#:~:text=disabled), [elasticsearch_role.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.test.ts#:~:text=disabled), [kibana_features.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/__fixtures__/kibana_features.ts#:~:text=disabled), [put.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/put.test.ts#:~:text=disabled), [put_payload.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.test.ts#:~:text=disabled) | 8.8.0 | +| | [disable_ui_capabilities.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/disable_ui_capabilities.ts#:~:text=requiredRoles) | 8.8.0 + +This is relied on by the reporting feature, and should be removed once reporting +migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/issues/19914 | +| | [app_authorization.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/app_authorization.ts#:~:text=getKibanaFeatures), [privileges.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/privileges/privileges.ts#:~:text=getKibanaFeatures), [authorization_service.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/authorization_service.tsx#:~:text=getKibanaFeatures), [app_authorization.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/app_authorization.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures)+ 14 more | 8.8.0 | +| | [authorization_service.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/authorization_service.tsx#:~:text=getElasticsearchFeatures) | 8.8.0 | +| | [license_service.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/common/licensing/license_service.test.ts#:~:text=mode), [license_service.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/common/licensing/license_service.test.ts#:~:text=mode) | 8.8.0 | +| | [plugin.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/plugin.tsx#:~:text=license%24) | 8.8.0 | +| | [license_service.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/common/licensing/license_service.test.ts#:~:text=mode), [license_service.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/common/licensing/license_service.test.ts#:~:text=mode) | 8.8.0 | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/plugin.ts#:~:text=license%24) | 8.8.0 | +| | [logout_app.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/authentication/logout/logout_app.test.ts#:~:text=appBasePath) | 8.8.0 | +| | [logout_app.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/authentication/logout/logout_app.test.ts#:~:text=onAppLeave) | 8.8.0 | @@ -603,11 +582,11 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [middleware.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=indexPatterns), [dependencies_start_mock.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/mock/endpoint/dependencies_start_mock.ts#:~:text=indexPatterns) | - | -| | [policy_config.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [isolation.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.test.ts#:~:text=mode), [isolation.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.test.ts#:~:text=mode)+ 2 more | - | -| | [policy_config.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [isolation.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.test.ts#:~:text=mode), [isolation.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.test.ts#:~:text=mode)+ 2 more | - | +| | [policy_config.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [isolation.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.test.ts#:~:text=mode), [isolation.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.test.ts#:~:text=mode)+ 2 more | 8.8.0 | +| | [policy_config.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [isolation.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.test.ts#:~:text=mode), [isolation.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.test.ts#:~:text=mode)+ 2 more | 8.8.0 | | | [request_context_factory.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/request_context_factory.ts#:~:text=authc), [request_context_factory.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/request_context_factory.ts#:~:text=authc), [create_signals_migration_route.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.ts#:~:text=authc), [delete_signals_migration_route.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/delete_signals_migration_route.ts#:~:text=authc), [finalize_signals_migration_route.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.ts#:~:text=authc), [open_close_signals_route.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals_route.ts#:~:text=authc), [preview_rules_route.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/preview_rules_route.ts#:~:text=authc), [common.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/timeline/utils/common.ts#:~:text=authc) | - | -| | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/index.tsx#:~:text=onAppLeave) | - | -| | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/components/flyout/index.tsx#:~:text=AppLeaveHandler), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/components/flyout/index.tsx#:~:text=AppLeaveHandler), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/home/template_wrapper/bottom_bar/index.tsx#:~:text=AppLeaveHandler), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/home/template_wrapper/bottom_bar/index.tsx#:~:text=AppLeaveHandler), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/home/template_wrapper/index.tsx#:~:text=AppLeaveHandler), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/home/template_wrapper/index.tsx#:~:text=AppLeaveHandler), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/home/index.tsx#:~:text=AppLeaveHandler), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/home/index.tsx#:~:text=AppLeaveHandler), [routes.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/routes.tsx#:~:text=AppLeaveHandler), [routes.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/routes.tsx#:~:text=AppLeaveHandler)+ 3 more | - | +| | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/index.tsx#:~:text=onAppLeave) | 8.8.0 | +| | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/components/flyout/index.tsx#:~:text=AppLeaveHandler), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/components/flyout/index.tsx#:~:text=AppLeaveHandler), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/home/template_wrapper/bottom_bar/index.tsx#:~:text=AppLeaveHandler), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/home/template_wrapper/bottom_bar/index.tsx#:~:text=AppLeaveHandler), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/home/template_wrapper/index.tsx#:~:text=AppLeaveHandler), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/home/template_wrapper/index.tsx#:~:text=AppLeaveHandler), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/home/index.tsx#:~:text=AppLeaveHandler), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/home/index.tsx#:~:text=AppLeaveHandler), [routes.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/routes.tsx#:~:text=AppLeaveHandler), [routes.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/routes.tsx#:~:text=AppLeaveHandler)+ 3 more | 8.8.0 | @@ -615,7 +594,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [license.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/snapshot_restore/server/services/license.ts#:~:text=license%24) | - | +| | [license.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/snapshot_restore/server/services/license.ts#:~:text=license%24) | 8.8.0 | @@ -623,7 +602,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [spaces_usage_collector.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/spaces/server/usage_collection/spaces_usage_collector.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/spaces/server/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/spaces/server/plugin.ts#:~:text=license%24), [spaces_usage_collector.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/spaces/server/usage_collection/spaces_usage_collector.test.ts#:~:text=license%24) | - | +| | [on_post_auth_interceptor.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/spaces/server/lib/request_interceptors/on_post_auth_interceptor.ts#:~:text=getKibanaFeatures), [spaces_usage_collector.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/spaces/server/usage_collection/spaces_usage_collector.ts#:~:text=getKibanaFeatures), [on_post_auth_interceptor.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/spaces/server/lib/request_interceptors/on_post_auth_interceptor.test.ts#:~:text=getKibanaFeatures) | 8.8.0 | +| | [spaces_usage_collector.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/spaces/server/usage_collection/spaces_usage_collector.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/spaces/server/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/spaces/server/plugin.ts#:~:text=license%24), [spaces_usage_collector.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/spaces/server/usage_collection/spaces_usage_collector.test.ts#:~:text=license%24) | 8.8.0 | | | [copy_to_space_flyout_internal.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout_internal.tsx#:~:text=createNewCopy) | - | | | [copy_to_space_flyout_internal.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout_internal.tsx#:~:text=createNewCopy) | - | @@ -633,20 +613,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPatternsContract), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPatternsContract), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPatternsContract), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPatternsContract) | - | -| | [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPattern), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPattern), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPattern), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPattern) | - | -| | [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=IIndexPattern), [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=IIndexPattern), [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=IIndexPattern), [boundary_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx#:~:text=IIndexPattern), [boundary_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx#:~:text=IIndexPattern), [boundary_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=IIndexPattern)+ 1 more | - | -| | [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=IFieldType), [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=IFieldType)+ 14 more | 8.2 | | | [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=indexPatterns), [boundary_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx#:~:text=indexPatterns), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=indexPatterns), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=indexPatterns), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=indexPatterns) | - | | | [expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/threshold/expression.tsx#:~:text=fieldFormats) | - | -| | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=esKuery), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=esKuery) | 8.1 | -| | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=esQuery), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=esQuery) | 8.1 | -| | [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=IFieldType), [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=IFieldType)+ 38 more | 8.2 | -| | [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=IIndexPattern), [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=IIndexPattern), [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=IIndexPattern), [boundary_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx#:~:text=IIndexPattern), [boundary_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx#:~:text=IIndexPattern), [boundary_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/boundary_index_expression.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=IIndexPattern)+ 12 more | - | -| | [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPatternsContract), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPatternsContract), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPatternsContract), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPatternsContract) | - | -| | [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPattern), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPattern), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPattern), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPattern) | - | -| | [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=IFieldType), [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=IFieldType)+ 14 more | 8.2 | -| | [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPattern), [geo_index_pattern_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx#:~:text=IndexPattern) | - | @@ -665,7 +633,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [index_pattern.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/common/types/index_pattern.ts#:~:text=IndexPattern), [index_pattern.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/common/types/index_pattern.ts#:~:text=IndexPattern), [index_pattern.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/common/types/index_pattern.ts#:~:text=IndexPattern), [index_pattern.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/common/types/index_pattern.ts#:~:text=IndexPattern), [wizard.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx#:~:text=IndexPattern), [wizard.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx#:~:text=IndexPattern), [get_pivot_dropdown_options.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/get_pivot_dropdown_options.ts#:~:text=IndexPattern), [get_pivot_dropdown_options.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/get_pivot_dropdown_options.ts#:~:text=IndexPattern), [filter_agg_form.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_agg_form.tsx#:~:text=IndexPattern), [filter_agg_form.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_agg_form.tsx#:~:text=IndexPattern)+ 30 more | - | | | [common.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/hooks/use_search_items/common.ts#:~:text=IndexPatternAttributes), [common.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/hooks/use_search_items/common.ts#:~:text=IndexPatternAttributes) | - | | | [index_pattern.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/common/types/index_pattern.ts#:~:text=IndexPattern), [index_pattern.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/common/types/index_pattern.ts#:~:text=IndexPattern), [index_pattern.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/common/types/index_pattern.ts#:~:text=IndexPattern), [index_pattern.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/common/types/index_pattern.ts#:~:text=IndexPattern), [wizard.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx#:~:text=IndexPattern), [wizard.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx#:~:text=IndexPattern), [get_pivot_dropdown_options.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/get_pivot_dropdown_options.ts#:~:text=IndexPattern), [get_pivot_dropdown_options.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/get_pivot_dropdown_options.ts#:~:text=IndexPattern), [filter_agg_form.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_agg_form.tsx#:~:text=IndexPattern), [filter_agg_form.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_agg_form.tsx#:~:text=IndexPattern)+ 10 more | - | -| | [license.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/server/services/license.ts#:~:text=license%24) | - | +| | [license.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/server/services/license.ts#:~:text=license%24) | 8.8.0 | @@ -673,7 +641,10 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [reindex_service.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts#:~:text=license%24), [reindex_service.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts#:~:text=license%24), [reindex_service.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts#:~:text=license%24) | - | +| | [app_context.mock.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/upgrade_assistant/target/types/__jest__/client_integration/helpers/app_context.mock.d.ts#:~:text=IndexPattern), [app_context.mock.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/upgrade_assistant/target/types/__jest__/client_integration/helpers/app_context.mock.d.ts#:~:text=IndexPattern) | - | +| | [app_context.mock.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/upgrade_assistant/target/types/__jest__/client_integration/helpers/app_context.mock.d.ts#:~:text=IndexPattern), [app_context.mock.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/upgrade_assistant/target/types/__jest__/client_integration/helpers/app_context.mock.d.ts#:~:text=IndexPattern) | - | +| | [app_context.mock.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/upgrade_assistant/target/types/__jest__/client_integration/helpers/app_context.mock.d.ts#:~:text=IndexPattern) | - | +| | [reindex_service.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts#:~:text=license%24), [reindex_service.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts#:~:text=license%24), [reindex_service.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts#:~:text=license%24) | 8.8.0 | @@ -712,12 +683,12 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [agg_type_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts#:~:text=IndexPattern), [agg_type_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts#:~:text=IndexPattern), [agg_type_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts#:~:text=IndexPattern), [editor_config.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/utils/editor_config.ts#:~:text=IndexPattern), [editor_config.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/utils/editor_config.ts#:~:text=IndexPattern), [agg_params_helper.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_params_helper.ts#:~:text=IndexPattern), [agg_params_helper.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_params_helper.ts#:~:text=IndexPattern), [agg_select.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_select.tsx#:~:text=IndexPattern), [agg_select.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_select.tsx#:~:text=IndexPattern), [agg_params.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_params.tsx#:~:text=IndexPattern)+ 16 more | - | -| | [agg_type_field_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_field_filters.ts#:~:text=IndexPatternField), [agg_type_field_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_field_filters.ts#:~:text=IndexPatternField), [agg_type_field_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_field_filters.ts#:~:text=IndexPatternField), [agg_param_props.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_param_props.ts#:~:text=IndexPatternField), [agg_param_props.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_param_props.ts#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [top_field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/top_field.tsx#:~:text=IndexPatternField)+ 26 more | - | -| | [agg_type_field_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_field_filters.ts#:~:text=IndexPatternField), [agg_type_field_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_field_filters.ts#:~:text=IndexPatternField), [agg_type_field_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_field_filters.ts#:~:text=IndexPatternField), [agg_param_props.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_param_props.ts#:~:text=IndexPatternField), [agg_param_props.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_param_props.ts#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [top_field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/top_field.tsx#:~:text=IndexPatternField)+ 26 more | - | -| | [agg_type_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts#:~:text=IndexPattern), [agg_type_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts#:~:text=IndexPattern), [agg_type_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts#:~:text=IndexPattern), [editor_config.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/utils/editor_config.ts#:~:text=IndexPattern), [editor_config.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/utils/editor_config.ts#:~:text=IndexPattern), [agg_params_helper.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_params_helper.ts#:~:text=IndexPattern), [agg_params_helper.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_params_helper.ts#:~:text=IndexPattern), [agg_select.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_select.tsx#:~:text=IndexPattern), [agg_select.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_select.tsx#:~:text=IndexPattern), [agg_params.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_params.tsx#:~:text=IndexPattern)+ 16 more | - | -| | [agg_type_field_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_field_filters.ts#:~:text=IndexPatternField), [agg_type_field_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_field_filters.ts#:~:text=IndexPatternField), [agg_type_field_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_field_filters.ts#:~:text=IndexPatternField), [agg_param_props.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_param_props.ts#:~:text=IndexPatternField), [agg_param_props.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_param_props.ts#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [top_field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/top_field.tsx#:~:text=IndexPatternField)+ 8 more | - | -| | [agg_type_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts#:~:text=IndexPattern), [agg_type_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts#:~:text=IndexPattern), [agg_type_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts#:~:text=IndexPattern), [editor_config.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/utils/editor_config.ts#:~:text=IndexPattern), [editor_config.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/utils/editor_config.ts#:~:text=IndexPattern), [agg_params_helper.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_params_helper.ts#:~:text=IndexPattern), [agg_params_helper.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_params_helper.ts#:~:text=IndexPattern), [agg_select.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_select.tsx#:~:text=IndexPattern), [agg_select.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_select.tsx#:~:text=IndexPattern), [agg_params.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_params.tsx#:~:text=IndexPattern)+ 3 more | - | +| | [agg_type_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts#:~:text=IndexPattern), [agg_type_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts#:~:text=IndexPattern), [agg_type_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts#:~:text=IndexPattern), [editor_config.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/utils/editor_config.ts#:~:text=IndexPattern), [editor_config.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/utils/editor_config.ts#:~:text=IndexPattern), [agg_params_helper.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_params_helper.ts#:~:text=IndexPattern), [agg_params_helper.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_params_helper.ts#:~:text=IndexPattern), [agg_select.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_select.tsx#:~:text=IndexPattern), [agg_select.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_select.tsx#:~:text=IndexPattern), [agg_params.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_params.tsx#:~:text=IndexPattern)+ 24 more | - | +| | [agg_type_field_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_field_filters.ts#:~:text=IndexPatternField), [agg_type_field_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_field_filters.ts#:~:text=IndexPatternField), [agg_type_field_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_field_filters.ts#:~:text=IndexPatternField), [agg_param_props.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_param_props.ts#:~:text=IndexPatternField), [agg_param_props.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_param_props.ts#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [top_field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/top_field.tsx#:~:text=IndexPatternField)+ 38 more | - | +| | [agg_type_field_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_field_filters.ts#:~:text=IndexPatternField), [agg_type_field_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_field_filters.ts#:~:text=IndexPatternField), [agg_type_field_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_field_filters.ts#:~:text=IndexPatternField), [agg_param_props.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_param_props.ts#:~:text=IndexPatternField), [agg_param_props.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_param_props.ts#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [top_field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/top_field.tsx#:~:text=IndexPatternField)+ 38 more | - | +| | [agg_type_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts#:~:text=IndexPattern), [agg_type_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts#:~:text=IndexPattern), [agg_type_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts#:~:text=IndexPattern), [editor_config.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/utils/editor_config.ts#:~:text=IndexPattern), [editor_config.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/utils/editor_config.ts#:~:text=IndexPattern), [agg_params_helper.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_params_helper.ts#:~:text=IndexPattern), [agg_params_helper.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_params_helper.ts#:~:text=IndexPattern), [agg_select.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_select.tsx#:~:text=IndexPattern), [agg_select.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_select.tsx#:~:text=IndexPattern), [agg_params.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_params.tsx#:~:text=IndexPattern)+ 24 more | - | +| | [agg_type_field_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_field_filters.ts#:~:text=IndexPatternField), [agg_type_field_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_field_filters.ts#:~:text=IndexPatternField), [agg_type_field_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_field_filters.ts#:~:text=IndexPatternField), [agg_param_props.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_param_props.ts#:~:text=IndexPatternField), [agg_param_props.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_param_props.ts#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [top_field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/top_field.tsx#:~:text=IndexPatternField)+ 14 more | - | +| | [agg_type_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts#:~:text=IndexPattern), [agg_type_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts#:~:text=IndexPattern), [agg_type_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts#:~:text=IndexPattern), [editor_config.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/utils/editor_config.ts#:~:text=IndexPattern), [editor_config.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/utils/editor_config.ts#:~:text=IndexPattern), [agg_params_helper.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_params_helper.ts#:~:text=IndexPattern), [agg_params_helper.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_params_helper.ts#:~:text=IndexPattern), [agg_select.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_select.tsx#:~:text=IndexPattern), [agg_select.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_select.tsx#:~:text=IndexPattern), [agg_params.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_params.tsx#:~:text=IndexPattern)+ 7 more | - | @@ -746,37 +717,15 @@ warning: This document is auto-generated and is meant to be viewed inside our ex -## visTypeTimelion - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [plugin_services.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/helpers/plugin_services.ts#:~:text=IndexPatternsContract), [plugin_services.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/helpers/plugin_services.ts#:~:text=IndexPatternsContract), [timelion_expression_input_helpers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/components/timelion_expression_input_helpers.test.ts#:~:text=IndexPatternsContract), [timelion_expression_input_helpers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/components/timelion_expression_input_helpers.test.ts#:~:text=IndexPatternsContract), [plugin_services.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/helpers/plugin_services.ts#:~:text=IndexPatternsContract), [plugin_services.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/helpers/plugin_services.ts#:~:text=IndexPatternsContract), [timelion_expression_input_helpers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/components/timelion_expression_input_helpers.test.ts#:~:text=IndexPatternsContract), [timelion_expression_input_helpers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/components/timelion_expression_input_helpers.test.ts#:~:text=IndexPatternsContract) | - | -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/plugin.ts#:~:text=indexPatterns) | - | -| | [plugin_services.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/helpers/plugin_services.ts#:~:text=IndexPatternsContract), [plugin_services.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/helpers/plugin_services.ts#:~:text=IndexPatternsContract), [timelion_expression_input_helpers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/components/timelion_expression_input_helpers.test.ts#:~:text=IndexPatternsContract), [timelion_expression_input_helpers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/components/timelion_expression_input_helpers.test.ts#:~:text=IndexPatternsContract), [plugin_services.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/helpers/plugin_services.ts#:~:text=IndexPatternsContract), [plugin_services.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/helpers/plugin_services.ts#:~:text=IndexPatternsContract), [timelion_expression_input_helpers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/components/timelion_expression_input_helpers.test.ts#:~:text=IndexPatternsContract), [timelion_expression_input_helpers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/components/timelion_expression_input_helpers.test.ts#:~:text=IndexPatternsContract) | - | -| | [run.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/server/routes/run.ts#:~:text=indexPatternsServiceFactory) | - | - - - ## visTypeTimeseries | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [abstract_search_strategy.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts#:~:text=IndexPatternsService), [abstract_search_strategy.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts#:~:text=IndexPatternsService), [default_search_strategy.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/default_search_strategy.ts#:~:text=IndexPatternsService), [default_search_strategy.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/default_search_strategy.ts#:~:text=IndexPatternsService), [cached_index_pattern_fetcher.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.ts#:~:text=IndexPatternsService), [cached_index_pattern_fetcher.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.ts#:~:text=IndexPatternsService), [rollup_search_strategy.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/rollup_search_strategy.ts#:~:text=IndexPatternsService), [rollup_search_strategy.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/rollup_search_strategy.ts#:~:text=IndexPatternsService), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/types.ts#:~:text=IndexPatternsService), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/types.ts#:~:text=IndexPatternsService)+ 44 more | - | -| | [cached_index_pattern_fetcher.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts#:~:text=IndexPattern), [cached_index_pattern_fetcher.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts#:~:text=IndexPattern), [cached_index_pattern_fetcher.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts#:~:text=IndexPattern), [cached_index_pattern_fetcher.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts#:~:text=IndexPattern), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/common/types/index.ts#:~:text=IndexPattern), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/common/types/index.ts#:~:text=IndexPattern), [index_patterns_utils.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts#:~:text=IndexPattern), [index_patterns_utils.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts#:~:text=IndexPattern), [index_patterns_utils.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts#:~:text=IndexPattern), [index_patterns_utils.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts#:~:text=IndexPattern)+ 56 more | - | -| | [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField)+ 2 more | - | -| | [fetch_fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/lib/fetch_fields.ts#:~:text=indexPatterns), [combo_box_select.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/index_pattern_select/combo_box_select.tsx#:~:text=indexPatterns), [query_bar_wrapper.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/query_bar_wrapper.tsx#:~:text=indexPatterns), [annotation_row.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/annotation_row.tsx#:~:text=indexPatterns), [metrics_type.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/metrics_type.ts#:~:text=indexPatterns), [metrics_type.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/metrics_type.ts#:~:text=indexPatterns), [convert_series_to_datatable.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.ts#:~:text=indexPatterns), [timeseries_visualization.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/timeseries_visualization.tsx#:~:text=indexPatterns), [metrics_type.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/metrics_type.test.ts#:~:text=indexPatterns) | - | | | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/plugin.ts#:~:text=fieldFormats) | - | -| | [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField)+ 2 more | - | -| | [abstract_search_strategy.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts#:~:text=IndexPatternsService), [abstract_search_strategy.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts#:~:text=IndexPatternsService), [default_search_strategy.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/default_search_strategy.ts#:~:text=IndexPatternsService), [default_search_strategy.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/default_search_strategy.ts#:~:text=IndexPatternsService), [cached_index_pattern_fetcher.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.ts#:~:text=IndexPatternsService), [cached_index_pattern_fetcher.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.ts#:~:text=IndexPatternsService), [rollup_search_strategy.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/rollup_search_strategy.ts#:~:text=IndexPatternsService), [rollup_search_strategy.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/rollup_search_strategy.ts#:~:text=IndexPatternsService), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/types.ts#:~:text=IndexPatternsService), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/types.ts#:~:text=IndexPatternsService)+ 44 more | - | -| | [cached_index_pattern_fetcher.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts#:~:text=IndexPattern), [cached_index_pattern_fetcher.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts#:~:text=IndexPattern), [cached_index_pattern_fetcher.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts#:~:text=IndexPattern), [cached_index_pattern_fetcher.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts#:~:text=IndexPattern), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/common/types/index.ts#:~:text=IndexPattern), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/common/types/index.ts#:~:text=IndexPattern), [index_patterns_utils.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts#:~:text=IndexPattern), [index_patterns_utils.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts#:~:text=IndexPattern), [index_patterns_utils.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts#:~:text=IndexPattern), [index_patterns_utils.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts#:~:text=IndexPattern)+ 56 more | - | | | [abstract_search_strategy.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts#:~:text=getNonScriptedFields), [fetch_fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/lib/fetch_fields.ts#:~:text=getNonScriptedFields), [abstract_search_strategy.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts#:~:text=getNonScriptedFields), [fetch_fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/lib/fetch_fields.ts#:~:text=getNonScriptedFields) | - | -| | [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField), [convert_series_to_datatable.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/components/lib/convert_series_to_datatable.test.ts#:~:text=IndexPatternField) | - | -| | [cached_index_pattern_fetcher.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts#:~:text=IndexPattern), [cached_index_pattern_fetcher.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts#:~:text=IndexPattern), [cached_index_pattern_fetcher.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts#:~:text=IndexPattern), [cached_index_pattern_fetcher.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.test.ts#:~:text=IndexPattern), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/common/types/index.ts#:~:text=IndexPattern), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/common/types/index.ts#:~:text=IndexPattern), [index_patterns_utils.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts#:~:text=IndexPattern), [index_patterns_utils.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts#:~:text=IndexPattern), [index_patterns_utils.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts#:~:text=IndexPattern), [index_patterns_utils.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/common/index_patterns_utils.test.ts#:~:text=IndexPattern)+ 23 more | - | -| | [abstract_search_strategy.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts#:~:text=IndexPatternsService), [abstract_search_strategy.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts#:~:text=IndexPatternsService), [default_search_strategy.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/default_search_strategy.ts#:~:text=IndexPatternsService), [default_search_strategy.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/default_search_strategy.ts#:~:text=IndexPatternsService), [cached_index_pattern_fetcher.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.ts#:~:text=IndexPatternsService), [cached_index_pattern_fetcher.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/lib/cached_index_pattern_fetcher.ts#:~:text=IndexPatternsService), [rollup_search_strategy.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/rollup_search_strategy.ts#:~:text=IndexPatternsService), [rollup_search_strategy.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/rollup_search_strategy.ts#:~:text=IndexPatternsService), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/types.ts#:~:text=IndexPatternsService), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/types.ts#:~:text=IndexPatternsService)+ 44 more | - | | | [abstract_search_strategy.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts#:~:text=getNonScriptedFields), [fetch_fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/lib/fetch_fields.ts#:~:text=getNonScriptedFields) | - | | | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/plugin.ts#:~:text=fieldFormats) | - | | | [abstract_search_strategy.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts#:~:text=getNonScriptedFields), [fetch_fields.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/public/application/lib/fetch_fields.ts#:~:text=getNonScriptedFields) | - | -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timeseries/server/plugin.ts#:~:text=indexPatternsServiceFactory) | - | @@ -784,12 +733,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [extract_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/lib/extract_index_pattern.ts#:~:text=IndexPattern), [extract_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/lib/extract_index_pattern.ts#:~:text=IndexPattern), [extract_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/lib/extract_index_pattern.ts#:~:text=IndexPattern), [extract_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/lib/extract_index_pattern.ts#:~:text=IndexPattern), [extract_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/lib/extract_index_pattern.ts#:~:text=IndexPattern), [extract_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/lib/extract_index_pattern.ts#:~:text=IndexPattern) | - | -| | [search_api.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/data_model/search_api.ts#:~:text=indexPatterns), [extract_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/lib/extract_index_pattern.ts#:~:text=indexPatterns), [search_api.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/data_model/search_api.test.ts#:~:text=indexPatterns), [search_api.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/data_model/search_api.test.ts#:~:text=indexPatterns), [search_api.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/data_model/search_api.test.ts#:~:text=indexPatterns), [view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/vega_view/vega_map_view/view.test.ts#:~:text=indexPatterns) | - | -| | [extract_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/lib/extract_index_pattern.ts#:~:text=IndexPattern), [extract_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/lib/extract_index_pattern.ts#:~:text=IndexPattern), [extract_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/lib/extract_index_pattern.ts#:~:text=IndexPattern), [extract_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/lib/extract_index_pattern.ts#:~:text=IndexPattern), [extract_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/lib/extract_index_pattern.ts#:~:text=IndexPattern), [extract_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/lib/extract_index_pattern.ts#:~:text=IndexPattern) | - | -| | [extract_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/lib/extract_index_pattern.ts#:~:text=IndexPattern), [extract_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/lib/extract_index_pattern.ts#:~:text=IndexPattern), [extract_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/lib/extract_index_pattern.ts#:~:text=IndexPattern) | - | -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/plugin.ts#:~:text=injectedMetadata) | - | -| | [search_api.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/data_model/search_api.ts#:~:text=injectedMetadata), [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/plugin.ts#:~:text=injectedMetadata) | - | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/plugin.ts#:~:text=injectedMetadata) | 8.8.0 | +| | [search_api.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/data_model/search_api.ts#:~:text=injectedMetadata), [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/plugin.ts#:~:text=injectedMetadata), [search_api.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/target/types/public/data_model/search_api.d.ts#:~:text=injectedMetadata) | 8.8.0 | @@ -817,16 +762,9 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis.ts#:~:text=IndexPattern), [vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis_types/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis_types/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis_types/types.ts#:~:text=IndexPattern), [create_vis_embeddable_from_object.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/create_vis_embeddable_from_object.ts#:~:text=IndexPattern), [create_vis_embeddable_from_object.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/create_vis_embeddable_from_object.ts#:~:text=IndexPattern), [visualize_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx#:~:text=IndexPattern), [visualize_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx#:~:text=IndexPattern), [visualize_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx#:~:text=IndexPattern)+ 16 more | - | -| | [visualize_top_nav.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/visualize_app/components/visualize_top_nav.tsx#:~:text=indexPatterns), [visualize_top_nav.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/visualize_app/components/visualize_top_nav.tsx#:~:text=indexPatterns), [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/plugin.ts#:~:text=indexPatterns), [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/plugin.ts#:~:text=indexPatterns) | - | -| | [controls_references.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/utils/saved_visualization_references/controls_references.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [controls_references.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/utils/saved_visualization_references/controls_references.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [timeseries_references.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/utils/saved_visualization_references/timeseries_references.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [timeseries_references.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/utils/saved_visualization_references/timeseries_references.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [visualization_saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [visualization_saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [visualization_saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [visualization_saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [visualization_saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [controls_references.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/utils/saved_visualization_references/controls_references.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE)+ 8 more | - | -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/plugin.ts#:~:text=ensureDefaultDataView), [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/plugin.ts#:~:text=ensureDefaultDataView) | - | -| | [vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis.ts#:~:text=IndexPattern), [vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis_types/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis_types/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis_types/types.ts#:~:text=IndexPattern), [create_vis_embeddable_from_object.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/create_vis_embeddable_from_object.ts#:~:text=IndexPattern), [create_vis_embeddable_from_object.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/create_vis_embeddable_from_object.ts#:~:text=IndexPattern), [visualize_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx#:~:text=IndexPattern), [visualize_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx#:~:text=IndexPattern), [visualize_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx#:~:text=IndexPattern)+ 16 more | - | -| | [vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis.ts#:~:text=IndexPattern), [vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis_types/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis_types/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis_types/types.ts#:~:text=IndexPattern), [create_vis_embeddable_from_object.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/create_vis_embeddable_from_object.ts#:~:text=IndexPattern), [create_vis_embeddable_from_object.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/create_vis_embeddable_from_object.ts#:~:text=IndexPattern), [visualize_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx#:~:text=IndexPattern), [visualize_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx#:~:text=IndexPattern), [visualize_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx#:~:text=IndexPattern)+ 3 more | - | -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/plugin.ts#:~:text=ensureDefaultDataView) | - | -| | [display_duplicate_title_confirm_modal.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/utils/saved_objects_utils/display_duplicate_title_confirm_modal.ts#:~:text=SavedObject), [display_duplicate_title_confirm_modal.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/utils/saved_objects_utils/display_duplicate_title_confirm_modal.ts#:~:text=SavedObject), [check_for_duplicate_title.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/utils/saved_objects_utils/check_for_duplicate_title.ts#:~:text=SavedObject), [check_for_duplicate_title.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/utils/saved_objects_utils/check_for_duplicate_title.ts#:~:text=SavedObject) | - | -| | [visualize_listing.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/visualize_app/components/visualize_listing.tsx#:~:text=settings), [visualize_listing.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/visualize_app/components/visualize_listing.tsx#:~:text=settings) | - | -| | [visualize_top_nav.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/visualize_app/components/visualize_top_nav.tsx#:~:text=onAppLeave), [visualize_editor_common.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/visualize_app/components/visualize_editor_common.tsx#:~:text=onAppLeave), [app.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/visualize_app/app.tsx#:~:text=onAppLeave), [index.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/visualize_app/index.tsx#:~:text=onAppLeave) | - | +| | [display_duplicate_title_confirm_modal.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/utils/saved_objects_utils/display_duplicate_title_confirm_modal.ts#:~:text=SavedObject), [display_duplicate_title_confirm_modal.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/utils/saved_objects_utils/display_duplicate_title_confirm_modal.ts#:~:text=SavedObject), [check_for_duplicate_title.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/utils/saved_objects_utils/check_for_duplicate_title.ts#:~:text=SavedObject), [check_for_duplicate_title.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/utils/saved_objects_utils/check_for_duplicate_title.ts#:~:text=SavedObject) | 8.8.0 | +| | [visualize_listing.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/visualize_app/components/visualize_listing.tsx#:~:text=settings), [visualize_listing.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/visualize_app/components/visualize_listing.tsx#:~:text=settings) | 8.8.0 | +| | [visualize_top_nav.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/visualize_app/components/visualize_top_nav.tsx#:~:text=onAppLeave), [visualize_editor_common.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/visualize_app/components/visualize_editor_common.tsx#:~:text=onAppLeave), [app.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/visualize_app/app.tsx#:~:text=onAppLeave), [index.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/visualize_app/index.tsx#:~:text=onAppLeave), [app.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/target/types/public/visualize_app/app.d.ts#:~:text=onAppLeave), [index.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/target/types/public/visualize_app/index.d.ts#:~:text=onAppLeave), [visualize_editor_common.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/target/types/public/visualize_app/components/visualize_editor_common.d.ts#:~:text=onAppLeave), [visualize_top_nav.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/target/types/public/visualize_app/components/visualize_top_nav.d.ts#:~:text=onAppLeave) | 8.8.0 | @@ -834,4 +772,4 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/watcher/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/watcher/public/plugin.ts#:~:text=license%24) | - | \ No newline at end of file +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/watcher/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/watcher/public/plugin.ts#:~:text=license%24) | 8.8.0 | \ No newline at end of file diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index c7bd86aaca030b..4fe753af4b2b67 100644 --- a/api_docs/deprecations_by_team.mdx +++ b/api_docs/deprecations_by_team.mdx @@ -3,7 +3,7 @@ id: kibDevDocsDeprecationsDueByTeam slug: /kibana-dev-docs/api-meta/deprecations-due-by-team title: Deprecated APIs due to be removed, by team summary: Lists the teams that are referencing deprecated APIs with a remove by date. -date: 2022-03-15 +date: 2022-03-24 tags: ['contributor', 'dev', 'apidocs', 'kibana'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. --- @@ -14,6 +14,10 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Plugin | Deprecated API | Reference location(s) | Remove By | | --------|-------|-----------|-----------| | apm | | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/public/components/shared/kuery_bar/index.tsx#:~:text=esKuery), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/public/components/shared/kuery_bar/index.tsx#:~:text=esKuery), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/public/components/shared/kuery_bar/index.tsx#:~:text=esKuery) | 8.1 | +| apm | | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/public/plugin.ts#:~:text=environment) | 8.8.0 | +| apm | | [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode)+ 2 more | 8.8.0 | +| apm | | [license_context.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/public/context/license/license_context.tsx#:~:text=license%24) | 8.8.0 | +| apm | | [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode)+ 2 more | 8.8.0 | @@ -24,13 +28,14 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | dataViews | | [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType)+ 13 more | 8.2 | | dataViews | | [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType)+ 66 more | 8.2 | | dataViews | | [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/utils.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [data_view_field.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [field_list.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/field_list.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/types.ts#:~:text=IFieldType)+ 13 more | 8.2 | -| dataEnhanced | | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/types.ts#:~:text=KueryNode), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/types.ts#:~:text=KueryNode), [get_search_session_page.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/get_search_session_page.ts#:~:text=KueryNode), [get_search_session_page.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/get_search_session_page.ts#:~:text=KueryNode), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=KueryNode), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=KueryNode), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=KueryNode), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=KueryNode), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=KueryNode), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=KueryNode) | 8.1 | -| dataEnhanced | | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/types.ts#:~:text=KueryNode), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/types.ts#:~:text=KueryNode), [get_search_session_page.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/get_search_session_page.ts#:~:text=KueryNode), [get_search_session_page.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/get_search_session_page.ts#:~:text=KueryNode), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=KueryNode), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=KueryNode), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=KueryNode), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=KueryNode), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=KueryNode), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=KueryNode) | 8.1 | +| dataEnhanced | | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/types.ts#:~:text=KueryNode), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/types.ts#:~:text=KueryNode), [get_search_session_page.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/get_search_session_page.ts#:~:text=KueryNode), [get_search_session_page.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/get_search_session_page.ts#:~:text=KueryNode), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=KueryNode), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=KueryNode), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=KueryNode), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=KueryNode), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=KueryNode), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=KueryNode)+ 2 more | 8.1 | | dataEnhanced | | [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=nodeBuilder), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=nodeBuilder), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=nodeBuilder), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=nodeBuilder), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=nodeBuilder), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=nodeBuilder), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=nodeBuilder), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=nodeBuilder), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=nodeBuilder), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=nodeBuilder)+ 2 more | 8.1 | -| dataEnhanced | | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/types.ts#:~:text=KueryNode), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/types.ts#:~:text=KueryNode), [get_search_session_page.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/get_search_session_page.ts#:~:text=KueryNode), [get_search_session_page.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/get_search_session_page.ts#:~:text=KueryNode), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=KueryNode), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=KueryNode), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=KueryNode), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=KueryNode), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=KueryNode), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=KueryNode) | 8.1 | +| dataEnhanced | | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/types.ts#:~:text=KueryNode), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/types.ts#:~:text=KueryNode), [get_search_session_page.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/get_search_session_page.ts#:~:text=KueryNode), [get_search_session_page.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/get_search_session_page.ts#:~:text=KueryNode), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=KueryNode), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=KueryNode), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=KueryNode), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=KueryNode), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=KueryNode), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=KueryNode)+ 2 more | 8.1 | +| dataEnhanced | | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/types.ts#:~:text=KueryNode), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/types.ts#:~:text=KueryNode), [get_search_session_page.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/get_search_session_page.ts#:~:text=KueryNode), [get_search_session_page.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/get_search_session_page.ts#:~:text=KueryNode), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=KueryNode), [check_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_persisted_sessions.ts#:~:text=KueryNode), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=KueryNode), [check_non_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/check_non_persisted_sessions.ts#:~:text=KueryNode), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=KueryNode), [expire_persisted_sessions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/data_enhanced/server/search/session/expire_persisted_sessions.ts#:~:text=KueryNode)+ 2 more | 8.1 | | urlDrilldown | | [context_variables.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/drilldowns/url_drilldown/public/lib/variables/context_variables.ts#:~:text=Filter), [context_variables.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/drilldowns/url_drilldown/public/lib/variables/context_variables.ts#:~:text=Filter), [url_drilldown.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/drilldowns/url_drilldown/public/lib/url_drilldown.tsx#:~:text=Filter), [url_drilldown.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/drilldowns/url_drilldown/public/lib/url_drilldown.tsx#:~:text=Filter), [data.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/drilldowns/url_drilldown/public/lib/test/data.ts#:~:text=Filter), [data.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/drilldowns/url_drilldown/public/lib/test/data.ts#:~:text=Filter) | 8.1 | | urlDrilldown | | [context_variables.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/drilldowns/url_drilldown/public/lib/variables/context_variables.ts#:~:text=Filter), [context_variables.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/drilldowns/url_drilldown/public/lib/variables/context_variables.ts#:~:text=Filter), [url_drilldown.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/drilldowns/url_drilldown/public/lib/url_drilldown.tsx#:~:text=Filter), [url_drilldown.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/drilldowns/url_drilldown/public/lib/url_drilldown.tsx#:~:text=Filter), [data.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/drilldowns/url_drilldown/public/lib/test/data.ts#:~:text=Filter), [data.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/drilldowns/url_drilldown/public/lib/test/data.ts#:~:text=Filter) | 8.1 | | urlDrilldown | | [context_variables.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/drilldowns/url_drilldown/public/lib/variables/context_variables.ts#:~:text=Filter), [context_variables.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/drilldowns/url_drilldown/public/lib/variables/context_variables.ts#:~:text=Filter), [url_drilldown.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/drilldowns/url_drilldown/public/lib/url_drilldown.tsx#:~:text=Filter), [url_drilldown.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/drilldowns/url_drilldown/public/lib/url_drilldown.tsx#:~:text=Filter), [data.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/drilldowns/url_drilldown/public/lib/test/data.ts#:~:text=Filter), [data.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/drilldowns/url_drilldown/public/lib/test/data.ts#:~:text=Filter) | 8.1 | +| embeddable | | [attribute_service.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx#:~:text=SavedObjectSaveModal), [attribute_service.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx#:~:text=SavedObjectSaveModal) | 8.8.0 | @@ -39,17 +44,31 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Plugin | Deprecated API | Reference location(s) | Remove By | | --------|-------|-----------|-----------| | graph | | [search_bar.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/components/search_bar.tsx#:~:text=esKuery), [search_bar.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/components/search_bar.tsx#:~:text=esKuery), [search_bar.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/components/search_bar.tsx#:~:text=esKuery) | 8.1 | +| graph | | [save_modal.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/components/save_modal.tsx#:~:text=SavedObjectSaveModal), [save_modal.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/components/save_modal.tsx#:~:text=SavedObjectSaveModal), [on_save_search.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx#:~:text=SavedObjectSaveModal), [on_save_search.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx#:~:text=SavedObjectSaveModal) | 8.8.0 | +| graph | | [listing_route.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/apps/listing_route.tsx#:~:text=settings), [listing_route.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/public/apps/listing_route.tsx#:~:text=settings) | 8.8.0 | +| graph | | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/graph/server/plugin.ts#:~:text=license%24) | 8.8.0 | | discover | | [anchor.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/anchor.ts#:~:text=fetch), [fetch_hits_in_interval.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/utils/fetch_hits_in_interval.ts#:~:text=fetch) | 8.1 | | discover | | [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=esFilters), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=esFilters), [explore_data_chart_action.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.ts#:~:text=esFilters), [explore_data_chart_action.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.ts#:~:text=esFilters) | 8.1 | -| discover | | [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=Filter), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=Filter), [explore_data_context_menu_action.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_context_menu_action.ts#:~:text=Filter), [explore_data_context_menu_action.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_context_menu_action.ts#:~:text=Filter), [explore_data_chart_action.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts#:~:text=Filter), [explore_data_chart_action.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts#:~:text=Filter), [explore_data_chart_action.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts#:~:text=Filter) | 8.1 | -| discover | | [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=Filter), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=Filter), [explore_data_context_menu_action.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_context_menu_action.ts#:~:text=Filter), [explore_data_context_menu_action.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_context_menu_action.ts#:~:text=Filter), [explore_data_chart_action.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts#:~:text=Filter), [explore_data_chart_action.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts#:~:text=Filter), [explore_data_chart_action.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts#:~:text=Filter) | 8.1 | +| discover | | [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=Filter), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [explore_data_context_menu_action.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_context_menu_action.ts#:~:text=Filter), [explore_data_context_menu_action.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_context_menu_action.ts#:~:text=Filter), [explore_data_chart_action.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts#:~:text=Filter), [explore_data_chart_action.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts#:~:text=Filter), [explore_data_chart_action.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts#:~:text=Filter) | 8.1 | +| discover | | [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=Filter), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [explore_data_context_menu_action.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_context_menu_action.ts#:~:text=Filter), [explore_data_context_menu_action.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_context_menu_action.ts#:~:text=Filter), [explore_data_chart_action.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts#:~:text=Filter), [explore_data_chart_action.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts#:~:text=Filter), [explore_data_chart_action.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts#:~:text=Filter) | 8.1 | | discover | | [anchor.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/anchor.ts#:~:text=fetch), [fetch_hits_in_interval.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/utils/fetch_hits_in_interval.ts#:~:text=fetch) | 8.1 | -| discover | | [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=Filter), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=Filter), [explore_data_context_menu_action.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_context_menu_action.ts#:~:text=Filter), [explore_data_context_menu_action.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_context_menu_action.ts#:~:text=Filter), [explore_data_chart_action.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts#:~:text=Filter), [explore_data_chart_action.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts#:~:text=Filter), [explore_data_chart_action.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts#:~:text=Filter) | 8.1 | +| discover | | [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=Filter), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [context_state.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/context/services/context_state.test.ts#:~:text=Filter), [explore_data_context_menu_action.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_context_menu_action.ts#:~:text=Filter), [explore_data_context_menu_action.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_context_menu_action.ts#:~:text=Filter), [explore_data_chart_action.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts#:~:text=Filter), [explore_data_chart_action.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts#:~:text=Filter), [explore_data_chart_action.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts#:~:text=Filter) | 8.1 | | discoverEnhanced | | [explore_data_chart_action.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts#:~:text=RangeFilter), [explore_data_chart_action.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts#:~:text=RangeFilter) | 8.1 | | discoverEnhanced | | [explore_data_chart_action.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts#:~:text=RangeFilter), [explore_data_chart_action.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.test.ts#:~:text=RangeFilter) | 8.1 | +## Fleet + +| Plugin | Deprecated API | Reference location(s) | Remove By | +| --------|-------|-----------|-----------| +| fleet | | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/server/plugin.ts#:~:text=disabled) | 8.8.0 | +| fleet | | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/server/plugin.ts#:~:text=disabled) | 8.8.0 | +| fleet | | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/server/plugin.ts#:~:text=disabled) | 8.8.0 | +| fleet | | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/public/applications/integrations/index.tsx#:~:text=appBasePath), [index.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/target/types/public/applications/integrations/index.d.ts#:~:text=appBasePath) | 8.8.0 | + + + ## GIS | Plugin | Deprecated API | Reference location(s) | Remove By | @@ -60,6 +79,21 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | maps | | [can_skip_fetch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/util/can_skip_fetch.test.ts#:~:text=Filter), [can_skip_fetch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/util/can_skip_fetch.test.ts#:~:text=Filter), [can_skip_fetch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/util/can_skip_fetch.test.ts#:~:text=Filter), [can_skip_fetch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/util/can_skip_fetch.test.ts#:~:text=Filter) | 8.1 | | maps | | [es_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_source/es_source.ts#:~:text=fetch), [es_search_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=fetch), [es_search_source.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx#:~:text=fetch) | 8.1 | | maps | | [can_skip_fetch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/util/can_skip_fetch.test.ts#:~:text=Filter), [can_skip_fetch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/util/can_skip_fetch.test.ts#:~:text=Filter), [can_skip_fetch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/util/can_skip_fetch.test.ts#:~:text=Filter), [can_skip_fetch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/util/can_skip_fetch.test.ts#:~:text=Filter) | 8.1 | +| maps | | [maps_list_view.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/routes/list_page/maps_list_view.tsx#:~:text=settings), [maps_list_view.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/routes/list_page/maps_list_view.tsx#:~:text=settings), [maps_list_view.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/routes/list_page/maps_list_view.tsx#:~:text=settings) | 8.8.0 | +| maps | | [render_app.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/render_app.tsx#:~:text=onAppLeave), [map_app.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx#:~:text=onAppLeave), [map_page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/routes/map_page/map_page.tsx#:~:text=onAppLeave), [render_app.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/public/render_app.d.ts#:~:text=onAppLeave), [map_page.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/public/routes/map_page/map_page.d.ts#:~:text=onAppLeave), [map_app.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/target/types/public/routes/map_page/map_app/map_app.d.ts#:~:text=onAppLeave) | 8.8.0 | +| maps | | [saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/server/saved_objects/saved_object_migrations.ts#:~:text=warning) | 8.8.0 | +| mapsEms | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/maps_ems/server/index.ts#:~:text=license%24) | 8.8.0 | +| mapsEms | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/maps_ems/server/index.ts#:~:text=refresh) | 8.8.0 | + + + +## Kibana Core + +| Plugin | Deprecated API | Reference location(s) | Remove By | +| --------|-------|-----------|-----------| +| cloud | | [plugin.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cloud/public/plugin.tsx#:~:text=environment) | 8.8.0 | +| savedObjectsTaggingOss | | [api.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_tagging_oss/public/api.ts#:~:text=SavedObject), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_tagging_oss/public/decorator/types.ts#:~:text=SavedObject), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_tagging_oss/public/decorator/types.ts#:~:text=SavedObject), [api.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_tagging_oss/public/api.ts#:~:text=SavedObject), [api.ts](https://github.com/elastic/kibana/tree/master/src/plugins/saved_objects_tagging_oss/public/api.ts#:~:text=SavedObject) | 8.8.0 | +| kibanaOverview | | [application.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/kibana_overview/public/application.tsx#:~:text=appBasePath) | 8.8.0 | @@ -67,11 +101,73 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Plugin | Deprecated API | Reference location(s) | Remove By | | --------|-------|-----------|-----------| -| inputControlVis | | [list_control_factory.ts](https://github.com/elastic/kibana/tree/master/src/plugins/input_control_vis/public/control/list_control_factory.ts#:~:text=fetch), [range_control_factory.ts](https://github.com/elastic/kibana/tree/master/src/plugins/input_control_vis/public/control/range_control_factory.ts#:~:text=fetch) | 8.1 | -| inputControlVis | | [list_control_factory.ts](https://github.com/elastic/kibana/tree/master/src/plugins/input_control_vis/public/control/list_control_factory.ts#:~:text=fetch), [range_control_factory.ts](https://github.com/elastic/kibana/tree/master/src/plugins/input_control_vis/public/control/range_control_factory.ts#:~:text=fetch) | 8.1 | | dashboard | | [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=Filter), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter)+ 5 more | 8.1 | | dashboard | | [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=Filter), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter)+ 5 more | 8.1 | | dashboard | | [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=Filter), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter)+ 5 more | 8.1 | +| dashboard | | [saved_objects.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/services/saved_objects.ts#:~:text=SavedObjectSaveModal), [save_modal.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/top_nav/save_modal.tsx#:~:text=SavedObjectSaveModal), [save_modal.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/top_nav/save_modal.tsx#:~:text=SavedObjectSaveModal), [saved_object_save_modal_dashboard.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/presentation_util/public/components/saved_object_save_modal_dashboard.tsx#:~:text=SavedObjectSaveModal), [saved_object_save_modal_dashboard.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/presentation_util/public/components/saved_object_save_modal_dashboard.tsx#:~:text=SavedObjectSaveModal) | 8.8.0 | +| dashboard | | [saved_object_loader.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/services/saved_object_loader.ts#:~:text=SavedObject), [saved_object_loader.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/services/saved_object_loader.ts#:~:text=SavedObject), [saved_object_loader.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/services/saved_object_loader.ts#:~:text=SavedObject), [saved_objects.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/services/saved_objects.ts#:~:text=SavedObject), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=SavedObject), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=SavedObject), [dashboard_tagging.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts#:~:text=SavedObject), [dashboard_tagging.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject)+ 1 more | 8.8.0 | +| dashboard | | [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=SavedObjectClass) | 8.8.0 | +| dashboard | | [dashboard_listing.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/listing/dashboard_listing.tsx#:~:text=settings), [dashboard_listing.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/listing/dashboard_listing.tsx#:~:text=settings) | 8.8.0 | +| dashboard | | [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/types.ts#:~:text=onAppLeave), [dashboard_router.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/dashboard_router.tsx#:~:text=onAppLeave), [plugin.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/plugin.tsx#:~:text=onAppLeave), [types.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/target/types/public/types.d.ts#:~:text=onAppLeave) | 8.8.0 | +| dashboard | | [migrations_730.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/server/saved_objects/migrations_730.ts#:~:text=warning), [migrations_730.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/server/saved_objects/migrations_730.ts#:~:text=warning) | 8.8.0 | +| inputControlVis | | [list_control_factory.ts](https://github.com/elastic/kibana/tree/master/src/plugins/input_control_vis/public/control/list_control_factory.ts#:~:text=fetch), [range_control_factory.ts](https://github.com/elastic/kibana/tree/master/src/plugins/input_control_vis/public/control/range_control_factory.ts#:~:text=fetch) | 8.1 | +| inputControlVis | | [list_control_factory.ts](https://github.com/elastic/kibana/tree/master/src/plugins/input_control_vis/public/control/list_control_factory.ts#:~:text=fetch), [range_control_factory.ts](https://github.com/elastic/kibana/tree/master/src/plugins/input_control_vis/public/control/range_control_factory.ts#:~:text=fetch) | 8.1 | + + + +## Kibana Telemetry + +| Plugin | Deprecated API | Reference location(s) | Remove By | +| --------|-------|-----------|-----------| +| kibanaUsageCollection | | [ops_stats_collector.ts](https://github.com/elastic/kibana/tree/master/src/plugins/kibana_usage_collection/server/collectors/ops_stats/ops_stats_collector.ts#:~:text=process) | 8.8.0 | + + + +## Logstash + +| Plugin | Deprecated API | Reference location(s) | Remove By | +| --------|-------|-----------|-----------| +| logstash | | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/logstash/public/plugin.ts#:~:text=license%24) | 8.8.0 | + + + +## Machine Learning UI + +| Plugin | Deprecated API | Reference location(s) | Remove By | +| --------|-------|-----------|-----------| +| transform | | [license.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/server/services/license.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/plugin.ts#:~:text=license%24) | 8.8.0 | +| ml | | [check_license.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/license/check_license.tsx#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/plugin.ts#:~:text=license%24) | 8.8.0 | +| ml | | [app.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/app.tsx#:~:text=onAppLeave) | 8.8.0 | +| ml | | [errors.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/common/util/errors/errors.test.ts#:~:text=req), [errors.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/common/util/errors/errors.test.ts#:~:text=req) | 8.8.0 + +Note to maintainers: when looking at usages, mind that typical use could be inside a `catch` block, +so TS and code-reference navigation might not highlight them. | + + + +## Platform Security + +| Plugin | Deprecated API | Reference location(s) | Remove By | +| --------|-------|-----------|-----------| +| security | | [elasticsearch_role.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.ts#:~:text=disabled), [put_payload.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts#:~:text=disabled), [put_payload.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts#:~:text=disabled), [primary_feature_privilege.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/model/primary_feature_privilege.ts#:~:text=disabled), [elasticsearch_role.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.test.ts#:~:text=disabled), [kibana_features.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/__fixtures__/kibana_features.ts#:~:text=disabled), [put.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/put.test.ts#:~:text=disabled), [put_payload.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.test.ts#:~:text=disabled) | 8.8.0 | +| security | | [disable_ui_capabilities.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/disable_ui_capabilities.ts#:~:text=requiredRoles) | 8.8.0 + +This is relied on by the reporting feature, and should be removed once reporting +migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/issues/19914 | +| security | | [elasticsearch_role.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.ts#:~:text=disabled), [put_payload.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts#:~:text=disabled), [put_payload.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts#:~:text=disabled), [primary_feature_privilege.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/model/primary_feature_privilege.ts#:~:text=disabled), [elasticsearch_role.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.test.ts#:~:text=disabled), [kibana_features.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/__fixtures__/kibana_features.ts#:~:text=disabled), [put.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/put.test.ts#:~:text=disabled), [put_payload.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.test.ts#:~:text=disabled) | 8.8.0 | +| security | | [elasticsearch_role.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.ts#:~:text=disabled), [put_payload.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts#:~:text=disabled), [put_payload.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts#:~:text=disabled), [primary_feature_privilege.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/model/primary_feature_privilege.ts#:~:text=disabled), [elasticsearch_role.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.test.ts#:~:text=disabled), [kibana_features.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/management/roles/__fixtures__/kibana_features.ts#:~:text=disabled), [put.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/put.test.ts#:~:text=disabled), [put_payload.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.test.ts#:~:text=disabled) | 8.8.0 | +| security | | [disable_ui_capabilities.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/disable_ui_capabilities.ts#:~:text=requiredRoles) | 8.8.0 + +This is relied on by the reporting feature, and should be removed once reporting +migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/issues/19914 | +| security | | [app_authorization.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/app_authorization.ts#:~:text=getKibanaFeatures), [privileges.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/privileges/privileges.ts#:~:text=getKibanaFeatures), [authorization_service.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/authorization_service.tsx#:~:text=getKibanaFeatures), [app_authorization.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/app_authorization.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures), [privileges.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts#:~:text=getKibanaFeatures)+ 17 more | 8.8.0 | +| security | | [authorization_service.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/authorization/authorization_service.tsx#:~:text=getElasticsearchFeatures) | 8.8.0 | +| security | | [license_service.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/common/licensing/license_service.test.ts#:~:text=mode), [license_service.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/common/licensing/license_service.test.ts#:~:text=mode) | 8.8.0 | +| security | | [plugin.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/plugin.tsx#:~:text=license%24) | 8.8.0 | +| security | | [license_service.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/common/licensing/license_service.test.ts#:~:text=mode), [license_service.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/common/licensing/license_service.test.ts#:~:text=mode) | 8.8.0 | +| security | | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/server/plugin.ts#:~:text=license%24), [spaces_usage_collector.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/spaces/server/usage_collection/spaces_usage_collector.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/spaces/server/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/spaces/server/plugin.ts#:~:text=license%24), [spaces_usage_collector.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/spaces/server/usage_collection/spaces_usage_collector.test.ts#:~:text=license%24) | 8.8.0 | +| security | | [logout_app.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/authentication/logout/logout_app.test.ts#:~:text=appBasePath) | 8.8.0 | +| security | | [logout_app.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security/public/authentication/logout/logout_app.test.ts#:~:text=onAppLeave) | 8.8.0 | @@ -79,12 +175,48 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Plugin | Deprecated API | Reference location(s) | Remove By | | --------|-------|-----------|-----------| -| stackAlerts | | [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=IFieldType), [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=IFieldType)+ 14 more | 8.2 | -| stackAlerts | | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=esKuery), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=esKuery) | 8.1 | -| stackAlerts | | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=esQuery), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/index.tsx#:~:text=esQuery) | 8.1 | -| stackAlerts | | [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=IFieldType), [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=IFieldType)+ 38 more | 8.2 | -| stackAlerts | | [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [single_field_select.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx#:~:text=IFieldType), [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=IFieldType), [entity_index_expression.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/expressions/entity_index_expression.tsx#:~:text=IFieldType)+ 14 more | 8.2 | -| alerting | | [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode) | 8.1 | -| alerting | | [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode) | 8.1 | -| alerting | | [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=nodeBuilder), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=nodeBuilder), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=nodeBuilder), [find_and_cleanup_tasks.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/cleanup_failed_executions/find_and_cleanup_tasks.ts#:~:text=nodeBuilder), [find_and_cleanup_tasks.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/cleanup_failed_executions/find_and_cleanup_tasks.ts#:~:text=nodeBuilder), [find_and_cleanup_tasks.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/cleanup_failed_executions/find_and_cleanup_tasks.ts#:~:text=nodeBuilder), [find_and_cleanup_tasks.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/cleanup_failed_executions/find_and_cleanup_tasks.ts#:~:text=nodeBuilder), [find_and_cleanup_tasks.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/cleanup_failed_executions/find_and_cleanup_tasks.ts#:~:text=nodeBuilder) | 8.1 | -| alerting | | [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode), [rules_client.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/rules_client/rules_client.ts#:~:text=KueryNode) | 8.1 | \ No newline at end of file +| alerting | | [plugin.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/plugin.test.ts#:~:text=getKibanaFeatures) | 8.8.0 | +| alerting | | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/plugin.ts#:~:text=license%24), [license_state.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/lib/license_state.test.ts#:~:text=license%24), [license_state.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerting/server/lib/license_state.test.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/plugin.ts#:~:text=license%24), [license_state.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/lib/license_state.test.ts#:~:text=license%24), [license_state.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions/server/lib/license_state.test.ts#:~:text=license%24) | 8.8.0 | + + + +## Security solution + +| Plugin | Deprecated API | Reference location(s) | Remove By | +| --------|-------|-----------|-----------| +| securitySolution | | [policy_config.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [isolation.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.test.ts#:~:text=mode), [isolation.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.test.ts#:~:text=mode)+ 2 more | 8.8.0 | +| securitySolution | | [policy_config.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [isolation.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.test.ts#:~:text=mode), [isolation.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.test.ts#:~:text=mode)+ 2 more | 8.8.0 | +| securitySolution | | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/index.tsx#:~:text=onAppLeave) | 8.8.0 | +| securitySolution | | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/components/flyout/index.tsx#:~:text=AppLeaveHandler), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/components/flyout/index.tsx#:~:text=AppLeaveHandler), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/home/template_wrapper/bottom_bar/index.tsx#:~:text=AppLeaveHandler), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/home/template_wrapper/bottom_bar/index.tsx#:~:text=AppLeaveHandler), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/home/template_wrapper/index.tsx#:~:text=AppLeaveHandler), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/home/template_wrapper/index.tsx#:~:text=AppLeaveHandler), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/home/index.tsx#:~:text=AppLeaveHandler), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/home/index.tsx#:~:text=AppLeaveHandler), [routes.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/routes.tsx#:~:text=AppLeaveHandler), [routes.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/routes.tsx#:~:text=AppLeaveHandler)+ 3 more | 8.8.0 | + + + +## Stack Management + +| Plugin | Deprecated API | Reference location(s) | Remove By | +| --------|-------|-----------|-----------| +| upgradeAssistant | | [reindex_service.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts#:~:text=license%24), [reindex_service.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts#:~:text=license%24), [reindex_service.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts#:~:text=license%24), [license.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/painless_lab/server/services/license.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/searchprofiler/server/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/remote_clusters/server/plugin.ts#:~:text=license%24), [license.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_lifecycle_management/server/services/license.ts#:~:text=license%24), [license.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/rollup/server/services/license.ts#:~:text=license%24), [license.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/snapshot_restore/server/services/license.ts#:~:text=license%24) | 8.8.0 | +| licenseManagement | | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/license_management/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cross_cluster_replication/public/plugin.ts#:~:text=license%24), [plugin.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/painless_lab/public/plugin.tsx#:~:text=license%24), [plugin.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/painless_lab/public/plugin.tsx#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/searchprofiler/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/searchprofiler/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/watcher/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/watcher/public/plugin.ts#:~:text=license%24) | 8.8.0 | + + + +## Stack Monitoring + +| Plugin | Deprecated API | Reference location(s) | Remove By | +| --------|-------|-----------|-----------| +| monitoring | | [legacy_shims.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/legacy_shims.ts#:~:text=injectedMetadata) | 8.8.0 | +| monitoring | | [bulk_uploader.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/server/kibana_monitoring/bulk_uploader.ts#:~:text=process) | 8.8.0 | + + + +## Vis Editors + +| Plugin | Deprecated API | Reference location(s) | Remove By | +| --------|-------|-----------|-----------| +| lens | | [display_duplicate_title_confirm_modal.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/persistence/saved_objects_utils/display_duplicate_title_confirm_modal.ts#:~:text=SavedObject), [display_duplicate_title_confirm_modal.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/persistence/saved_objects_utils/display_duplicate_title_confirm_modal.ts#:~:text=SavedObject), [check_for_duplicate_title.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/persistence/saved_objects_utils/check_for_duplicate_title.ts#:~:text=SavedObject), [check_for_duplicate_title.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/persistence/saved_objects_utils/check_for_duplicate_title.ts#:~:text=SavedObject), [check_for_duplicate_title.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/public/persistence/saved_objects_utils/check_for_duplicate_title.d.ts#:~:text=SavedObject), [check_for_duplicate_title.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/public/persistence/saved_objects_utils/check_for_duplicate_title.d.ts#:~:text=SavedObject), [display_duplicate_title_confirm_modal.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/public/persistence/saved_objects_utils/display_duplicate_title_confirm_modal.d.ts#:~:text=SavedObject), [display_duplicate_title_confirm_modal.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/public/persistence/saved_objects_utils/display_duplicate_title_confirm_modal.d.ts#:~:text=SavedObject), [display_duplicate_title_confirm_modal.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/utils/saved_objects_utils/display_duplicate_title_confirm_modal.ts#:~:text=SavedObject), [display_duplicate_title_confirm_modal.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/utils/saved_objects_utils/display_duplicate_title_confirm_modal.ts#:~:text=SavedObject)+ 2 more | 8.8.0 | +| lens | | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/app_plugin/types.ts#:~:text=onAppLeave), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/app_plugin/types.ts#:~:text=onAppLeave), [mounter.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/app_plugin/mounter.tsx#:~:text=onAppLeave), [visualize_top_nav.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/visualize_app/components/visualize_top_nav.tsx#:~:text=onAppLeave), [visualize_editor_common.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/visualize_app/components/visualize_editor_common.tsx#:~:text=onAppLeave), [app.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/visualize_app/app.tsx#:~:text=onAppLeave), [index.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/visualize_app/index.tsx#:~:text=onAppLeave), [app.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/target/types/public/visualize_app/app.d.ts#:~:text=onAppLeave), [index.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/target/types/public/visualize_app/index.d.ts#:~:text=onAppLeave), [visualize_editor_common.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/target/types/public/visualize_app/components/visualize_editor_common.d.ts#:~:text=onAppLeave)+ 1 more | 8.8.0 | +| lens | | [saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/migrations/saved_object_migrations.ts#:~:text=warning), [saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/migrations/saved_object_migrations.ts#:~:text=warning) | 8.8.0 | +| visualizations | | [visualize_listing.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/visualize_app/components/visualize_listing.tsx#:~:text=settings), [visualize_listing.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/visualize_app/components/visualize_listing.tsx#:~:text=settings) | 8.8.0 | +| management | | [application.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/management/public/application.tsx#:~:text=appBasePath), [application.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/management/target/types/public/application.d.ts#:~:text=appBasePath) | 8.8.0 | +| visTypeVega | | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/plugin.ts#:~:text=injectedMetadata) | 8.8.0 | +| visTypeVega | | [search_api.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/data_model/search_api.ts#:~:text=injectedMetadata), [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/plugin.ts#:~:text=injectedMetadata), [search_api.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/target/types/public/data_model/search_api.d.ts#:~:text=injectedMetadata) | 8.8.0 | \ No newline at end of file diff --git a/api_docs/elastic_analytics.devdocs.json b/api_docs/elastic_analytics.devdocs.json new file mode 100644 index 00000000000000..3196e48dea329f --- /dev/null +++ b/api_docs/elastic_analytics.devdocs.json @@ -0,0 +1,1660 @@ +{ + "id": "@elastic/analytics", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.createAnalytics", + "type": "Function", + "tags": [], + "label": "createAnalytics", + "description": [ + "\nCreates an {@link AnalyticsClient}." + ], + "signature": [ + "(initContext: ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.AnalyticsClientInitContext", + "text": "AnalyticsClientInitContext" + }, + ") => ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.IAnalyticsClient", + "text": "IAnalyticsClient" + } + ], + "path": "packages/elastic-analytics/src/index.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.createAnalytics.$1", + "type": "Object", + "tags": [], + "label": "initContext", + "description": [ + "The initial context to create the client {@link AnalyticsClientInitContext }" + ], + "signature": [ + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.AnalyticsClientInitContext", + "text": "AnalyticsClientInitContext" + } + ], + "path": "packages/elastic-analytics/src/index.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.AnalyticsClientInitContext", + "type": "Interface", + "tags": [], + "label": "AnalyticsClientInitContext", + "description": [ + "\nGeneral settings of the analytics client" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.AnalyticsClientInitContext.isDev", + "type": "boolean", + "tags": [], + "label": "isDev", + "description": [ + "\nBoolean indicating if it's running in developer mode." + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.AnalyticsClientInitContext.sendTo", + "type": "CompoundType", + "tags": [], + "label": "sendTo", + "description": [ + "\nSpecify if the shippers should send their data to the production or staging environments." + ], + "signature": [ + "\"staging\" | \"production\"" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.AnalyticsClientInitContext.logger", + "type": "Object", + "tags": [], + "label": "logger", + "description": [ + "\nApplication-provided logger." + ], + "signature": [ + "Logger" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.ContextProviderOpts", + "type": "Interface", + "tags": [], + "label": "ContextProviderOpts", + "description": [ + "\nDefinition of a context provider" + ], + "signature": [ + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.ContextProviderOpts", + "text": "ContextProviderOpts" + }, + "" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.ContextProviderOpts.context$", + "type": "Object", + "tags": [], + "label": "context$", + "description": [ + "\nObservable that emits the custom context." + ], + "signature": [ + "Observable", + "" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.ContextProviderOpts.schema", + "type": "Object", + "tags": [], + "label": "schema", + "description": [ + "\nSchema declaring and documenting the expected output in the context$\n" + ], + "signature": [ + "{ [Key in keyof Required]: ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaValue", + "text": "SchemaValue" + }, + "; }" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.Event", + "type": "Interface", + "tags": [], + "label": "Event", + "description": [ + "\nDefinition of the full event structure" + ], + "path": "packages/elastic-analytics/src/events/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.Event.timestamp", + "type": "string", + "tags": [], + "label": "timestamp", + "description": [ + "\nThe time the event was generated in ISO format." + ], + "path": "packages/elastic-analytics/src/events/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.Event.event_type", + "type": "string", + "tags": [], + "label": "event_type", + "description": [ + "\nThe event type." + ], + "path": "packages/elastic-analytics/src/events/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.Event.properties", + "type": "Object", + "tags": [], + "label": "properties", + "description": [ + "\nThe specific properties of the event type." + ], + "signature": [ + "{ [x: string]: unknown; }" + ], + "path": "packages/elastic-analytics/src/events/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.Event.context", + "type": "Object", + "tags": [], + "label": "context", + "description": [ + "\nThe {@link EventContext} enriched during the processing pipeline." + ], + "signature": [ + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.EventContext", + "text": "EventContext" + } + ], + "path": "packages/elastic-analytics/src/events/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.EventContext", + "type": "Interface", + "tags": [], + "label": "EventContext", + "description": [], + "path": "packages/elastic-analytics/src/events/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.EventContext.Unnamed", + "type": "IndexSignature", + "tags": [], + "label": "[key: string]: unknown", + "description": [], + "signature": [ + "[key: string]: unknown" + ], + "path": "packages/elastic-analytics/src/events/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.EventTypeOpts", + "type": "Interface", + "tags": [], + "label": "EventTypeOpts", + "description": [ + "\nDefinition of an Event Type." + ], + "signature": [ + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.EventTypeOpts", + "text": "EventTypeOpts" + }, + "" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.EventTypeOpts.eventType", + "type": "string", + "tags": [], + "label": "eventType", + "description": [ + "\nThe event type's unique name." + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.EventTypeOpts.schema", + "type": "Object", + "tags": [], + "label": "schema", + "description": [ + "\nSchema declaring and documenting the expected structure of this event type.\n" + ], + "signature": [ + "{ [Key in keyof Required]: ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaValue", + "text": "SchemaValue" + }, + "; }" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.IAnalyticsClient", + "type": "Interface", + "tags": [], + "label": "IAnalyticsClient", + "description": [ + "\nAnalytics client's public APIs" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.IAnalyticsClient.reportEvent", + "type": "Function", + "tags": [], + "label": "reportEvent", + "description": [ + "\nReports a telemetry event." + ], + "signature": [ + ">(eventType: string, eventData: EventTypeData) => void" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.IAnalyticsClient.reportEvent.$1", + "type": "string", + "tags": [], + "label": "eventType", + "description": [ + "The event type registered via the `registerEventType` API." + ], + "signature": [ + "string" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.IAnalyticsClient.reportEvent.$2", + "type": "Uncategorized", + "tags": [], + "label": "eventData", + "description": [ + "The properties matching the schema declared in the `registerEventType` API." + ], + "signature": [ + "EventTypeData" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.IAnalyticsClient.registerEventType", + "type": "Function", + "tags": [], + "label": "registerEventType", + "description": [ + "\nRegisters the event type that will be emitted via the reportEvent API." + ], + "signature": [ + "(eventTypeOps: ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.EventTypeOpts", + "text": "EventTypeOpts" + }, + ") => void" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.IAnalyticsClient.registerEventType.$1", + "type": "Object", + "tags": [], + "label": "eventTypeOps", + "description": [], + "signature": [ + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.EventTypeOpts", + "text": "EventTypeOpts" + }, + "" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.IAnalyticsClient.registerShipper", + "type": "Function", + "tags": [], + "label": "registerShipper", + "description": [ + "\nSet up the shipper that will be used to report the telemetry events." + ], + "signature": [ + "(Shipper: ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.ShipperClassConstructor", + "text": "ShipperClassConstructor" + }, + ", shipperConfig: ShipperConfig, opts?: ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.RegisterShipperOpts", + "text": "RegisterShipperOpts" + }, + " | undefined) => void" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.IAnalyticsClient.registerShipper.$1", + "type": "Object", + "tags": [], + "label": "Shipper", + "description": [ + "The {@link IShipper } class to instantiate the shipper." + ], + "signature": [ + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.ShipperClassConstructor", + "text": "ShipperClassConstructor" + }, + "" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.IAnalyticsClient.registerShipper.$2", + "type": "Uncategorized", + "tags": [], + "label": "shipperConfig", + "description": [ + "The config specific to the Shipper to instantiate." + ], + "signature": [ + "ShipperConfig" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.IAnalyticsClient.registerShipper.$3", + "type": "Object", + "tags": [], + "label": "opts", + "description": [ + "Additional options to register the shipper {@link RegisterShipperOpts }." + ], + "signature": [ + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.RegisterShipperOpts", + "text": "RegisterShipperOpts" + }, + " | undefined" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.IAnalyticsClient.optIn", + "type": "Function", + "tags": [], + "label": "optIn", + "description": [ + "\nUsed to control the user's consent to report the data.\nIn the advanced mode, it allows to \"cherry-pick\" which events and shippers are enabled/disabled." + ], + "signature": [ + "(optInConfig: ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.OptInConfig", + "text": "OptInConfig" + }, + ") => void" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.IAnalyticsClient.optIn.$1", + "type": "Object", + "tags": [], + "label": "optInConfig", + "description": [ + "{@link OptInConfig }" + ], + "signature": [ + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.OptInConfig", + "text": "OptInConfig" + } + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.IAnalyticsClient.registerContextProvider", + "type": "Function", + "tags": [], + "label": "registerContextProvider", + "description": [ + "\nRegisters the context provider to enrich the any reported events." + ], + "signature": [ + "(contextProviderOpts: ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.ContextProviderOpts", + "text": "ContextProviderOpts" + }, + ") => void" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.IAnalyticsClient.registerContextProvider.$1", + "type": "Object", + "tags": [], + "label": "contextProviderOpts", + "description": [ + "{@link ContextProviderOpts }" + ], + "signature": [ + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.ContextProviderOpts", + "text": "ContextProviderOpts" + }, + "" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.IAnalyticsClient.telemetryCounter$", + "type": "Object", + "tags": [], + "label": "telemetryCounter$", + "description": [ + "\nObservable to emit the stats of the processed events." + ], + "signature": [ + "Observable", + "<", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.TelemetryCounter", + "text": "TelemetryCounter" + }, + ">" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.IShipper", + "type": "Interface", + "tags": [], + "label": "IShipper", + "description": [ + "\nBasic structure of a Shipper" + ], + "path": "packages/elastic-analytics/src/shippers/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.IShipper.reportEvents", + "type": "Function", + "tags": [], + "label": "reportEvents", + "description": [ + "\nAdapts and ships the event to the persisting/analytics solution." + ], + "signature": [ + "(events: ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.Event", + "text": "Event" + }, + "[]) => void" + ], + "path": "packages/elastic-analytics/src/shippers/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.IShipper.reportEvents.$1", + "type": "Array", + "tags": [], + "label": "events", + "description": [ + "batched events {@link Event }" + ], + "signature": [ + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.Event", + "text": "Event" + }, + "[]" + ], + "path": "packages/elastic-analytics/src/shippers/types.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.IShipper.optIn", + "type": "Function", + "tags": [], + "label": "optIn", + "description": [ + "\nStops/restarts the shipping mechanism based on the value of isOptedIn" + ], + "signature": [ + "(isOptedIn: boolean) => void" + ], + "path": "packages/elastic-analytics/src/shippers/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.IShipper.optIn.$1", + "type": "boolean", + "tags": [], + "label": "isOptedIn", + "description": [ + "`true` for resume sending events. `false` to stop." + ], + "signature": [ + "boolean" + ], + "path": "packages/elastic-analytics/src/shippers/types.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.IShipper.extendContext", + "type": "Function", + "tags": [], + "label": "extendContext", + "description": [ + "\nPerform any necessary calls to the persisting/analytics solution to set the event's context." + ], + "signature": [ + "((newContext: ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.EventContext", + "text": "EventContext" + }, + ") => void) | undefined" + ], + "path": "packages/elastic-analytics/src/shippers/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.IShipper.extendContext.$1", + "type": "Object", + "tags": [], + "label": "newContext", + "description": [], + "signature": [ + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.EventContext", + "text": "EventContext" + } + ], + "path": "packages/elastic-analytics/src/shippers/types.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.IShipper.telemetryCounter$", + "type": "Object", + "tags": [], + "label": "telemetryCounter$", + "description": [ + "\nObservable to emit the stats of the processed events." + ], + "signature": [ + "Observable", + "<", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.TelemetryCounter", + "text": "TelemetryCounter" + }, + "> | undefined" + ], + "path": "packages/elastic-analytics/src/shippers/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.OptInConfig", + "type": "Interface", + "tags": [], + "label": "OptInConfig", + "description": [ + "\n" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.OptInConfig.global", + "type": "Object", + "tags": [], + "label": "global", + "description": [ + "\nControls the global enabled/disabled behaviour of the client and shippers." + ], + "signature": [ + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.OptInConfigPerType", + "text": "OptInConfigPerType" + } + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.OptInConfig.event_types", + "type": "Object", + "tags": [], + "label": "event_types", + "description": [ + "\nControls if an event type should be disabled for a specific type of shipper." + ], + "signature": [ + "Record | undefined" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.OptInConfigPerType", + "type": "Interface", + "tags": [], + "label": "OptInConfigPerType", + "description": [ + "\nSets whether a type of event is enabled/disabled globally or per shipper." + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.OptInConfigPerType.enabled", + "type": "boolean", + "tags": [], + "label": "enabled", + "description": [ + "\nThe event type is globally enabled." + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.OptInConfigPerType.shippers", + "type": "Object", + "tags": [], + "label": "shippers", + "description": [ + "\nControls if an event type should be disabled for a specific type of shipper." + ], + "signature": [ + "Record | undefined" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.RegisterShipperOpts", + "type": "Interface", + "tags": [], + "label": "RegisterShipperOpts", + "description": [ + "\nOptional options to register a shipper" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false, + "children": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.SchemaArray", + "type": "Interface", + "tags": [], + "label": "SchemaArray", + "description": [ + "\nSchema to represent an array" + ], + "signature": [ + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaArray", + "text": "SchemaArray" + }, + " extends ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaMeta", + "text": "SchemaMeta" + }, + "" + ], + "path": "packages/elastic-analytics/src/schema/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.SchemaArray.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "\"array\"" + ], + "path": "packages/elastic-analytics/src/schema/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.SchemaArray.items", + "type": "CompoundType", + "tags": [], + "label": "items", + "description": [], + "signature": [ + "{ type: \"pass_through\"; _meta: { description: string; } & ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaMetaOptional", + "text": "SchemaMetaOptional" + }, + "; } | (unknown extends Value ? ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaArray", + "text": "SchemaArray" + }, + " | ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaObject", + "text": "SchemaObject" + }, + " | ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaChildValue", + "text": "SchemaChildValue" + }, + " : NonNullable extends (infer U)[] ? ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaArray", + "text": "SchemaArray" + }, + " : NonNullable extends object ? ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaObject", + "text": "SchemaObject" + }, + " : ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaChildValue", + "text": "SchemaChildValue" + }, + ")" + ], + "path": "packages/elastic-analytics/src/schema/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.SchemaChildValue", + "type": "Interface", + "tags": [], + "label": "SchemaChildValue", + "description": [], + "signature": [ + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaChildValue", + "text": "SchemaChildValue" + }, + "" + ], + "path": "packages/elastic-analytics/src/schema/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.SchemaChildValue.type", + "type": "Uncategorized", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "NonNullable extends string ? ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.AllowedSchemaStringTypes", + "text": "AllowedSchemaStringTypes" + }, + " : NonNullable extends number ? ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.AllowedSchemaNumberTypes", + "text": "AllowedSchemaNumberTypes" + }, + " : NonNullable extends boolean ? \"boolean\" : ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.AllowedSchemaTypes", + "text": "AllowedSchemaTypes" + } + ], + "path": "packages/elastic-analytics/src/schema/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.SchemaChildValue._meta", + "type": "CompoundType", + "tags": [], + "label": "_meta", + "description": [], + "signature": [ + "{ description: string; } & ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaMetaOptional", + "text": "SchemaMetaOptional" + }, + "" + ], + "path": "packages/elastic-analytics/src/schema/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.SchemaMeta", + "type": "Interface", + "tags": [], + "label": "SchemaMeta", + "description": [ + "\nSchema meta with optional description" + ], + "signature": [ + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaMeta", + "text": "SchemaMeta" + }, + "" + ], + "path": "packages/elastic-analytics/src/schema/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.SchemaMeta._meta", + "type": "CompoundType", + "tags": [], + "label": "_meta", + "description": [], + "signature": [ + "({ description?: string | undefined; } & ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaMetaOptional", + "text": "SchemaMetaOptional" + }, + ") | undefined" + ], + "path": "packages/elastic-analytics/src/schema/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.SchemaObject", + "type": "Interface", + "tags": [], + "label": "SchemaObject", + "description": [ + "\nSchema to represent an object" + ], + "signature": [ + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaObject", + "text": "SchemaObject" + }, + " extends ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaMeta", + "text": "SchemaMeta" + }, + "" + ], + "path": "packages/elastic-analytics/src/schema/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.SchemaObject.properties", + "type": "Object", + "tags": [], + "label": "properties", + "description": [], + "signature": [ + "{ [Key in keyof Required]: ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaValue", + "text": "SchemaValue" + }, + "; }" + ], + "path": "packages/elastic-analytics/src/schema/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.ShipperClassConstructor", + "type": "Interface", + "tags": [], + "label": "ShipperClassConstructor", + "description": [ + "\nConstructor of a {@link IShipper}" + ], + "signature": [ + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.ShipperClassConstructor", + "text": "ShipperClassConstructor" + }, + "" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.ShipperClassConstructor.shipperName", + "type": "string", + "tags": [], + "label": "shipperName", + "description": [ + "\nThe shipper's unique name" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.ShipperClassConstructor.Unnamed", + "type": "Any", + "tags": [], + "label": "Unnamed", + "description": [ + "\nThe constructor" + ], + "signature": [ + "any" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.TelemetryCounter", + "type": "Interface", + "tags": [], + "label": "TelemetryCounter", + "description": [ + "\nShape of the events emitted by the telemetryCounter$ observable" + ], + "path": "packages/elastic-analytics/src/events/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.TelemetryCounter.type", + "type": "CompoundType", + "tags": [], + "label": "type", + "description": [ + "\nIndicates if the event contains data about succeeded, failed or dropped events." + ], + "signature": [ + "\"enqueued\" | \"sent_to_shipper\" | \"succeed\" | \"failed\" | \"dropped\"" + ], + "path": "packages/elastic-analytics/src/events/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.TelemetryCounter.source", + "type": "string", + "tags": [], + "label": "source", + "description": [ + "\nWho emitted the event? It can be \"client\" or the name of the shipper." + ], + "path": "packages/elastic-analytics/src/events/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.TelemetryCounter.event_type", + "type": "string", + "tags": [], + "label": "event_type", + "description": [ + "\nThe event type the success/failure/drop event refers to." + ], + "path": "packages/elastic-analytics/src/events/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.TelemetryCounter.code", + "type": "string", + "tags": [], + "label": "code", + "description": [ + "\nCode to provide additional information about the success or failure. Examples are 200/400/504/ValidationError/UnknownError" + ], + "path": "packages/elastic-analytics/src/events/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.TelemetryCounter.count", + "type": "number", + "tags": [], + "label": "count", + "description": [ + "\nThe number of events that met this event." + ], + "path": "packages/elastic-analytics/src/events/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.AllowedSchemaBooleanTypes", + "type": "Type", + "tags": [], + "label": "AllowedSchemaBooleanTypes", + "description": [ + "Types matching boolean values" + ], + "signature": [ + "\"boolean\"" + ], + "path": "packages/elastic-analytics/src/schema/types.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.AllowedSchemaNumberTypes", + "type": "Type", + "tags": [], + "label": "AllowedSchemaNumberTypes", + "description": [ + "Types matching number values" + ], + "signature": [ + "\"date\" | \"integer\" | \"long\" | \"short\" | \"byte\" | \"float\" | \"double\"" + ], + "path": "packages/elastic-analytics/src/schema/types.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.AllowedSchemaStringTypes", + "type": "Type", + "tags": [], + "label": "AllowedSchemaStringTypes", + "description": [ + "Types matching string values" + ], + "signature": [ + "\"keyword\" | \"date\" | \"text\"" + ], + "path": "packages/elastic-analytics/src/schema/types.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.AllowedSchemaTypes", + "type": "Type", + "tags": [], + "label": "AllowedSchemaTypes", + "description": [ + "\nPossible type values in the schema" + ], + "signature": [ + "\"boolean\" | \"keyword\" | \"date\" | \"text\" | \"integer\" | \"long\" | \"short\" | \"byte\" | \"float\" | \"double\"" + ], + "path": "packages/elastic-analytics/src/schema/types.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.EventType", + "type": "Type", + "tags": [], + "label": "EventType", + "description": [ + "\nEvent Type used for indexed structures. Only used to improve the readability of the types" + ], + "signature": [ + "string" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.PossibleSchemaTypes", + "type": "Type", + "tags": [], + "label": "PossibleSchemaTypes", + "description": [ + "\nHelper to ensure the declared types match the schema types" + ], + "signature": [ + "Value extends string ? ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.AllowedSchemaStringTypes", + "text": "AllowedSchemaStringTypes" + }, + " : Value extends number ? ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.AllowedSchemaNumberTypes", + "text": "AllowedSchemaNumberTypes" + }, + " : Value extends boolean ? \"boolean\" : ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.AllowedSchemaTypes", + "text": "AllowedSchemaTypes" + } + ], + "path": "packages/elastic-analytics/src/schema/types.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.RootSchema", + "type": "Type", + "tags": [], + "label": "RootSchema", + "description": [ + "\nSchema definition to match the structure of the properties provided.\n" + ], + "signature": [ + "{ [Key in keyof Required]: ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaValue", + "text": "SchemaValue" + }, + "; }" + ], + "path": "packages/elastic-analytics/src/schema/types.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.SchemaMetaOptional", + "type": "Type", + "tags": [], + "label": "SchemaMetaOptional", + "description": [ + "\nEnforces { optional: true } if the value can be undefined" + ], + "signature": [ + "unknown extends Value ? { optional?: boolean | undefined; } : undefined extends Value ? { optional: true; } : { optional?: false | undefined; }" + ], + "path": "packages/elastic-analytics/src/schema/types.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.SchemaValue", + "type": "Type", + "tags": [], + "label": "SchemaValue", + "description": [ + "\nType that defines all the possible values that the Schema accepts.\nThese types definitions are helping to identify earlier the possible missing `properties` nesting when\nmanually defining the schemas." + ], + "signature": [ + "{ type: \"pass_through\"; _meta: { description: string; } & ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaMetaOptional", + "text": "SchemaMetaOptional" + }, + "; } | (unknown extends Value ? ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaArray", + "text": "SchemaArray" + }, + " | ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaObject", + "text": "SchemaObject" + }, + " | ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaChildValue", + "text": "SchemaChildValue" + }, + " : NonNullable extends (infer U)[] ? ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaArray", + "text": "SchemaArray" + }, + " : NonNullable extends object ? ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaObject", + "text": "SchemaObject" + }, + " : ", + { + "pluginId": "@elastic/analytics", + "scope": "server", + "docId": "kibElasticAnalyticsPluginApi", + "section": "def-server.SchemaChildValue", + "text": "SchemaChildValue" + }, + ")" + ], + "path": "packages/elastic-analytics/src/schema/types.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/analytics", + "id": "def-server.ShipperName", + "type": "Type", + "tags": [], + "label": "ShipperName", + "description": [ + "\nShipper Name used for indexed structures. Only used to improve the readability of the types" + ], + "signature": [ + "string" + ], + "path": "packages/elastic-analytics/src/analytics_client/types.ts", + "deprecated": false, + "initialIsOpen": false + } + ], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/elastic_analytics.mdx b/api_docs/elastic_analytics.mdx new file mode 100644 index 00000000000000..0b618c8505087f --- /dev/null +++ b/api_docs/elastic_analytics.mdx @@ -0,0 +1,33 @@ +--- +id: kibElasticAnalyticsPluginApi +slug: /kibana-dev-docs/api/elastic-analytics +title: "@elastic/analytics" +image: https://source.unsplash.com/400x175/?github +summary: API docs for the @elastic/analytics plugin +date: 2022-03-24 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@elastic/analytics'] +warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. +--- +import elasticAnalyticsObj from './elastic_analytics.devdocs.json'; + + + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 78 | 1 | 11 | 0 | + +## Server + +### Functions + + +### Interfaces + + +### Consts, variables and types + + diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index fd475352277ed6..75819f7ca91f93 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -3,7 +3,7 @@ id: kibDevDocsPluginDirectory slug: /kibana-dev-docs/api-meta/plugin-api-directory title: Directory summary: Directory of public APIs available through plugins or packages. -date: 2022-03-15 +date: 2022-03-24 tags: ['contributor', 'dev', 'apidocs', 'kibana'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -12,21 +12,21 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Count | Plugins or Packages with a
public API | Number of teams | |--------------|----------|------------------------| -| 221 | 176 | 34 | +| 227 | 182 | 34 | ### Public API health stats | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 24101 | 168 | 18338 | 1107 | +| 24699 | 169 | 18719 | 1139 | ## Plugin Directory | Plugin name           | Maintaining team | Description | API Cnt | Any Cnt | Missing
comments | Missing
exports | |--------------|----------------|-----------|--------------|----------|---------------|--------| -| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 125 | 0 | 125 | 11 | +| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 127 | 0 | 127 | 10 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 23 | 0 | 19 | 1 | -| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 296 | 0 | 288 | 18 | +| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 300 | 0 | 292 | 21 | | | [APM UI](https://github.com/orgs/elastic/teams/apm-ui) | The user interface for Elastic APM | 40 | 0 | 40 | 50 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 9 | 0 | 9 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Considering using bfetch capabilities when fetching large amounts of data. This services supports batching HTTP requests and streaming responses back. | 78 | 1 | 69 | 2 | @@ -36,31 +36,32 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 28 | 0 | 23 | 0 | | | [Cloud Security Posture](https://github.com/orgs/elastic/teams/cloud-posture-security) | The cloud security posture plugin | 6 | 0 | 6 | 0 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 13 | 0 | 13 | 1 | -| | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Controls Plugin contains embeddable components intended to create a simple query interface for end users, and a powerful editing suite that allows dashboard authors to build controls | 130 | 0 | 124 | 4 | -| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2370 | 15 | 969 | 33 | +| | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Controls Plugin contains embeddable components intended to create a simple query interface for end users, and a powerful editing suite that allows dashboard authors to build controls | 133 | 0 | 127 | 4 | +| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2422 | 15 | 969 | 33 | | crossClusterReplication | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | | | [Fleet](https://github.com/orgs/elastic/teams/fleet) | Add custom data integrations so they can be displayed in the Fleet integrations app | 98 | 0 | 79 | 1 | -| | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds the Dashboard app to Kibana | 150 | 0 | 148 | 15 | +| | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds the Dashboard app to Kibana | 151 | 0 | 149 | 14 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 52 | 0 | 51 | 0 | -| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 3419 | 40 | 2822 | 27 | +| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 3453 | 40 | 2840 | 27 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Enhanced data plugin. (See src/plugins/data.) Enhances the main data plugin with a search session management UI. Includes a reusable search session indicator component to use in other applications. Exposes routes for managing search sessions. Includes a service that monitors, updates, and cleans up search session saved objects. | 16 | 0 | 16 | 2 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | This plugin provides the ability to create data views via a modal flyout from any kibana app | 13 | 0 | 7 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Reusable data view field editor across Kibana | 42 | 0 | 37 | 3 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data view management app | 2 | 0 | 2 | 0 | -| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 765 | 3 | 616 | 10 | +| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 863 | 3 | 711 | 15 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | The Data Visualizer tools help you understand your data, by analyzing the metrics and fields in a log file or an existing Elasticsearch index. | 23 | 2 | 19 | 1 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 10 | 0 | 8 | 2 | | | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the Discover application and the saved search embeddable. | 77 | 0 | 61 | 7 | | | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 37 | 0 | 35 | 2 | -| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds embeddables service to Kibana | 471 | 0 | 384 | 5 | +| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds embeddables service to Kibana | 474 | 0 | 385 | 4 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Extends embeddable plugin with more functionality | 14 | 0 | 14 | 0 | | | [Platform Security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides encryption and decryption utilities for saved objects containing sensitive information. | 48 | 0 | 44 | 0 | | | [Enterprise Search](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | Adds dashboards for discovering and managing Enterprise Search products. | 2 | 0 | 2 | 0 | -| | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 110 | 3 | 106 | 3 | +| | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 112 | 3 | 108 | 3 | +| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | The Event Annotation service contains expressions for event annotations | 49 | 0 | 49 | 3 | | | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 91 | 0 | 91 | 9 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'error' renderer to expressions | 17 | 0 | 15 | 2 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Expression Gauge plugin adds a `gauge` renderer and function to the expression plugin. The renderer will display the `gauge` chart. | 70 | 0 | 70 | 2 | -| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Expression Heatmap plugin adds a `heatmap` renderer and function to the expression plugin. The renderer will display the `heatmap` chart. | 118 | 0 | 114 | 3 | +| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Expression Heatmap plugin adds a `heatmap` renderer and function to the expression plugin. The renderer will display the `heatmap` chart. | 119 | 0 | 115 | 3 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'image' function and renderer to expressions | 26 | 0 | 26 | 0 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'metric' function and renderer to expressions | 32 | 0 | 27 | 0 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Expression MetricVis plugin adds a `metric` renderer and function to the expression plugin. The renderer will display the `metric` chart. | 46 | 0 | 46 | 1 | @@ -69,11 +70,11 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'revealImage' function and renderer to expressions | 14 | 0 | 14 | 3 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'shape' function and renderer to expressions | 148 | 0 | 146 | 0 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Expression Tagcloud plugin adds a `tagcloud` renderer and function to the expression plugin. The renderer will display the `Wordcloud` chart. | 7 | 0 | 7 | 0 | -| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds expression runtime to Kibana | 2079 | 17 | 1632 | 4 | -| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 222 | 0 | 98 | 2 | +| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds expression runtime to Kibana | 2145 | 17 | 1701 | 6 | +| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 222 | 0 | 95 | 2 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Index pattern fields and ambiguous values formatters | 286 | 6 | 247 | 3 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | The file upload plugin contains components and services for uploading a file, analyzing its data, and then importing the data into an Elasticsearch index. Supported file types include CSV, TSV, newline-delimited JSON and GeoJSON. | 62 | 0 | 62 | 2 | -| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1367 | 8 | 1250 | 9 | +| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1371 | 8 | 1254 | 9 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 68 | 0 | 14 | 5 | | globalSearchBar | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | | globalSearchProviders | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | @@ -91,14 +92,14 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 239 | 0 | 203 | 5 | | kibanaUsageCollection | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 0 | 0 | 0 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 615 | 3 | 420 | 9 | -| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Visualization editor allowing to quickly and easily configure compelling visualizations to use on dashboards and canvas workpads. Exposes components to embed visualizations and link into the Lens editor from within other apps in Kibana. | 395 | 0 | 343 | 43 | +| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Visualization editor allowing to quickly and easily configure compelling visualizations to use on dashboards and canvas workpads. Exposes components to embed visualizations and link into the Lens editor from within other apps in Kibana. | 438 | 0 | 363 | 44 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 8 | 0 | 8 | 0 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 3 | 0 | 3 | 0 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 117 | 0 | 42 | 10 | | | [Security detections response](https://github.com/orgs/elastic/teams/security-detections-response) | - | 198 | 0 | 162 | 49 | | logstash | [Logstash](https://github.com/orgs/elastic/teams/logstash) | - | 0 | 0 | 0 | 0 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | - | 41 | 0 | 41 | 6 | -| | [GIS](https://github.com/orgs/elastic/teams/kibana-gis) | - | 216 | 0 | 215 | 27 | +| | [GIS](https://github.com/orgs/elastic/teams/kibana-gis) | - | 220 | 0 | 219 | 27 | | | [GIS](https://github.com/orgs/elastic/teams/kibana-gis) | - | 67 | 0 | 67 | 0 | | | [Security solution](https://github.com/orgs/elastic/teams/security-solution) | - | 4 | 0 | 4 | 1 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | This plugin provides access to the machine learning features provided by Elastic. | 196 | 8 | 79 | 30 | @@ -106,39 +107,39 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Stack Monitoring](https://github.com/orgs/elastic/teams/stack-monitoring-ui) | - | 5 | 0 | 5 | 1 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 34 | 0 | 34 | 2 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 17 | 0 | 17 | 0 | -| | [Observability UI](https://github.com/orgs/elastic/teams/observability-ui) | - | 358 | 2 | 355 | 30 | -| | [Security asset management](https://github.com/orgs/elastic/teams/security-asset-management) | - | 10 | 0 | 10 | 0 | +| | [Observability UI](https://github.com/orgs/elastic/teams/observability-ui) | - | 361 | 2 | 358 | 30 | +| | [Security asset management](https://github.com/orgs/elastic/teams/security-asset-management) | - | 13 | 0 | 13 | 0 | | painlessLab | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Presentation Utility Plugin is a set of common, shared components and toolkits for solutions within the Presentation space, (e.g. Dashboards, Canvas). | 228 | 2 | 177 | 11 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 4 | 0 | 4 | 0 | | | [Kibana Reporting Services](https://github.com/orgs/elastic/teams/kibana-reporting-services) | Reporting Services enables applications to feature reports that the user can automate with Watcher and download later. | 36 | 0 | 16 | 0 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 21 | 0 | 21 | 0 | -| | [RAC](https://github.com/orgs/elastic/teams/rac) | - | 189 | 0 | 162 | 8 | +| | [RAC](https://github.com/orgs/elastic/teams/rac) | - | 191 | 0 | 164 | 8 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 24 | 0 | 19 | 2 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 192 | 2 | 151 | 5 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 103 | 0 | 90 | 0 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 54 | 0 | 50 | 0 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 90 | 0 | 45 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 33 | 0 | 14 | 0 | -| | [Kibana Reporting Services](https://github.com/orgs/elastic/teams/kibana-reporting-services) | Kibana Screenshotting Plugin | 18 | 0 | 8 | 5 | +| | [Kibana Reporting Services](https://github.com/orgs/elastic/teams/kibana-reporting-services) | Kibana Screenshotting Plugin | 24 | 0 | 12 | 5 | | searchprofiler | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | | | [Platform Security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides authentication and authorization features, and exposes functionality to understand the capabilities of the currently authenticated user. | 183 | 0 | 103 | 0 | | | [Security solution](https://github.com/orgs/elastic/teams/security-solution) | - | 45 | 0 | 45 | 18 | | sessionView | [Security Team](https://github.com/orgs/elastic/teams/security-team) | - | 0 | 0 | 0 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds URL Service and sharing capabilities to Kibana | 113 | 0 | 54 | 10 | -| | [Shared UX](https://github.com/orgs/elastic/teams/shared-ux) | A plugin providing components and services for shared user experiences in Kibana. | 14 | 0 | 0 | 1 | +| | [Shared UX](https://github.com/orgs/elastic/teams/shared-ux) | A plugin providing components and services for shared user experiences in Kibana. | 4 | 0 | 0 | 0 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 21 | 1 | 21 | 1 | -| | [Platform Security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides the Spaces feature, which allows saved objects to be organized into meaningful categories. | 256 | 0 | 63 | 0 | +| | [Platform Security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides the Spaces feature, which allows saved objects to be organized into meaningful categories. | 259 | 0 | 64 | 0 | | | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 4 | 0 | 4 | 0 | | | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 71 | 0 | 33 | 7 | -| | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 41 | 0 | 0 | 0 | +| | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 43 | 0 | 1 | 0 | | | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 32 | 0 | 32 | 6 | | | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 1 | 0 | 1 | 0 | | | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 11 | 0 | 10 | 0 | | | [Security solution](https://github.com/orgs/elastic/teams/security-solution) | - | 435 | 1 | 331 | 35 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | This plugin provides access to the transforms features provided by Elastic. Transforms enable you to convert existing Elasticsearch indices into summarized indices, which provide opportunities for new insights and analytics. | 4 | 0 | 4 | 1 | | translations | [Kibana Localization](https://github.com/orgs/elastic/teams/kibana-localization) | - | 0 | 0 | 0 | 0 | -| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 254 | 0 | 242 | 22 | +| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 289 | 0 | 277 | 22 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds UI Actions service to Kibana | 130 | 0 | 91 | 11 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Extends UI Actions plugin with more functionality | 203 | 0 | 141 | 9 | | upgradeAssistant | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | @@ -147,7 +148,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | - | 12 | 0 | 12 | 0 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 58 | 0 | 15 | 1 | | | [Uptime](https://github.com/orgs/elastic/teams/uptime) | - | 2 | 0 | 2 | 0 | -| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | The default editor used in most aggregation-based visualizations. | 57 | 0 | 50 | 3 | +| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | The default editor used in most aggregation-based visualizations. | 59 | 0 | 52 | 3 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Contains the gauge chart implementation using the elastic-charts library. The goal is to eventually deprecate the old implementation and keep only this. Until then, the library used is defined by the Legacy charts library advanced setting. | 7 | 0 | 7 | 2 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Contains the heatmap implementation using the elastic-charts library. The goal is to eventually deprecate the old implementation and keep only this. Until then, the library used is defined by the Legacy heatmap charts library advanced setting. | 3 | 0 | 3 | 2 | | visTypeMarkdown | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds a markdown visualization type | 0 | 0 | 0 | 0 | @@ -167,6 +168,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Package name           | Maintaining team | Description | API Cnt | Any Cnt | Missing
comments | Missing
exports | |--------------|----------------|-----------|--------------|----------|---------------|--------| +| | [Owner missing] | - | 78 | 1 | 11 | 0 | | | [Owner missing] | Elastic APM trace data generator | 53 | 0 | 53 | 9 | | | [Owner missing] | elasticsearch datemath parser, used in kibana | 44 | 0 | 43 | 0 | | | [Owner missing] | - | 11 | 5 | 11 | 0 | @@ -174,13 +176,13 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | Ahmad Bamieh ahmadbamieh@gmail.com | Kibana Analytics tool | 69 | 0 | 69 | 2 | | | [Owner missing] | - | 16 | 0 | 16 | 0 | | | [Owner missing] | - | 11 | 0 | 11 | 0 | -| | [Owner missing] | - | 11 | 0 | 5 | 1 | +| | [Owner missing] | - | 12 | 0 | 5 | 1 | | | [Owner missing] | - | 2 | 0 | 2 | 0 | | | [Owner missing] | - | 66 | 0 | 46 | 2 | | | [Owner missing] | - | 125 | 3 | 123 | 17 | | | [Owner missing] | - | 13 | 0 | 7 | 0 | | | [Owner missing] | - | 286 | 3 | 207 | 1 | -| | [Owner missing] | - | 62 | 0 | 62 | 2 | +| | [Owner missing] | - | 63 | 0 | 63 | 2 | | | [Owner missing] | - | 1 | 0 | 1 | 0 | | | [Owner missing] | - | 27 | 0 | 14 | 1 | | | [Owner missing] | - | 211 | 1 | 159 | 11 | @@ -203,18 +205,22 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Owner missing] | security solution elastic search utilities to use across plugins such lists, security_solution, cases, etc... | 57 | 0 | 51 | 1 | | | [Owner missing] | Security Solution utilities for React hooks | 14 | 0 | 6 | 0 | | | [Owner missing] | io ts utilities and types to be shared with plugins from the security solution project | 148 | 0 | 129 | 0 | -| | [Owner missing] | io ts utilities and types to be shared with plugins from the security solution project | 460 | 1 | 448 | 0 | +| | [Owner missing] | io ts utilities and types to be shared with plugins from the security solution project | 458 | 1 | 446 | 0 | | | [Owner missing] | io ts utilities and types to be shared with plugins from the security solution project | 48 | 0 | 26 | 0 | | | [Owner missing] | io ts utilities and types to be shared with plugins from the security solution project | 28 | 0 | 21 | 0 | | | [Owner missing] | security solution list REST API | 59 | 0 | 58 | 0 | | | [Owner missing] | security solution list constants to use across plugins such lists, security_solution, cases, etc... | 26 | 0 | 12 | 0 | | | [Owner missing] | Security solution list ReactJS hooks | 56 | 0 | 44 | 0 | -| | [Owner missing] | security solution list utilities | 231 | 0 | 183 | 0 | +| | [Owner missing] | security solution list utilities | 226 | 0 | 178 | 0 | | | [Owner missing] | security solution rule utilities to use across plugins | 23 | 0 | 21 | 0 | | | [Owner missing] | security solution t-grid packages will allow sharing components between timelines and security_solution plugin until we transfer all functionality to timelines plugin | 120 | 0 | 116 | 0 | -| | [Owner missing] | security solution utilities to use across plugins such lists, security_solution, cases, etc... | 28 | 0 | 26 | 0 | +| | [Owner missing] | security solution utilities to use across plugins such lists, security_solution, cases, etc... | 31 | 0 | 29 | 0 | | | [Owner missing] | - | 53 | 0 | 50 | 1 | | | [Owner missing] | - | 25 | 0 | 24 | 1 | +| | [Owner missing] | - | 24 | 0 | 4 | 2 | +| | [Owner missing] | - | 67 | 0 | 43 | 0 | +| | [Owner missing] | - | 10 | 0 | 2 | 0 | +| | [Owner missing] | - | 9 | 0 | 3 | 0 | | | [Owner missing] | - | 96 | 1 | 63 | 2 | | | Operations | - | 22 | 2 | 21 | 0 | | | [Owner missing] | - | 2 | 0 | 2 | 0 | diff --git a/docs/development/core/server/kibana-plugin-core-server.analyticsservicepreboot.md b/docs/development/core/server/kibana-plugin-core-server.analyticsservicepreboot.md new file mode 100644 index 00000000000000..d648455dde18d8 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.analyticsservicepreboot.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [AnalyticsServicePreboot](./kibana-plugin-core-server.analyticsservicepreboot.md) + +## AnalyticsServicePreboot type + +Exposes the public APIs of the AnalyticsClient during the preboot phase + +Signature: + +```typescript +export declare type AnalyticsServicePreboot = AnalyticsClient; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.analyticsservicesetup.md b/docs/development/core/server/kibana-plugin-core-server.analyticsservicesetup.md new file mode 100644 index 00000000000000..aa84919848f24e --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.analyticsservicesetup.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [AnalyticsServiceSetup](./kibana-plugin-core-server.analyticsservicesetup.md) + +## AnalyticsServiceSetup type + +Exposes the public APIs of the AnalyticsClient during the setup phase. + +Signature: + +```typescript +export declare type AnalyticsServiceSetup = AnalyticsClient; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.analyticsservicestart.md b/docs/development/core/server/kibana-plugin-core-server.analyticsservicestart.md new file mode 100644 index 00000000000000..f3f4aca98762c8 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.analyticsservicestart.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [AnalyticsServiceStart](./kibana-plugin-core-server.analyticsservicestart.md) + +## AnalyticsServiceStart type + +Exposes the public APIs of the AnalyticsClient during the start phase + +Signature: + +```typescript +export declare type AnalyticsServiceStart = AnalyticsClient; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.corepreboot.analytics.md b/docs/development/core/server/kibana-plugin-core-server.corepreboot.analytics.md new file mode 100644 index 00000000000000..b9846fa851b353 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.corepreboot.analytics.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [CorePreboot](./kibana-plugin-core-server.corepreboot.md) > [analytics](./kibana-plugin-core-server.corepreboot.analytics.md) + +## CorePreboot.analytics property + +[AnalyticsServicePreboot](./kibana-plugin-core-server.analyticsservicepreboot.md) + +Signature: + +```typescript +analytics: AnalyticsServicePreboot; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.corepreboot.md b/docs/development/core/server/kibana-plugin-core-server.corepreboot.md index 3ac97d2ca3b373..027dca5362f8d3 100644 --- a/docs/development/core/server/kibana-plugin-core-server.corepreboot.md +++ b/docs/development/core/server/kibana-plugin-core-server.corepreboot.md @@ -16,6 +16,7 @@ export interface CorePreboot | Property | Type | Description | | --- | --- | --- | +| [analytics](./kibana-plugin-core-server.corepreboot.analytics.md) | AnalyticsServicePreboot | [AnalyticsServicePreboot](./kibana-plugin-core-server.analyticsservicepreboot.md) | | [elasticsearch](./kibana-plugin-core-server.corepreboot.elasticsearch.md) | ElasticsearchServicePreboot | [ElasticsearchServicePreboot](./kibana-plugin-core-server.elasticsearchservicepreboot.md) | | [http](./kibana-plugin-core-server.corepreboot.http.md) | HttpServicePreboot | [HttpServicePreboot](./kibana-plugin-core-server.httpservicepreboot.md) | | [preboot](./kibana-plugin-core-server.corepreboot.preboot.md) | PrebootServicePreboot | [PrebootServicePreboot](./kibana-plugin-core-server.prebootservicepreboot.md) | diff --git a/docs/development/core/server/kibana-plugin-core-server.coresetup.analytics.md b/docs/development/core/server/kibana-plugin-core-server.coresetup.analytics.md new file mode 100644 index 00000000000000..3e6d8a5c2c2308 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.coresetup.analytics.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [CoreSetup](./kibana-plugin-core-server.coresetup.md) > [analytics](./kibana-plugin-core-server.coresetup.analytics.md) + +## CoreSetup.analytics property + +[AnalyticsServiceSetup](./kibana-plugin-core-server.analyticsservicesetup.md) + +Signature: + +```typescript +analytics: AnalyticsServiceSetup; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.coresetup.md b/docs/development/core/server/kibana-plugin-core-server.coresetup.md index 276a17f9aac897..9db55fd3865c32 100644 --- a/docs/development/core/server/kibana-plugin-core-server.coresetup.md +++ b/docs/development/core/server/kibana-plugin-core-server.coresetup.md @@ -16,6 +16,7 @@ export interface CoreSetup + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [CoreStart](./kibana-plugin-core-server.corestart.md) > [analytics](./kibana-plugin-core-server.corestart.analytics.md) + +## CoreStart.analytics property + +[AnalyticsServiceStart](./kibana-plugin-core-server.analyticsservicestart.md) + +Signature: + +```typescript +analytics: AnalyticsServiceStart; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.corestart.md b/docs/development/core/server/kibana-plugin-core-server.corestart.md index 93ef386eb4447e..31eecb0a5360cb 100644 --- a/docs/development/core/server/kibana-plugin-core-server.corestart.md +++ b/docs/development/core/server/kibana-plugin-core-server.corestart.md @@ -16,6 +16,7 @@ export interface CoreStart | Property | Type | Description | | --- | --- | --- | +| [analytics](./kibana-plugin-core-server.corestart.analytics.md) | AnalyticsServiceStart | [AnalyticsServiceStart](./kibana-plugin-core-server.analyticsservicestart.md) | | [capabilities](./kibana-plugin-core-server.corestart.capabilities.md) | CapabilitiesStart | [CapabilitiesStart](./kibana-plugin-core-server.capabilitiesstart.md) | | [docLinks](./kibana-plugin-core-server.corestart.doclinks.md) | DocLinksServiceStart | [DocLinksServiceStart](./kibana-plugin-core-server.doclinksservicestart.md) | | [elasticsearch](./kibana-plugin-core-server.corestart.elasticsearch.md) | ElasticsearchServiceStart | [ElasticsearchServiceStart](./kibana-plugin-core-server.elasticsearchservicestart.md) | diff --git a/docs/development/core/server/kibana-plugin-core-server.md b/docs/development/core/server/kibana-plugin-core-server.md index 450af99a5b2340..aa14156a463054 100644 --- a/docs/development/core/server/kibana-plugin-core-server.md +++ b/docs/development/core/server/kibana-plugin-core-server.md @@ -253,6 +253,9 @@ The plugin integrates with the core system via lifecycle events: `setup` | Type Alias | Description | | --- | --- | +| [AnalyticsServicePreboot](./kibana-plugin-core-server.analyticsservicepreboot.md) | Exposes the public APIs of the AnalyticsClient during the preboot phase | +| [AnalyticsServiceSetup](./kibana-plugin-core-server.analyticsservicesetup.md) | Exposes the public APIs of the AnalyticsClient during the setup phase. | +| [AnalyticsServiceStart](./kibana-plugin-core-server.analyticsservicestart.md) | Exposes the public APIs of the AnalyticsClient during the start phase | | [AppenderConfigType](./kibana-plugin-core-server.appenderconfigtype.md) | | | [AuthenticationHandler](./kibana-plugin-core-server.authenticationhandler.md) | See [AuthToolkit](./kibana-plugin-core-server.authtoolkit.md). | | [AuthHeaders](./kibana-plugin-core-server.authheaders.md) | Auth Headers map | diff --git a/packages/elastic-analytics/src/index.ts b/packages/elastic-analytics/src/index.ts index c9226b49451872..dd00282135f4c5 100644 --- a/packages/elastic-analytics/src/index.ts +++ b/packages/elastic-analytics/src/index.ts @@ -6,15 +6,22 @@ * Side Public License, v 1. */ -import type { AnalyticsClientInitContext } from './analytics_client'; -import { AnalyticsClient } from './analytics_client'; +import type { + AnalyticsClientInitContext, + IAnalyticsClient as AnalyticsClient, +} from './analytics_client'; +import { AnalyticsClient as AnalyticsClientClass } from './analytics_client'; -export function createAnalytics(initContext: AnalyticsClientInitContext) { - return new AnalyticsClient(initContext); +/** + * Creates an {@link AnalyticsClient}. + * @param initContext The initial context to create the client {@link AnalyticsClientInitContext} + */ +export function createAnalytics(initContext: AnalyticsClientInitContext): AnalyticsClient { + return new AnalyticsClientClass(initContext); } export type { - IAnalyticsClient, + IAnalyticsClient as AnalyticsClient, // Types for the constructor AnalyticsClientInitContext, // Types for the registerShipper API diff --git a/src/core/server/analytics/analytics_service.mock.ts b/src/core/server/analytics/analytics_service.mock.ts new file mode 100644 index 00000000000000..00eb021f3251e7 --- /dev/null +++ b/src/core/server/analytics/analytics_service.mock.ts @@ -0,0 +1,47 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { PublicMethodsOf } from '@kbn/utility-types'; +import type { AnalyticsClient } from '@elastic/analytics'; +import { createAnalytics } from '@elastic/analytics'; +import type { AnalyticsService } from './analytics_service'; +import { loggerMock } from '../logging/logger.mock'; + +type AnalyticsServiceContract = PublicMethodsOf; + +const createAnalyticsClientMock = (): jest.Mocked => { + const analyticsClient = createAnalytics({ + isDev: true, + sendTo: 'staging', + logger: loggerMock.create(), + }); + + return { + optIn: jest.fn().mockImplementation(analyticsClient.optIn), + reportEvent: jest.fn().mockImplementation(analyticsClient.reportEvent), + registerEventType: jest.fn().mockImplementation(analyticsClient.registerEventType), + registerContextProvider: jest.fn().mockImplementation(analyticsClient.registerContextProvider), + registerShipper: jest.fn().mockImplementation(analyticsClient.registerShipper), + telemetryCounter$: analyticsClient.telemetryCounter$, + }; +}; + +const createAnalyticsServiceMock = (): jest.Mocked => { + return { + preboot: jest.fn().mockImplementation(createAnalyticsClientMock), + setup: jest.fn().mockImplementation(createAnalyticsClientMock), + start: jest.fn().mockImplementation(createAnalyticsClientMock), + }; +}; + +export const analyticsServiceMock = { + create: createAnalyticsServiceMock, + createAnalyticsServicePreboot: createAnalyticsClientMock, + createAnalyticsServiceSetup: createAnalyticsClientMock, + createAnalyticsServiceStart: createAnalyticsClientMock, +}; diff --git a/src/core/server/analytics/analytics_service.ts b/src/core/server/analytics/analytics_service.ts new file mode 100644 index 00000000000000..ac47de6b7439ad --- /dev/null +++ b/src/core/server/analytics/analytics_service.ts @@ -0,0 +1,75 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { AnalyticsClient } from '@elastic/analytics'; +import { createAnalytics } from '@elastic/analytics'; +import type { CoreContext } from '../core_context'; + +/** + * Exposes the public APIs of the AnalyticsClient during the preboot phase + * {@link AnalyticsClient} + * @public + */ +export type AnalyticsServicePreboot = AnalyticsClient; +/** + * Exposes the public APIs of the AnalyticsClient during the setup phase. + * {@link AnalyticsClient} + * @public + */ +export type AnalyticsServiceSetup = AnalyticsClient; +/** + * Exposes the public APIs of the AnalyticsClient during the start phase + * {@link AnalyticsClient} + * @public + */ +export type AnalyticsServiceStart = AnalyticsClient; + +export class AnalyticsService { + private readonly analyticsClient: AnalyticsClient; + + constructor(core: CoreContext) { + this.analyticsClient = createAnalytics({ + isDev: core.env.mode.dev, + logger: core.logger.get('analytics'), + // TODO: We need to be able to edit sendTo once we resolve the telemetry config. + // For now, we are relying on whether it's a distributable or running from source. + sendTo: core.env.packageInfo.dist ? 'production' : 'staging', + }); + } + + public preboot(): AnalyticsServicePreboot { + return { + optIn: this.analyticsClient.optIn, + registerContextProvider: this.analyticsClient.registerContextProvider, + registerEventType: this.analyticsClient.registerEventType, + registerShipper: this.analyticsClient.registerShipper, + reportEvent: this.analyticsClient.reportEvent, + telemetryCounter$: this.analyticsClient.telemetryCounter$, + }; + } + public setup(): AnalyticsServiceSetup { + return { + optIn: this.analyticsClient.optIn, + registerContextProvider: this.analyticsClient.registerContextProvider, + registerEventType: this.analyticsClient.registerEventType, + registerShipper: this.analyticsClient.registerShipper, + reportEvent: this.analyticsClient.reportEvent, + telemetryCounter$: this.analyticsClient.telemetryCounter$, + }; + } + public start(): AnalyticsServiceStart { + return { + optIn: this.analyticsClient.optIn, + registerContextProvider: this.analyticsClient.registerContextProvider, + registerEventType: this.analyticsClient.registerEventType, + registerShipper: this.analyticsClient.registerShipper, + reportEvent: this.analyticsClient.reportEvent, + telemetryCounter$: this.analyticsClient.telemetryCounter$, + }; + } +} diff --git a/src/core/server/analytics/index.ts b/src/core/server/analytics/index.ts new file mode 100644 index 00000000000000..fd9e86daf43e6f --- /dev/null +++ b/src/core/server/analytics/index.ts @@ -0,0 +1,25 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { AnalyticsService } from './analytics_service'; +export type { + AnalyticsServicePreboot, + AnalyticsServiceSetup, + AnalyticsServiceStart, +} from './analytics_service'; + +export type { + AnalyticsClient, + EventType, + EventTypeOpts, + IShipper, + ShipperClassConstructor, + OptInConfig, + ContextProviderOpts, + TelemetryCounter, +} from '@elastic/analytics'; diff --git a/src/core/server/index.ts b/src/core/server/index.ts index 6907f7ef1238b5..70c6692270e245 100644 --- a/src/core/server/index.ts +++ b/src/core/server/index.ts @@ -83,6 +83,11 @@ export type { }; import type { ExecutionContextSetup, ExecutionContextStart } from './execution_context'; +import type { + AnalyticsServicePreboot, + AnalyticsServiceSetup, + AnalyticsServiceStart, +} from './analytics'; export type { IExecutionContextContainer, KibanaExecutionContext } from './execution_context'; @@ -442,6 +447,20 @@ export type { export type { DocLinksServiceSetup, DocLinksServiceStart } from './doc_links'; +export type { + AnalyticsServiceSetup, + AnalyticsServicePreboot, + AnalyticsServiceStart, + AnalyticsClient, + EventType, + EventTypeOpts, + IShipper, + ContextProviderOpts, + OptInConfig, + ShipperClassConstructor, + TelemetryCounter, +} from './analytics'; + /** * Plugin specific context passed to a route handler. * @@ -483,6 +502,8 @@ export interface RequestHandlerContext { * @public */ export interface CorePreboot { + /** {@link AnalyticsServicePreboot} */ + analytics: AnalyticsServicePreboot; /** {@link ElasticsearchServicePreboot} */ elasticsearch: ElasticsearchServicePreboot; /** {@link HttpServicePreboot} */ @@ -501,6 +522,8 @@ export interface CorePreboot { * @public */ export interface CoreSetup { + /** {@link AnalyticsServiceSetup} */ + analytics: AnalyticsServiceSetup; /** {@link CapabilitiesSetup} */ capabilities: CapabilitiesSetup; /** {@link ContextSetup} */ @@ -555,6 +578,8 @@ export type StartServicesAccessor< * @public */ export interface CoreStart { + /** {@link AnalyticsServiceStart} */ + analytics: AnalyticsServiceStart; /** {@link CapabilitiesStart} */ capabilities: CapabilitiesStart; /** {@link DocLinksServiceStart} */ diff --git a/src/core/server/internal_types.ts b/src/core/server/internal_types.ts index ab58602057b09d..080e4e61dadb7a 100644 --- a/src/core/server/internal_types.ts +++ b/src/core/server/internal_types.ts @@ -45,9 +45,15 @@ import type { } from './execution_context'; import { InternalPrebootServicePreboot } from './preboot'; import { DocLinksServiceSetup, DocLinksServiceStart } from './doc_links'; +import type { + AnalyticsServicePreboot, + AnalyticsServiceSetup, + AnalyticsServiceStart, +} from './analytics'; /** @internal */ export interface InternalCorePreboot { + analytics: AnalyticsServicePreboot; context: InternalContextPreboot; http: InternalHttpServicePreboot; elasticsearch: InternalElasticsearchServicePreboot; @@ -59,6 +65,7 @@ export interface InternalCorePreboot { /** @internal */ export interface InternalCoreSetup { + analytics: AnalyticsServiceSetup; capabilities: CapabilitiesSetup; context: ContextSetup; docLinks: DocLinksServiceSetup; @@ -82,6 +89,7 @@ export interface InternalCoreSetup { * @internal */ export interface InternalCoreStart { + analytics: AnalyticsServiceStart; capabilities: CapabilitiesStart; elasticsearch: InternalElasticsearchServiceStart; docLinks: DocLinksServiceStart; diff --git a/src/core/server/mocks.ts b/src/core/server/mocks.ts index 32c0729dcae34f..0e5821bcc1c23d 100644 --- a/src/core/server/mocks.ts +++ b/src/core/server/mocks.ts @@ -10,7 +10,7 @@ import { of } from 'rxjs'; import { duration } from 'moment'; import { ByteSizeValue } from '@kbn/config-schema'; import type { MockedKeys } from '@kbn/utility-types/jest'; -import { +import type { PluginInitializerContext, CoreSetup, CoreStart, @@ -39,6 +39,7 @@ import { deprecationsServiceMock } from './deprecations/deprecations_service.moc import { executionContextServiceMock } from './execution_context/execution_context_service.mock'; import { prebootServiceMock } from './preboot/preboot_service.mock'; import { docLinksServiceMock } from './doc_links/doc_links_service.mock'; +import { analyticsServiceMock } from './analytics/analytics_service.mock'; export { configServiceMock, configDeprecationsMock } from './config/mocks'; export { httpServerMock } from './http/http_server.mocks'; @@ -49,6 +50,7 @@ export { httpServiceMock } from './http/http_service.mock'; export { loggingSystemMock } from './logging/logging_system.mock'; export { savedObjectsRepositoryMock } from './saved_objects/service/lib/repository.mock'; export { savedObjectsServiceMock } from './saved_objects/saved_objects_service.mock'; +export { savedObjectsClientMock } from './saved_objects/service/saved_objects_client.mock'; export { migrationMocks } from './saved_objects/migrations/mocks'; export { typeRegistryMock as savedObjectsTypeRegistryMock } from './saved_objects/saved_objects_type_registry.mock'; export { uiSettingsServiceMock } from './ui_settings/ui_settings_service.mock'; @@ -62,6 +64,7 @@ export { i18nServiceMock } from './i18n/i18n_service.mock'; export { deprecationsServiceMock } from './deprecations/deprecations_service.mock'; export { executionContextServiceMock } from './execution_context/execution_context_service.mock'; export { docLinksServiceMock } from './doc_links/doc_links_service.mock'; +export { analyticsServiceMock } from './analytics/analytics_service.mock'; export type { ElasticsearchClientMock } from './elasticsearch/client/mocks'; @@ -128,6 +131,7 @@ type CorePrebootMockType = MockedKeys & { function createCorePrebootMock() { const mock: CorePrebootMockType = { + analytics: analyticsServiceMock.createAnalyticsServicePreboot(), elasticsearch: elasticsearchServiceMock.createPreboot(), http: httpServiceMock.createPrebootContract(), preboot: prebootServiceMock.createPrebootContract(), @@ -158,6 +162,7 @@ function createCoreSetupMock({ }; const mock: CoreSetupMockType = { + analytics: analyticsServiceMock.createAnalyticsServiceSetup(), capabilities: capabilitiesServiceMock.createSetupContract(), context: contextServiceMock.createSetupContract(), docLinks: docLinksServiceMock.createSetupContract(), @@ -184,6 +189,7 @@ function createCoreSetupMock({ function createCoreStartMock() { const mock: MockedKeys = { + analytics: analyticsServiceMock.createAnalyticsServiceStart(), capabilities: capabilitiesServiceMock.createStartContract(), docLinks: docLinksServiceMock.createStartContract(), elasticsearch: elasticsearchServiceMock.createStart(), @@ -200,6 +206,7 @@ function createCoreStartMock() { function createInternalCorePrebootMock() { const prebootDeps = { + analytics: analyticsServiceMock.createAnalyticsServicePreboot(), context: contextServiceMock.createPrebootContract(), elasticsearch: elasticsearchServiceMock.createInternalPreboot(), http: httpServiceMock.createInternalPrebootContract(), @@ -213,6 +220,7 @@ function createInternalCorePrebootMock() { function createInternalCoreSetupMock() { const setupDeps = { + analytics: analyticsServiceMock.createAnalyticsServiceSetup(), capabilities: capabilitiesServiceMock.createSetupContract(), context: contextServiceMock.createSetupContract(), docLinks: docLinksServiceMock.createSetupContract(), @@ -236,6 +244,7 @@ function createInternalCoreSetupMock() { function createInternalCoreStartMock() { const startDeps = { + analytics: analyticsServiceMock.createAnalyticsServiceStart(), capabilities: capabilitiesServiceMock.createStartContract(), docLinks: docLinksServiceMock.createStartContract(), elasticsearch: elasticsearchServiceMock.createInternalStart(), @@ -281,5 +290,3 @@ export const coreMock = { createPluginInitializerContext: pluginInitializerContextMock, createRequestHandlerContext: createCoreRequestHandlerContextMock, }; - -export { savedObjectsClientMock }; diff --git a/src/core/server/plugins/plugin_context.ts b/src/core/server/plugins/plugin_context.ts index 56d749b79289f6..22c4005d8b6984 100644 --- a/src/core/server/plugins/plugin_context.ts +++ b/src/core/server/plugins/plugin_context.ts @@ -108,6 +108,14 @@ export function createPluginPrebootSetupContext( plugin: PluginWrapper ): CorePreboot { return { + analytics: { + optIn: deps.analytics.optIn, + registerContextProvider: deps.analytics.registerContextProvider, + registerEventType: deps.analytics.registerEventType, + registerShipper: deps.analytics.registerShipper, + reportEvent: deps.analytics.reportEvent, + telemetryCounter$: deps.analytics.telemetryCounter$, + }, elasticsearch: { config: deps.elasticsearch.config, createClient: deps.elasticsearch.createClient, @@ -147,6 +155,14 @@ export function createPluginSetupContext( const router = deps.http.createRouter('', plugin.opaqueId); return { + analytics: { + optIn: deps.analytics.optIn, + registerContextProvider: deps.analytics.registerContextProvider, + registerEventType: deps.analytics.registerEventType, + registerShipper: deps.analytics.registerShipper, + reportEvent: deps.analytics.reportEvent, + telemetryCounter$: deps.analytics.telemetryCounter$, + }, capabilities: { registerProvider: deps.capabilities.registerProvider, registerSwitcher: deps.capabilities.registerSwitcher, @@ -235,6 +251,14 @@ export function createPluginStartContext( plugin: PluginWrapper ): CoreStart { return { + analytics: { + optIn: deps.analytics.optIn, + registerContextProvider: deps.analytics.registerContextProvider, + registerEventType: deps.analytics.registerEventType, + registerShipper: deps.analytics.registerShipper, + reportEvent: deps.analytics.reportEvent, + telemetryCounter$: deps.analytics.telemetryCounter$, + }, capabilities: { resolveCapabilities: deps.capabilities.resolveCapabilities, }, diff --git a/src/core/server/server.api.md b/src/core/server/server.api.md index 82b4012703be8c..aebd455e3b7d8c 100644 --- a/src/core/server/server.api.md +++ b/src/core/server/server.api.md @@ -7,6 +7,7 @@ /// import { AddConfigDeprecation } from '@kbn/config'; +import { AnalyticsClient } from '@elastic/analytics'; import apm from 'elastic-apm-node'; import Boom from '@hapi/boom'; import { ByteSizeValue } from '@kbn/config-schema'; @@ -20,6 +21,7 @@ import { ConfigDeprecationFactory } from '@kbn/config'; import { ConfigDeprecationProvider } from '@kbn/config'; import { ConfigPath } from '@kbn/config'; import { ConfigService } from '@kbn/config'; +import { ContextProviderOpts } from '@elastic/analytics'; import { DetailedPeerCertificate } from 'tls'; import type { DocLinks } from '@kbn/doc-links'; import { Duration } from 'moment'; @@ -32,7 +34,10 @@ import { EcsEventType } from '@kbn/logging'; import { EnvironmentMode } from '@kbn/config'; import { errors } from '@elastic/elasticsearch'; import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { EventType } from '@elastic/analytics'; +import { EventTypeOpts } from '@elastic/analytics'; import { IncomingHttpHeaders } from 'http'; +import { IShipper } from '@elastic/analytics'; import { Logger } from '@kbn/logging'; import { LoggerFactory } from '@kbn/logging'; import { LogLevel as LogLevel_2 } from '@kbn/logging'; @@ -41,6 +46,7 @@ import { LogRecord } from '@kbn/logging'; import { MaybePromise } from '@kbn/utility-types'; import { ObjectType } from '@kbn/config-schema'; import { Observable } from 'rxjs'; +import { OptInConfig } from '@elastic/analytics'; import { PackageInfo } from '@kbn/config'; import { PathConfigType } from '@kbn/utils'; import { PeerCertificate } from 'tls'; @@ -53,7 +59,9 @@ import { ResponseObject } from '@hapi/hapi'; import { ResponseToolkit } from '@hapi/hapi'; import { SchemaTypeError } from '@kbn/config-schema'; import { ShallowPromise } from '@kbn/utility-types'; +import { ShipperClassConstructor } from '@elastic/analytics'; import { Stream } from 'stream'; +import { TelemetryCounter } from '@elastic/analytics'; import { Type } from '@kbn/config-schema'; import { TypeOf } from '@kbn/config-schema'; import { UiCounterMetricType } from '@kbn/analytics'; @@ -61,6 +69,23 @@ import { URL as URL_2 } from 'url'; export { AddConfigDeprecation } +export { AnalyticsClient } + +// Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver +// +// @public +export type AnalyticsServicePreboot = AnalyticsClient; + +// Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver +// +// @public +export type AnalyticsServiceSetup = AnalyticsClient; + +// Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver +// +// @public +export type AnalyticsServiceStart = AnalyticsClient; + // @public export const APP_WRAPPER_CLASS = "kbnAppWrapper"; @@ -294,6 +319,8 @@ export { ConfigService } // @internal export type ConfigUsageData = Record; +export { ContextProviderOpts } + // @public export interface ContextSetup { createContextContainer(): IContextContainer; @@ -407,6 +434,8 @@ export type CoreIncrementUsageCounter = (params: CoreIncrementCounterParams) => // @public export interface CorePreboot { + // (undocumented) + analytics: AnalyticsServicePreboot; // (undocumented) elasticsearch: ElasticsearchServicePreboot; // (undocumented) @@ -438,6 +467,8 @@ export interface CoreServicesUsageData { // @public export interface CoreSetup { + // (undocumented) + analytics: AnalyticsServiceSetup; // (undocumented) capabilities: CapabilitiesSetup; // (undocumented) @@ -474,6 +505,8 @@ export interface CoreSetup(key: string) => Promise; @@ -1630,6 +1669,8 @@ export interface OpsServerMetrics { }; } +export { OptInConfig } + export { PackageInfo } // @public @@ -3050,6 +3091,8 @@ export type SharedGlobalConfig = RecursiveReadonly<{ savedObjects: Pick; }>; +export { ShipperClassConstructor } + // @public export type StartServicesAccessor = () => Promise<[CoreStart, TPluginsStart, TStart]>; @@ -3067,6 +3110,8 @@ export interface StatusServiceSetup { set(status$: Observable): void; } +export { TelemetryCounter } + // @public export interface UiSettingsParams { category?: string[]; diff --git a/src/core/server/server.ts b/src/core/server/server.ts index 5563385d8b8c75..dc19f5eeea198d 100644 --- a/src/core/server/server.ts +++ b/src/core/server/server.ts @@ -57,12 +57,14 @@ import { config as executionContextConfig } from './execution_context'; import { PrebootCoreRouteHandlerContext } from './preboot_core_route_handler_context'; import { PrebootService } from './preboot'; import { DiscoveredPlugins } from './plugins'; +import { AnalyticsService } from './analytics'; const coreId = Symbol('core'); const rootConfigPath = ''; export class Server { public readonly configService: ConfigService; + private readonly analytics: AnalyticsService; private readonly capabilities: CapabilitiesService; private readonly context: ContextService; private readonly elasticsearch: ElasticsearchService; @@ -103,6 +105,7 @@ export class Server { this.configService = new ConfigService(rawConfigProvider, env, this.logger); const core = { coreId, configService: this.configService, env, logger: this.logger }; + this.analytics = new AnalyticsService(core); this.context = new ContextService(core); this.http = new HttpService(core); this.rendering = new RenderingService(core); @@ -133,6 +136,8 @@ export class Server { this.log.debug('prebooting server'); const prebootTransaction = apm.startTransaction('server-preboot', 'kibana-platform'); + const analyticsPreboot = this.analytics.preboot(); + const environmentPreboot = await this.environment.preboot(); // Discover any plugins before continuing. This allows other systems to utilize the plugin dependency graph. @@ -164,6 +169,7 @@ export class Server { const loggingPreboot = this.logging.preboot({ loggingSystem: this.loggingSystem }); const corePreboot: InternalCorePreboot = { + analytics: analyticsPreboot, context: contextServicePreboot, elasticsearch: elasticsearchServicePreboot, http: httpPreboot, @@ -189,6 +195,8 @@ export class Server { this.log.debug('setting up server'); const setupTransaction = apm.startTransaction('server-setup', 'kibana-platform'); + const analyticsSetup = this.analytics.setup(); + const environmentSetup = this.environment.setup(); // Configuration could have changed after preboot. @@ -265,6 +273,7 @@ export class Server { const loggingSetup = this.logging.setup(); const coreSetup: InternalCoreSetup = { + analytics: analyticsSetup, capabilities: capabilitiesSetup, context: contextServiceSetup, docLinks: docLinksSetup, @@ -298,6 +307,7 @@ export class Server { this.log.debug('starting server'); const startTransaction = apm.startTransaction('server-start', 'kibana-platform'); + const analyticsStart = this.analytics.start(); const executionContextStart = this.executionContext.start(); const docLinkStart = this.docLinks.start(); const elasticsearchStart = await this.elasticsearch.start(); @@ -323,6 +333,7 @@ export class Server { this.status.start(); this.coreStart = { + analytics: analyticsStart, capabilities: capabilitiesStart, docLinks: docLinkStart, elasticsearch: elasticsearchStart, From dcd11c5f9f9c4597b6b6048025984233c3c19f7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Thu, 24 Mar 2022 21:00:24 +0100 Subject: [PATCH 07/31] Add `server` FTRs --- .../analytics_client/analytics_client.test.ts | 76 +++++++- .../src/analytics_client/analytics_client.ts | 40 ++-- src/core/server/analytics/index.ts | 2 + src/core/server/index.ts | 2 + test/scripts/test/server_integration.sh | 7 + .../plugins/analytics_plugin_a/kibana.json | 8 + .../plugins/analytics_plugin_a/package.json | 14 ++ .../server/custom_shipper.ts | 42 ++++ .../analytics_plugin_a/server/index.ts | 11 ++ .../analytics_plugin_a/server/plugin.ts | 180 ++++++++++++++++++ .../plugins/analytics_plugin_a/tsconfig.json | 15 ++ .../server_integration/analytics/analytics.ts | 120 ++++++++++++ test/server_integration/analytics/config.ts | 40 ++++ test/tsconfig.json | 1 + 14 files changed, 542 insertions(+), 16 deletions(-) create mode 100644 test/server_integration/__fixtures__/plugins/analytics_plugin_a/kibana.json create mode 100644 test/server_integration/__fixtures__/plugins/analytics_plugin_a/package.json create mode 100644 test/server_integration/__fixtures__/plugins/analytics_plugin_a/server/custom_shipper.ts create mode 100644 test/server_integration/__fixtures__/plugins/analytics_plugin_a/server/index.ts create mode 100644 test/server_integration/__fixtures__/plugins/analytics_plugin_a/server/plugin.ts create mode 100644 test/server_integration/__fixtures__/plugins/analytics_plugin_a/tsconfig.json create mode 100644 test/server_integration/analytics/analytics.ts create mode 100644 test/server_integration/analytics/config.ts diff --git a/packages/elastic-analytics/src/analytics_client/analytics_client.test.ts b/packages/elastic-analytics/src/analytics_client/analytics_client.test.ts index 543617740834e6..35139c8d20594f 100644 --- a/packages/elastic-analytics/src/analytics_client/analytics_client.test.ts +++ b/packages/elastic-analytics/src/analytics_client/analytics_client.test.ts @@ -8,7 +8,7 @@ // eslint-disable-next-line max-classes-per-file import type { Observable } from 'rxjs'; -import { Subject } from 'rxjs'; +import { BehaviorSubject, Subject } from 'rxjs'; import type { MockedLogger } from '@kbn/logging-mocks'; import { loggerMock } from '@kbn/logging-mocks'; import { AnalyticsClient } from './analytics_client'; @@ -16,6 +16,8 @@ import { take, toArray } from 'rxjs/operators'; import { shippersMock } from '../shippers/mocks'; import type { EventContext, TelemetryCounter } from '../events'; +const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); + describe('AnalyticsClient', () => { let analyticsClient: AnalyticsClient; let logger: MockedLogger; @@ -307,9 +309,12 @@ describe('AnalyticsClient', () => { expect(optIn).toHaveBeenCalledWith(true); }); - test('Spreads the context updates to the shipper', () => { + test('Spreads the context updates to the shipper (only after opt-in)', async () => { const extendContextMock = jest.fn(); analyticsClient.registerShipper(MockedShipper, { extendContextMock }); + expect(extendContextMock).toHaveBeenCalledTimes(0); // Not until we have opt-in + analyticsClient.optIn({ global: { enabled: true } }); + await delay(10); expect(extendContextMock).toHaveBeenCalledWith({}); // The initial context const context$ = new Subject<{ a_field: boolean }>(); @@ -329,11 +334,22 @@ describe('AnalyticsClient', () => { expect(extendContextMock).toHaveBeenCalledWith({ a_field: true }); // After update }); - test('Handles errors in the shipper', () => { + test('Does not spread the context if opt-in === false', async () => { + const extendContextMock = jest.fn(); + analyticsClient.registerShipper(MockedShipper, { extendContextMock }); + expect(extendContextMock).toHaveBeenCalledTimes(0); // Not until we have opt-in + analyticsClient.optIn({ global: { enabled: false } }); + await delay(10); + expect(extendContextMock).toHaveBeenCalledTimes(0); // Not until we have opt-in + }); + + test('Handles errors in the shipper', async () => { const extendContextMock = jest.fn().mockImplementation(() => { throw new Error('Something went terribly wrong'); }); analyticsClient.registerShipper(MockedShipper, { extendContextMock }); + analyticsClient.optIn({ global: { enabled: true } }); + await delay(10); expect(extendContextMock).toHaveBeenCalledWith({}); // The initial context expect(logger.warn).toHaveBeenCalledWith( `Shipper "${MockedShipper.shipperName}" failed to extend the context`, @@ -372,6 +388,50 @@ describe('AnalyticsClient', () => { ]); }); + test('It does not break if context emits `undefined`', async () => { + const context$ = new Subject<{ a_field: boolean }>(); + analyticsClient.registerContextProvider({ + schema: { + a_field: { + type: 'boolean', + _meta: { + description: 'a_field description', + }, + }, + }, + context$, + }); + + const globalContextPromise = globalContext$.pipe(take(3), toArray()).toPromise(); + context$.next(); + context$.next(undefined); + await expect(globalContextPromise).resolves.toEqual([ + {}, // Original empty state + {}, + {}, + ]); + }); + + test('It does not break for BehaviourSubjects (emitting as soon as they connect)', async () => { + const context$ = new BehaviorSubject<{ a_field: boolean }>({ a_field: true }); + analyticsClient.registerContextProvider({ + schema: { + a_field: { + type: 'boolean', + _meta: { + description: 'a_field description', + }, + }, + }, + context$, + }); + + const globalContextPromise = globalContext$.pipe(take(1), toArray()).toPromise(); + await expect(globalContextPromise).resolves.toEqual([ + { a_field: true }, // No original empty state + ]); + }); + test('Merges all the contexts together', async () => { const contextA$ = new Subject<{ a_field: boolean }>(); analyticsClient.registerContextProvider({ @@ -481,10 +541,11 @@ describe('AnalyticsClient', () => { context$, }); - // The size of the registry grows + const globalContextPromise = globalContext$.pipe(take(4), toArray()).toPromise(); + context$.next({ a_field: true }); + // The size of the registry grows on the first emission expect(contextProvidersRegistry.size).toBe(1); - const globalContextPromise = globalContext$.pipe(take(3), toArray()).toPromise(); context$.next({ a_field: true }); // Still in the registry expect(contextProvidersRegistry.size).toBe(1); @@ -494,6 +555,7 @@ describe('AnalyticsClient', () => { await expect(globalContextPromise).resolves.toEqual([ {}, // Original empty state { a_field: true }, + { a_field: true }, {}, ]); }); @@ -687,6 +749,7 @@ describe('AnalyticsClient', () => { const reportEventsMock = jest.fn(); analyticsClient.registerShipper(MockedShipper1, { reportEventsMock }); analyticsClient.optIn({ global: { enabled: true } }); + await delay(10); expect(reportEventsMock).toHaveBeenCalledTimes(2); expect(reportEventsMock).toHaveBeenNthCalledWith(1, [ @@ -810,6 +873,7 @@ describe('AnalyticsClient', () => { global: { enabled: true }, event_types: { ['event-type-a']: { enabled: false } }, }); + await delay(10); expect(reportEventsMock).toHaveBeenCalledTimes(1); expect(reportEventsMock).toHaveBeenNthCalledWith(1, [ @@ -875,6 +939,7 @@ describe('AnalyticsClient', () => { ['event-type-a']: { enabled: true, shippers: { [MockedShipper2.shipperName]: false } }, }, }); + await delay(10); expect(reportEventsMock1).toHaveBeenCalledTimes(2); expect(reportEventsMock1).toHaveBeenNthCalledWith(1, [ @@ -970,6 +1035,7 @@ describe('AnalyticsClient', () => { ['event-type-a']: { enabled: true }, }, }); + await delay(10); expect(reportEventsMock1).toHaveBeenCalledTimes(2); expect(reportEventsMock1).toHaveBeenNthCalledWith(1, [ diff --git a/packages/elastic-analytics/src/analytics_client/analytics_client.ts b/packages/elastic-analytics/src/analytics_client/analytics_client.ts index 901cfa6e35e44e..742680f98947e3 100644 --- a/packages/elastic-analytics/src/analytics_client/analytics_client.ts +++ b/packages/elastic-analytics/src/analytics_client/analytics_client.ts @@ -6,18 +6,20 @@ * Side Public License, v 1. */ -import type { Observable, Subscription } from 'rxjs'; +import type { Observable } from 'rxjs'; import { BehaviorSubject, Subject, combineLatest, from } from 'rxjs'; import { buffer, bufferCount, concatMap, + delay, filter, groupBy, map, mergeMap, share, shareReplay, + skipWhile, takeUntil, tap, } from 'rxjs/operators'; @@ -54,23 +56,26 @@ export class AnalyticsClient implements IAnalyticsClient { private readonly shipperRegistered$ = new Subject(); private readonly eventTypeRegistry = new Map>(); private readonly context$ = new BehaviorSubject>({}); - private readonly contextWithReplay$ = this.context$.pipe(shareReplay(1)); private readonly contextProvidersRegistry = new Map< Observable>, - { subscription: Subscription; context: Partial } + Partial >(); private readonly optInConfig$ = new BehaviorSubject(undefined); private readonly optInConfigWithReplay$ = this.optInConfig$.pipe( filter((optInConfig): optInConfig is OptInConfig => typeof optInConfig !== 'undefined'), shareReplay(1) ); + private readonly contextWithReplay$ = this.context$.pipe( + skipWhile(() => !this.optInConfig$.value), // Do not forward the context events until we have an optInConfig value + shareReplay(1) + ); constructor(private readonly initContext: AnalyticsClientInitContext) { this.telemetryCounter$ = this.internalTelemetryCounter$.pipe(share()); // Using `share` so we can have multiple subscribers // Observer that will emit when both events occur: the OptInConfig is set + a shipper has been registered const configReceivedAndShipperReceivedObserver$ = combineLatest([ - this.optInConfig$.pipe(filter((optInConfig) => typeof optInConfig !== 'undefined')), + this.optInConfigWithReplay$, this.shipperRegistered$, ]); @@ -83,6 +88,20 @@ export class AnalyticsClient implements IAnalyticsClient { // Accumulate the events until we can send them buffer(configReceivedAndShipperReceivedObserver$), + // Minimal delay only to make this chain async and let the optIn operation to complete first. + delay(0), + + // Re-emit the context to make sure all the shippers got it (only if opted-in) + tap(() => { + if (this.optInConfig$.value?.global.enabled) { + this.context$.next(this.context$.value); + } + }), + + // Minimal delay only to make this chain async and let + // the context update operation to complete first. + delay(0), + // Flatten the array of events concatMap((events) => from(events)), @@ -181,7 +200,8 @@ export class AnalyticsClient implements IAnalyticsClient { }; public registerContextProvider = (contextProviderOpts: ContextProviderOpts) => { - const subscription = contextProviderOpts.context$ + // const contextProviderID = `context_provider_${Date.now()}`; + contextProviderOpts.context$ .pipe( tap((ctx) => { if (this.initContext.isDev) { @@ -191,7 +211,9 @@ export class AnalyticsClient implements IAnalyticsClient { ) .subscribe({ next: (ctx) => { - this.contextProvidersRegistry.get(contextProviderOpts.context$)!.context = ctx; + // We store each context linked to the context provider so they can increase and reduce + // the number of fields they report without having left-overs in the global context. + this.contextProvidersRegistry.set(contextProviderOpts.context$, ctx); // For every context change, we rebuild the global context. // It's better to do it here than to rebuild it for every reportEvent. @@ -203,10 +225,6 @@ export class AnalyticsClient implements IAnalyticsClient { this.updateGlobalContext(); }, }); - - // We store each context linked to the context provider so they can increase and reduce - // the number of fields they report without having left-overs in the global context. - this.contextProvidersRegistry.set(contextProviderOpts.context$, { subscription, context: {} }); }; public registerShipper = ( @@ -320,7 +338,7 @@ export class AnalyticsClient implements IAnalyticsClient { */ private updateGlobalContext() { this.context$.next( - [...this.contextProvidersRegistry.values()].reduce((acc, { context }) => { + [...this.contextProvidersRegistry.values()].reduce((acc, context) => { return { ...acc, ...context, diff --git a/src/core/server/analytics/index.ts b/src/core/server/analytics/index.ts index fd9e86daf43e6f..413292958e61da 100644 --- a/src/core/server/analytics/index.ts +++ b/src/core/server/analytics/index.ts @@ -15,6 +15,8 @@ export type { export type { AnalyticsClient, + Event, + EventContext, EventType, EventTypeOpts, IShipper, diff --git a/src/core/server/index.ts b/src/core/server/index.ts index 70c6692270e245..fe238dd9927577 100644 --- a/src/core/server/index.ts +++ b/src/core/server/index.ts @@ -452,6 +452,8 @@ export type { AnalyticsServicePreboot, AnalyticsServiceStart, AnalyticsClient, + Event, + EventContext, EventType, EventTypeOpts, IShipper, diff --git a/test/scripts/test/server_integration.sh b/test/scripts/test/server_integration.sh index 6ec08c7727e205..f0e34a8ce78909 100755 --- a/test/scripts/test/server_integration.sh +++ b/test/scripts/test/server_integration.sh @@ -19,3 +19,10 @@ checks-reporter-with-killswitch "Status Integration Tests" \ --config test/server_integration/http/platform/config.status.ts \ --bail \ --debug \ + +# Tests that must be run against source in order to build test plugins +checks-reporter-with-killswitch "Analytics Integration Tests" \ + node scripts/functional_tests \ + --config test/server_integration/analytics/config.ts \ + --bail \ + --debug \ diff --git a/test/server_integration/__fixtures__/plugins/analytics_plugin_a/kibana.json b/test/server_integration/__fixtures__/plugins/analytics_plugin_a/kibana.json new file mode 100644 index 00000000000000..1d0f0e17fbffd3 --- /dev/null +++ b/test/server_integration/__fixtures__/plugins/analytics_plugin_a/kibana.json @@ -0,0 +1,8 @@ +{ + "id": "analyticsPluginA", + "owner": { "name": "Core", "githubTeam": "kibana-core" }, + "version": "0.0.1", + "kibanaVersion": "kibana", + "server": true, + "ui": false +} diff --git a/test/server_integration/__fixtures__/plugins/analytics_plugin_a/package.json b/test/server_integration/__fixtures__/plugins/analytics_plugin_a/package.json new file mode 100644 index 00000000000000..0c008f87c7e30c --- /dev/null +++ b/test/server_integration/__fixtures__/plugins/analytics_plugin_a/package.json @@ -0,0 +1,14 @@ +{ + "name": "analytics_plugin_a", + "version": "1.0.0", + "main": "target/test/server_integration/__fixtures__/plugins/analytics_plugin_a", + "kibana": { + "version": "kibana", + "templateVersion": "1.0.0" + }, + "license": "SSPL-1.0 OR Elastic License 2.0", + "scripts": { + "kbn": "node ../../../../../../scripts/kbn.js", + "build": "rm -rf './target' && ../../../../../../node_modules/.bin/tsc" + } +} \ No newline at end of file diff --git a/test/server_integration/__fixtures__/plugins/analytics_plugin_a/server/custom_shipper.ts b/test/server_integration/__fixtures__/plugins/analytics_plugin_a/server/custom_shipper.ts new file mode 100644 index 00000000000000..98c6e5b55ab8a4 --- /dev/null +++ b/test/server_integration/__fixtures__/plugins/analytics_plugin_a/server/custom_shipper.ts @@ -0,0 +1,42 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { Subject } from 'rxjs'; +import type { IShipper, Event, EventContext, TelemetryCounter } from 'src/core/server'; + +export interface Action { + action: string; + meta: any; +} + +export class CustomShipper implements IShipper { + public static shipperName = 'FTR-shipper'; + + public telemetryCounter$ = new Subject(); + + constructor(private readonly actions$: Subject) {} + + public reportEvents(events: Event[]) { + this.actions$.next({ action: 'reportEvents', meta: events }); + events.forEach((event) => { + this.telemetryCounter$.next({ + type: 'succeed', + event_type: event.event_type, + code: '200', + count: 1, + source: 'random_value', + }); + }); + } + optIn(isOptedIn: boolean) { + this.actions$.next({ action: 'optIn', meta: isOptedIn }); + } + extendContext(newContext: EventContext) { + this.actions$.next({ action: 'extendContext', meta: newContext }); + } +} diff --git a/test/server_integration/__fixtures__/plugins/analytics_plugin_a/server/index.ts b/test/server_integration/__fixtures__/plugins/analytics_plugin_a/server/index.ts new file mode 100644 index 00000000000000..65d2593c427f56 --- /dev/null +++ b/test/server_integration/__fixtures__/plugins/analytics_plugin_a/server/index.ts @@ -0,0 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { AnalyticsPluginAPlugin } from './plugin'; + +export const plugin = () => new AnalyticsPluginAPlugin(); diff --git a/test/server_integration/__fixtures__/plugins/analytics_plugin_a/server/plugin.ts b/test/server_integration/__fixtures__/plugins/analytics_plugin_a/server/plugin.ts new file mode 100644 index 00000000000000..991e6763af0eec --- /dev/null +++ b/test/server_integration/__fixtures__/plugins/analytics_plugin_a/server/plugin.ts @@ -0,0 +1,180 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { BehaviorSubject, ReplaySubject, Subject } from 'rxjs'; +import { schema } from '@kbn/config-schema'; +import type { Plugin, CoreSetup, CoreStart, TelemetryCounter } from 'src/core/server'; +import { take, toArray } from 'rxjs/operators'; +import type { Action } from './custom_shipper'; +import { CustomShipper } from './custom_shipper'; + +export class AnalyticsPluginAPlugin implements Plugin { + public setup({ analytics, http }: CoreSetup, deps: {}) { + const { + optIn, + registerContextProvider, + registerEventType, + registerShipper, + reportEvent, + telemetryCounter$, + } = analytics; + + const stats: TelemetryCounter[] = []; + telemetryCounter$.subscribe((event) => stats.push(event)); + + registerEventType({ + eventType: 'test-plugin-lifecycle', + schema: { + plugin: { + type: 'keyword', + _meta: { + description: 'The ID of the plugin', + }, + }, + step: { + type: 'keyword', + _meta: { + description: 'The lifecycle step in which the plugin is', + }, + }, + }, + }); + + // Report an event before the shipper is registered + reportEvent('test-plugin-lifecycle', { + plugin: 'analyticsPluginA', + step: 'setup', + }); + + const actions$ = new ReplaySubject(); + registerShipper(CustomShipper, actions$); + + const router = http.createRouter(); + + router.post( + { + path: '/internal/analytics_plugin_a/opt_in', + validate: { + query: schema.object({ + consent: schema.boolean(), + }), + }, + }, + (context, req, res) => { + const { consent } = req.query; + + optIn({ global: { enabled: consent } }); + + return res.ok(); + } + ); + + const context$ = new Subject(); + registerContextProvider({ + context$, + schema: { + custom_context: { + type: 'pass_through', + _meta: { + description: + 'Passing through anything that is reported via the HTTP API below for testing', + }, + }, + }, + }); + + router.post( + { + path: '/internal/analytics_plugin_a/enrich_context', + validate: { + body: schema.object({ + context: schema.recordOf(schema.string(), schema.any()), + }), + }, + }, + (context, req, res) => { + context$.next({ custom_context: req.body.context }); + + return res.ok(); + } + ); + + router.post( + { + path: '/internal/analytics_plugin_a/report_event', + validate: { + body: schema.object({ + eventName: schema.string(), + event: schema.recordOf(schema.string(), schema.any()), + }), + }, + }, + (context, req, res) => { + // this is likely to fail because the event type is not registered + reportEvent(req.body.eventName, req.body.event); + + return res.ok(); + } + ); + + router.get( + { + path: '/internal/analytics_plugin_a/stats', + validate: { + query: schema.object({ + takeNumberOfCounters: schema.number({ min: 1 }), + }), + }, + }, + async (context, req, res) => { + const { takeNumberOfCounters } = req.query; + + return res.ok({ body: stats.slice(-takeNumberOfCounters) }); + } + ); + + router.get( + { + path: '/internal/analytics_plugin_a/actions', + validate: { + query: schema.object({ + takeNumberOfActions: schema.number({ min: 1 }), + }), + }, + }, + async (context, req, res) => { + const { takeNumberOfActions } = req.query; + + const actions = await actions$.pipe(take(takeNumberOfActions), toArray()).toPromise(); + + return res.ok({ body: actions }); + } + ); + } + + public start({ analytics }: CoreStart) { + analytics.registerContextProvider({ + context$: new BehaviorSubject({ pid: process.pid }), + schema: { + pid: { + type: 'short', + _meta: { + description: 'The Kibana process ID', + }, + }, + }, + }); + + analytics.reportEvent('test-plugin-lifecycle', { + plugin: 'analyticsPluginA', + step: 'start', + }); + } + + public stop() {} +} diff --git a/test/server_integration/__fixtures__/plugins/analytics_plugin_a/tsconfig.json b/test/server_integration/__fixtures__/plugins/analytics_plugin_a/tsconfig.json new file mode 100644 index 00000000000000..14ebb2e7d00c47 --- /dev/null +++ b/test/server_integration/__fixtures__/plugins/analytics_plugin_a/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../../../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./target/types", + }, + "include": [ + "index.ts", + "server/**/*.ts", + "../../../../../../typings/**/*", + ], + "exclude": [], + "references": [ + { "path": "../../../../../src/core/tsconfig.json" } + ] +} diff --git a/test/server_integration/analytics/analytics.ts b/test/server_integration/analytics/analytics.ts new file mode 100644 index 00000000000000..af22d9c07ffab6 --- /dev/null +++ b/test/server_integration/analytics/analytics.ts @@ -0,0 +1,120 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import expect from '@kbn/expect'; +import type { TelemetryCounter } from 'src/core/server'; +import { FtrProviderContext } from '../services/types'; +import { Action } from '../__fixtures__/plugins/analytics_plugin_a/server/custom_shipper'; + +// eslint-disable-next-line import/no-default-export +export default function ({ getService }: FtrProviderContext) { + const supertest = getService('supertest'); + + const getTelemetryCounters = async ( + takeNumberOfCounters: number + ): Promise => { + const resp = await supertest + .get(`/internal/analytics_plugin_a/stats`) + .query({ takeNumberOfCounters }) + .set('kbn-xsrf', 'xxx') + .expect(200); + + return resp.body; + }; + + const getActions = async (takeNumberOfActions: number): Promise => { + const resp = await supertest + .get(`/internal/analytics_plugin_a/actions`) + .query({ takeNumberOfActions }) + .set('kbn-xsrf', 'xxx') + .expect(200); + + return resp.body; + }; + + describe('analytics service', () => { + // this test should run first because it depends on optInConfig being undefined + it('should have internally enqueued the "lifecycle" events but not handed over to the shipper yet', async () => { + const telemetryCounters = await getTelemetryCounters(2); + expect(telemetryCounters).to.eql([ + { + type: 'enqueued', + event_type: 'test-plugin-lifecycle', + source: 'client', + code: 'enqueued', + count: 1, + }, + { + type: 'enqueued', + event_type: 'test-plugin-lifecycle', + source: 'client', + code: 'enqueued', + count: 1, + }, + ]); + }); + + it('after setting opt-in, it should extend the contexts and send the events', async () => { + await supertest + .post(`/internal/analytics_plugin_a/opt_in`) + .set('kbn-xsrf', 'xxx') + .query({ consent: true }) + .expect(200); + + const actions = await getActions(3); + // Treating the PID as remote because the tests may run the server in a separate process to the suites + const remotePID = actions[1].meta.pid; + expect(actions).to.eql([ + { action: 'optIn', meta: true }, + { action: 'extendContext', meta: { pid: remotePID } }, + { + action: 'reportEvents', + meta: [ + { + timestamp: actions[2].meta[0].timestamp, + event_type: 'test-plugin-lifecycle', + context: {}, + properties: { plugin: 'analyticsPluginA', step: 'setup' }, + }, + { + timestamp: actions[2].meta[1].timestamp, + event_type: 'test-plugin-lifecycle', + context: { pid: remotePID }, + properties: { plugin: 'analyticsPluginA', step: 'start' }, + }, + ], + }, + ]); + + const telemetryCounters = await getTelemetryCounters(3); + expect(telemetryCounters).to.eql([ + { + type: 'succeed', + event_type: 'test-plugin-lifecycle', + source: 'FTR-shipper', + code: '200', + count: 1, + }, + { + type: 'succeed', + event_type: 'test-plugin-lifecycle', + source: 'FTR-shipper', + code: '200', + count: 1, + }, + { + type: 'sent_to_shipper', + event_type: 'test-plugin-lifecycle', + source: 'client', + code: 'OK', + count: 2, + }, + ]); + }); + }); +} diff --git a/test/server_integration/analytics/config.ts b/test/server_integration/analytics/config.ts new file mode 100644 index 00000000000000..a68de8eff37b38 --- /dev/null +++ b/test/server_integration/analytics/config.ts @@ -0,0 +1,40 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import path from 'path'; +import { FtrConfigProviderContext } from '@kbn/test'; + +/* + * These tests exist in a separate configuration because: + * 1) It must run as the first test after Kibana launches to clear the unavailable status. A separate config makes this + * easier to manage and prevent from breaking. + * 2) The other server_integration tests run against a built distributable, however the FTR does not support building + * and installing plugins against built Kibana. This test must be run against source only in order to build the + * fixture plugins + */ +// eslint-disable-next-line import/no-default-export +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const baseConfig = await readConfigFile(require.resolve('../config')); + + return { + testFiles: [require.resolve('./analytics')], + services: baseConfig.get('services'), + servers: baseConfig.get('servers'), + junit: { + reportName: 'Kibana Platform Analytics Integration Tests', + }, + esTestCluster: baseConfig.get('esTestCluster'), + kbnTestServer: { + ...baseConfig.get('kbnTestServer'), + serverArgs: [ + ...baseConfig.get('kbnTestServer.serverArgs'), + `--plugin-path=${path.resolve(__dirname, '../__fixtures__/plugins/analytics_plugin_a')}`, + ], + }, + }; +} diff --git a/test/tsconfig.json b/test/tsconfig.json index ace3842ead79e3..f98115f0fc04a7 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -56,6 +56,7 @@ { "path": "interactive_setup_api_integration/fixtures/test_endpoints/tsconfig.json" }, { "path": "plugin_functional/plugins/core_app_status/tsconfig.json" }, { "path": "plugin_functional/plugins/core_provider_plugin/tsconfig.json" }, + { "path": "server_integration/__fixtures__/plugins/analytics_plugin_a/tsconfig.json" }, { "path": "server_integration/__fixtures__/plugins/status_plugin_a/tsconfig.json" }, { "path": "server_integration/__fixtures__/plugins/status_plugin_b/tsconfig.json" }, ] From 1bca34b695c7fe1a2bfa49bc558e11e5327b0bd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Thu, 24 Mar 2022 21:19:22 +0100 Subject: [PATCH 08/31] AcceptDocChanges --- src/core/server/server.api.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/server/server.api.md b/src/core/server/server.api.md index aebd455e3b7d8c..987f9ae5b87f15 100644 --- a/src/core/server/server.api.md +++ b/src/core/server/server.api.md @@ -34,6 +34,8 @@ import { EcsEventType } from '@kbn/logging'; import { EnvironmentMode } from '@kbn/config'; import { errors } from '@elastic/elasticsearch'; import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { Event as Event_2 } from '@elastic/analytics'; +import { EventContext } from '@elastic/analytics'; import { EventType } from '@elastic/analytics'; import { EventTypeOpts } from '@elastic/analytics'; import { IncomingHttpHeaders } from 'http'; @@ -1014,6 +1016,10 @@ export interface ErrorHttpResponseOptions { headers?: ResponseHeaders; } +export { Event_2 as Event } + +export { EventContext } + // Warning: (ae-missing-release-tag) "EventLoopDelaysMonitor" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) From 8372429075465e882ce535a7f8aaded829b4cab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Fri, 25 Mar 2022 21:38:34 +0100 Subject: [PATCH 09/31] Add `public/core.analytics` --- ...lugin-core-public.analyticsservicesetup.md | 13 +++ ...lugin-core-public.analyticsservicestart.md | 13 +++ ...-plugin-core-public.coresetup.analytics.md | 13 +++ .../kibana-plugin-core-public.coresetup.md | 1 + ...-plugin-core-public.corestart.analytics.md | 13 +++ .../kibana-plugin-core-public.corestart.md | 1 + .../core/public/kibana-plugin-core-public.md | 2 + .../analytics/analytics_service.mock.ts | 46 +++++++++++ .../public/analytics/analytics_service.ts | 80 +++++++++++++++++++ src/core/public/analytics/index.ts | 23 ++++++ src/core/public/core_system.ts | 9 +++ src/core/public/index.ts | 20 +++++ src/core/public/plugins/plugin_context.ts | 2 + src/core/public/public.api.md | 46 ++++++++++- 14 files changed, 281 insertions(+), 1 deletion(-) create mode 100644 docs/development/core/public/kibana-plugin-core-public.analyticsservicesetup.md create mode 100644 docs/development/core/public/kibana-plugin-core-public.analyticsservicestart.md create mode 100644 docs/development/core/public/kibana-plugin-core-public.coresetup.analytics.md create mode 100644 docs/development/core/public/kibana-plugin-core-public.corestart.analytics.md create mode 100644 src/core/public/analytics/analytics_service.mock.ts create mode 100644 src/core/public/analytics/analytics_service.ts create mode 100644 src/core/public/analytics/index.ts diff --git a/docs/development/core/public/kibana-plugin-core-public.analyticsservicesetup.md b/docs/development/core/public/kibana-plugin-core-public.analyticsservicesetup.md new file mode 100644 index 00000000000000..b1d059fe556b4f --- /dev/null +++ b/docs/development/core/public/kibana-plugin-core-public.analyticsservicesetup.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [AnalyticsServiceSetup](./kibana-plugin-core-public.analyticsservicesetup.md) + +## AnalyticsServiceSetup type + +Exposes the public APIs of the AnalyticsClient during the setup phase. + +Signature: + +```typescript +export declare type AnalyticsServiceSetup = AnalyticsClient; +``` diff --git a/docs/development/core/public/kibana-plugin-core-public.analyticsservicestart.md b/docs/development/core/public/kibana-plugin-core-public.analyticsservicestart.md new file mode 100644 index 00000000000000..53e31769892415 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-core-public.analyticsservicestart.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [AnalyticsServiceStart](./kibana-plugin-core-public.analyticsservicestart.md) + +## AnalyticsServiceStart type + +Exposes the public APIs of the AnalyticsClient during the start phase + +Signature: + +```typescript +export declare type AnalyticsServiceStart = AnalyticsClient; +``` diff --git a/docs/development/core/public/kibana-plugin-core-public.coresetup.analytics.md b/docs/development/core/public/kibana-plugin-core-public.coresetup.analytics.md new file mode 100644 index 00000000000000..13c5fbdbee32d7 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-core-public.coresetup.analytics.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [CoreSetup](./kibana-plugin-core-public.coresetup.md) > [analytics](./kibana-plugin-core-public.coresetup.analytics.md) + +## CoreSetup.analytics property + +[AnalyticsServiceSetup](./kibana-plugin-core-public.analyticsservicesetup.md) + +Signature: + +```typescript +analytics: AnalyticsServiceSetup; +``` diff --git a/docs/development/core/public/kibana-plugin-core-public.coresetup.md b/docs/development/core/public/kibana-plugin-core-public.coresetup.md index 31793ec6f7a581..0298ac904f9522 100644 --- a/docs/development/core/public/kibana-plugin-core-public.coresetup.md +++ b/docs/development/core/public/kibana-plugin-core-public.coresetup.md @@ -16,6 +16,7 @@ export interface CoreSetup + +[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [CoreStart](./kibana-plugin-core-public.corestart.md) > [analytics](./kibana-plugin-core-public.corestart.analytics.md) + +## CoreStart.analytics property + +[AnalyticsServiceStart](./kibana-plugin-core-public.analyticsservicestart.md) + +Signature: + +```typescript +analytics: AnalyticsServiceStart; +``` diff --git a/docs/development/core/public/kibana-plugin-core-public.corestart.md b/docs/development/core/public/kibana-plugin-core-public.corestart.md index edd80e1adb9f98..34576c4df2e408 100644 --- a/docs/development/core/public/kibana-plugin-core-public.corestart.md +++ b/docs/development/core/public/kibana-plugin-core-public.corestart.md @@ -16,6 +16,7 @@ export interface CoreStart | Property | Type | Description | | --- | --- | --- | +| [analytics](./kibana-plugin-core-public.corestart.analytics.md) | AnalyticsServiceStart | [AnalyticsServiceStart](./kibana-plugin-core-public.analyticsservicestart.md) | | [application](./kibana-plugin-core-public.corestart.application.md) | ApplicationStart | [ApplicationStart](./kibana-plugin-core-public.applicationstart.md) | | [chrome](./kibana-plugin-core-public.corestart.chrome.md) | ChromeStart | [ChromeStart](./kibana-plugin-core-public.chromestart.md) | | [deprecations](./kibana-plugin-core-public.corestart.deprecations.md) | DeprecationsServiceStart | [DeprecationsServiceStart](./kibana-plugin-core-public.deprecationsservicestart.md) | diff --git a/docs/development/core/public/kibana-plugin-core-public.md b/docs/development/core/public/kibana-plugin-core-public.md index 2e51a036dfe9f6..edd818c4fd889f 100644 --- a/docs/development/core/public/kibana-plugin-core-public.md +++ b/docs/development/core/public/kibana-plugin-core-public.md @@ -150,6 +150,8 @@ The plugin integrates with the core system via lifecycle events: `setup` | Type Alias | Description | | --- | --- | +| [AnalyticsServiceSetup](./kibana-plugin-core-public.analyticsservicesetup.md) | Exposes the public APIs of the AnalyticsClient during the setup phase. | +| [AnalyticsServiceStart](./kibana-plugin-core-public.analyticsservicestart.md) | Exposes the public APIs of the AnalyticsClient during the start phase | | [AppDeepLink](./kibana-plugin-core-public.appdeeplink.md) | Input type for registering secondary in-app locations for an application.Deep links must include at least one of path or deepLinks. A deep link that does not have a path represents a topological level in the application's hierarchy, but does not have a destination URL that is user-accessible. | | [AppLeaveAction](./kibana-plugin-core-public.appleaveaction.md) | Possible actions to return from a [AppLeaveHandler](./kibana-plugin-core-public.appleavehandler.md)See [AppLeaveConfirmAction](./kibana-plugin-core-public.appleaveconfirmaction.md) and [AppLeaveDefaultAction](./kibana-plugin-core-public.appleavedefaultaction.md) | | [AppLeaveHandler](./kibana-plugin-core-public.appleavehandler.md) | A handler that will be executed before leaving the application, either when going to another application or when closing the browser tab or manually changing the url. Should return confirm to prompt a message to the user before leaving the page, or default to keep the default behavior (doing nothing).See [AppMountParameters](./kibana-plugin-core-public.appmountparameters.md) for detailed usage examples. | diff --git a/src/core/public/analytics/analytics_service.mock.ts b/src/core/public/analytics/analytics_service.mock.ts new file mode 100644 index 00000000000000..50048ba188ba6a --- /dev/null +++ b/src/core/public/analytics/analytics_service.mock.ts @@ -0,0 +1,46 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { PublicMethodsOf } from '@kbn/utility-types'; +import type { AnalyticsClient } from '@elastic/analytics'; +import { createAnalytics } from '@elastic/analytics'; +import { loggerMock } from '@kbn/logging-mocks'; +import type { AnalyticsService } from './analytics_service'; + +type AnalyticsServiceContract = PublicMethodsOf; + +const createAnalyticsClientMock = (): jest.Mocked => { + const analyticsClient = createAnalytics({ + isDev: true, + sendTo: 'staging', + logger: loggerMock.create(), + }); + + return { + optIn: jest.fn().mockImplementation(analyticsClient.optIn), + reportEvent: jest.fn().mockImplementation(analyticsClient.reportEvent), + registerEventType: jest.fn().mockImplementation(analyticsClient.registerEventType), + registerContextProvider: jest.fn().mockImplementation(analyticsClient.registerContextProvider), + registerShipper: jest.fn().mockImplementation(analyticsClient.registerShipper), + telemetryCounter$: analyticsClient.telemetryCounter$, + }; +}; + +const createAnalyticsServiceMock = (): jest.Mocked => { + return { + setup: jest.fn().mockImplementation(createAnalyticsClientMock), + start: jest.fn().mockImplementation(createAnalyticsClientMock), + }; +}; + +export const analyticsServiceMock = { + create: createAnalyticsServiceMock, + createAnalyticsServicePreboot: createAnalyticsClientMock, + createAnalyticsServiceSetup: createAnalyticsClientMock, + createAnalyticsServiceStart: createAnalyticsClientMock, +}; diff --git a/src/core/public/analytics/analytics_service.ts b/src/core/public/analytics/analytics_service.ts new file mode 100644 index 00000000000000..1cbcfd3e2e9d24 --- /dev/null +++ b/src/core/public/analytics/analytics_service.ts @@ -0,0 +1,80 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { AnalyticsClient } from '@elastic/analytics'; +import type { Logger } from '@kbn/logging'; +import { createAnalytics } from '@elastic/analytics'; +import { CoreContext } from '../core_system'; + +/** + * Exposes the public APIs of the AnalyticsClient during the setup phase. + * {@link AnalyticsClient} + * @public + */ +export type AnalyticsServiceSetup = AnalyticsClient; +/** + * Exposes the public APIs of the AnalyticsClient during the start phase + * {@link AnalyticsClient} + * @public + */ +export type AnalyticsServiceStart = AnalyticsClient; + +export class AnalyticsService { + private readonly analyticsClient: AnalyticsClient; + + constructor(core: CoreContext) { + // TODO: Replace with a core logger once we implement it. + // For now, it logs only in dev mode + const logger: Logger = { + // eslint-disable-next-line no-console + fatal: (...args) => (core.env.mode.dev ? console.error(...args) : void 0), + // eslint-disable-next-line no-console + error: (...args) => (core.env.mode.dev ? console.error(...args) : void 0), + // eslint-disable-next-line no-console + warn: (...args) => (core.env.mode.dev ? console.warn(...args) : void 0), + // eslint-disable-next-line no-console + info: (...args) => (core.env.mode.dev ? console.info(...args) : void 0), + // eslint-disable-next-line no-console + debug: (...args) => (core.env.mode.dev ? console.debug(...args) : void 0), + // eslint-disable-next-line no-console + trace: (...args) => (core.env.mode.dev ? console.trace(...args) : void 0), + // eslint-disable-next-line no-console + log: (...args) => (core.env.mode.dev ? console.log(...args) : void 0), + get: () => logger, + }; + + this.analyticsClient = createAnalytics({ + isDev: core.env.mode.dev, + logger, + // TODO: We need to be able to edit sendTo once we resolve the telemetry config. + // For now, we are relying on whether it's a distributable or running from source. + sendTo: core.env.packageInfo.dist ? 'production' : 'staging', + }); + } + + public setup(): AnalyticsServiceSetup { + return { + optIn: this.analyticsClient.optIn, + registerContextProvider: this.analyticsClient.registerContextProvider, + registerEventType: this.analyticsClient.registerEventType, + registerShipper: this.analyticsClient.registerShipper, + reportEvent: this.analyticsClient.reportEvent, + telemetryCounter$: this.analyticsClient.telemetryCounter$, + }; + } + public start(): AnalyticsServiceStart { + return { + optIn: this.analyticsClient.optIn, + registerContextProvider: this.analyticsClient.registerContextProvider, + registerEventType: this.analyticsClient.registerEventType, + registerShipper: this.analyticsClient.registerShipper, + reportEvent: this.analyticsClient.reportEvent, + telemetryCounter$: this.analyticsClient.telemetryCounter$, + }; + } +} diff --git a/src/core/public/analytics/index.ts b/src/core/public/analytics/index.ts new file mode 100644 index 00000000000000..f6b961102ef865 --- /dev/null +++ b/src/core/public/analytics/index.ts @@ -0,0 +1,23 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { AnalyticsService } from './analytics_service'; +export type { AnalyticsServiceSetup, AnalyticsServiceStart } from './analytics_service'; + +export type { + AnalyticsClient, + Event, + EventContext, + EventType, + EventTypeOpts, + IShipper, + ShipperClassConstructor, + OptInConfig, + ContextProviderOpts, + TelemetryCounter, +} from '@elastic/analytics'; diff --git a/src/core/public/core_system.ts b/src/core/public/core_system.ts index 1aa01c13dd3751..8d9dccb856b4e2 100644 --- a/src/core/public/core_system.ts +++ b/src/core/public/core_system.ts @@ -32,6 +32,7 @@ import { ThemeService } from './theme'; import { CoreApp } from './core_app'; import type { InternalApplicationSetup, InternalApplicationStart } from './application/types'; import { ExecutionContextService } from './execution_context'; +import { AnalyticsService } from './analytics'; interface Params { rootDomElement: HTMLElement; @@ -69,6 +70,7 @@ export interface InternalCoreStart extends Omit { * @internal */ export class CoreSystem { + private readonly analytics: AnalyticsService; private readonly fatalErrors: FatalErrorsService; private readonly injectedMetadata: InjectedMetadataService; private readonly notifications: NotificationsService; @@ -103,6 +105,8 @@ export class CoreSystem { }); this.coreContext = { coreId: Symbol('core'), env: injectedMetadata.env }; + this.analytics = new AnalyticsService(this.coreContext); + this.fatalErrors = new FatalErrorsService(rootDomElement, () => { // Stop Core before rendering any fatal errors into the DOM this.stop(); @@ -141,6 +145,8 @@ export class CoreSystem { await this.integrations.setup(); this.docLinks.setup(); + const analytics = this.analytics.setup(); + const executionContext = this.executionContext.setup(); const http = this.http.setup({ injectedMetadata, @@ -155,6 +161,7 @@ export class CoreSystem { this.coreApp.setup({ application, http, injectedMetadata, notifications }); const core: InternalCoreSetup = { + analytics, application, fatalErrors: this.fatalErrorsSetup, http, @@ -182,6 +189,7 @@ export class CoreSystem { public async start() { try { + const analytics = this.analytics.start(); const injectedMetadata = await this.injectedMetadata.start(); const uiSettings = await this.uiSettings.start(); const docLinks = this.docLinks.start({ injectedMetadata }); @@ -228,6 +236,7 @@ export class CoreSystem { this.coreApp.start({ application, docLinks, http, notifications, uiSettings }); const core: InternalCoreStart = { + analytics, application, chrome, docLinks, diff --git a/src/core/public/index.ts b/src/core/public/index.ts index 3b3bccd7ec18b2..351970de43e645 100644 --- a/src/core/public/index.ts +++ b/src/core/public/index.ts @@ -60,6 +60,7 @@ import { SavedObjectsStart } from './saved_objects'; import { DeprecationsServiceStart } from './deprecations'; import type { ThemeServiceSetup, ThemeServiceStart } from './theme'; import { ExecutionContextSetup, ExecutionContextStart } from './execution_context'; +import type { AnalyticsServiceSetup, AnalyticsServiceStart } from './analytics'; export type { PackageInfo, @@ -71,6 +72,21 @@ export type { CoreContext, CoreSystem } from './core_system'; export { DEFAULT_APP_CATEGORIES, APP_WRAPPER_CLASS } from '../utils'; export type { AppCategory, UiSettingsParams, UserProvidedValues, UiSettingsType } from '../types'; +export type { + AnalyticsServiceSetup, + AnalyticsServiceStart, + AnalyticsClient, + Event, + EventContext, + EventType, + EventTypeOpts, + IShipper, + ShipperClassConstructor, + OptInConfig, + ContextProviderOpts, + TelemetryCounter, +} from './analytics'; + export { AppNavLinkStatus, AppStatus, ScopedHistory } from './application'; export type { ApplicationSetup, @@ -210,6 +226,8 @@ export type { * https://github.com/Microsoft/web-build-tools/issues/1237 */ export interface CoreSetup { + /** {@link AnalyticsServiceSetup} */ + analytics: AnalyticsServiceSetup; /** {@link ApplicationSetup} */ application: ApplicationSetup; /** {@link FatalErrorsSetup} */ @@ -260,6 +278,8 @@ export type StartServicesAccessor< * https://github.com/Microsoft/web-build-tools/issues/1237 */ export interface CoreStart { + /** {@link AnalyticsServiceStart} */ + analytics: AnalyticsServiceStart; /** {@link ApplicationStart} */ application: ApplicationStart; /** {@link ChromeStart} */ diff --git a/src/core/public/plugins/plugin_context.ts b/src/core/public/plugins/plugin_context.ts index 8c085d3de23693..0311006fc44a36 100644 --- a/src/core/public/plugins/plugin_context.ts +++ b/src/core/public/plugins/plugin_context.ts @@ -83,6 +83,7 @@ export function createPluginSetupContext< plugin: PluginWrapper ): CoreSetup { return { + analytics: deps.analytics, application: { register: (app) => deps.application.register(plugin.opaqueId, app), registerAppUpdater: (statusUpdater$) => deps.application.registerAppUpdater(statusUpdater$), @@ -121,6 +122,7 @@ export function createPluginStartContext< plugin: PluginWrapper ): CoreStart { return { + analytics: deps.analytics, application: { applications$: deps.application.applications$, currentAppId$: deps.application.currentAppId$, diff --git a/src/core/public/public.api.md b/src/core/public/public.api.md index 4ce68770d7f18d..ff0fc1c7f2261e 100644 --- a/src/core/public/public.api.md +++ b/src/core/public/public.api.md @@ -7,11 +7,13 @@ /// import { Action } from 'history'; +import { AnalyticsClient } from '@elastic/analytics'; import Boom from '@hapi/boom'; import type { ButtonColor } from '@elastic/eui'; import { ByteSizeValue } from '@kbn/config-schema'; import type { Client } from '@elastic/elasticsearch'; import { ConfigPath } from '@kbn/config'; +import { ContextProviderOpts } from '@elastic/analytics'; import { DetailedPeerCertificate } from 'tls'; import type { DocLinks } from '@kbn/doc-links'; import { EnvironmentMode } from '@kbn/config'; @@ -22,10 +24,15 @@ import { EuiConfirmModalProps } from '@elastic/eui'; import { EuiFlyoutSize } from '@elastic/eui'; import { EuiGlobalToastListToast } from '@elastic/eui'; import { EuiOverlayMaskProps } from '@elastic/eui'; +import { Event as Event_2 } from '@elastic/analytics'; +import { EventContext } from '@elastic/analytics'; +import { EventType } from '@elastic/analytics'; +import { EventTypeOpts } from '@elastic/analytics'; import { History as History_2 } from 'history'; import { Href } from 'history'; import { IconType } from '@elastic/eui'; import { IncomingHttpHeaders } from 'http'; +import { IShipper } from '@elastic/analytics'; import { Location as Location_2 } from 'history'; import { LocationDescriptorObject } from 'history'; import { Logger } from '@kbn/logging'; @@ -33,6 +40,7 @@ import { LogMeta } from '@kbn/logging'; import { MaybePromise } from '@kbn/utility-types'; import { ObjectType } from '@kbn/config-schema'; import { Observable } from 'rxjs'; +import { OptInConfig } from '@elastic/analytics'; import { PackageInfo } from '@kbn/config'; import { Path } from 'history'; import { PeerCertificate } from 'tls'; @@ -43,6 +51,8 @@ import { RecursiveReadonly } from '@kbn/utility-types'; import { Request as Request_2 } from '@hapi/hapi'; import * as Rx from 'rxjs'; import { SchemaTypeError } from '@kbn/config-schema'; +import { ShipperClassConstructor } from '@elastic/analytics'; +import { TelemetryCounter } from '@elastic/analytics'; import type { ThemeVersion } from '@kbn/ui-shared-deps-npm'; import { TransitionPromptHook } from 'history'; import { Type } from '@kbn/config-schema'; @@ -55,6 +65,18 @@ import { UserProvidedValues as UserProvidedValues_2 } from 'src/core/server/type // @internal (undocumented) export function __kbnBootstrap__(): Promise; +export { AnalyticsClient } + +// Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver +// +// @public +export type AnalyticsServiceSetup = AnalyticsClient; + +// Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver +// +// @public +export type AnalyticsServiceStart = AnalyticsClient; + // @public (undocumented) export interface App extends AppNavOptions { appRoute?: string; @@ -373,6 +395,8 @@ export interface ChromeUserBanner { content: MountPoint; } +export { ContextProviderOpts } + // @internal (undocumented) export interface CoreContext { // Warning: (ae-forgotten-export) The symbol "CoreId" needs to be exported by the entry point index.d.ts @@ -388,6 +412,8 @@ export interface CoreContext { // @public export interface CoreSetup { + // (undocumented) + analytics: AnalyticsServiceSetup; // (undocumented) application: ApplicationSetup; // (undocumented) @@ -412,6 +438,8 @@ export interface CoreSetup { readonly response?: Readonly; } +export { IShipper } + // @public export type IToasts = Pick; @@ -798,6 +836,8 @@ export interface NotificationsStart { toasts: ToastsStart; } +export { OptInConfig } + // @public (undocumented) export interface OverlayBannersStart { add(mount: MountPoint, priority?: number): string; @@ -1389,6 +1429,8 @@ export class ScopedHistory implements History_2< replace: (pathOrLocation: Path | LocationDescriptorObject, state?: HistoryLocationState | undefined) => void; } +export { ShipperClassConstructor } + // @public export class SimpleSavedObject { constructor(client: SavedObjectsClientContract, { id, type, version, attributes, error, references, migrationVersion, coreMigrationVersion, namespaces, updated_at: updatedAt, }: SavedObject); @@ -1426,6 +1468,8 @@ export class SimpleSavedObject { // @public export type StartServicesAccessor = () => Promise<[CoreStart, TPluginsStart, TStart]>; +export { TelemetryCounter } + // @public (undocumented) export interface ThemeServiceSetup { // (undocumented) @@ -1534,6 +1578,6 @@ export interface UserProvidedValues { // Warnings were encountered during analysis: // -// src/core/public/core_system.ts:183:21 - (ae-forgotten-export) The symbol "InternalApplicationStart" needs to be exported by the entry point index.d.ts +// src/core/public/core_system.ts:190:21 - (ae-forgotten-export) The symbol "InternalApplicationStart" needs to be exported by the entry point index.d.ts ``` From 125a3f66e44a6bf28d033c1307491be35f905493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Mon, 28 Mar 2022 10:15:08 +0200 Subject: [PATCH 10/31] Fix core_system tests --- src/core/public/core_system.test.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/core/public/core_system.test.ts b/src/core/public/core_system.test.ts index 74e8782d337393..553c1668951e82 100644 --- a/src/core/public/core_system.test.ts +++ b/src/core/public/core_system.test.ts @@ -48,6 +48,16 @@ const defaultCoreSystemParams = { csp: { warnLegacyBrowsers: true, }, + env: { + mode: { + name: 'development', + dev: true, + prod: false, + }, + packageInfo: { + dist: false, + }, + }, version: 'version', } as any, }; @@ -83,7 +93,7 @@ describe('constructor', () => { }); it('passes injectedMetadata param to InjectedMetadataService', () => { - const injectedMetadata = { injectedMetadata: true } as any; + const injectedMetadata = { env: { mode: { dev: true }, packageInfo: { dist: false } } } as any; createCoreSystem({ injectedMetadata, From 0a356950ebbc98d8f35afdc5eec465e1e88b3cc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Mon, 28 Mar 2022 12:09:28 +0200 Subject: [PATCH 11/31] [FTR] Create new "analytics" suite --- .../scripts/steps/functional/oss_misc.sh | 8 ++++ .../plugins/analytics_plugin_a/kibana.json | 0 .../plugins/analytics_plugin_a/package.json | 2 +- .../server/custom_shipper.ts | 0 .../analytics_plugin_a/server/index.ts | 0 .../analytics_plugin_a/server/plugin.ts | 0 .../plugins/analytics_plugin_a/tsconfig.json | 0 test/analytics/config.ts | 40 +++++++++++++++++++ test/analytics/services/index.ts | 20 ++++++++++ test/analytics/services/supertest.ts | 37 +++++++++++++++++ .../tests}/analytics.ts | 3 +- test/analytics/tests/index.ts | 15 +++++++ test/scripts/test/server_integration.sh | 7 ---- test/server_integration/analytics/config.ts | 40 ------------------- test/tsconfig.json | 2 +- 15 files changed, 123 insertions(+), 51 deletions(-) rename test/{server_integration => analytics}/__fixtures__/plugins/analytics_plugin_a/kibana.json (100%) rename test/{server_integration => analytics}/__fixtures__/plugins/analytics_plugin_a/package.json (79%) rename test/{server_integration => analytics}/__fixtures__/plugins/analytics_plugin_a/server/custom_shipper.ts (100%) rename test/{server_integration => analytics}/__fixtures__/plugins/analytics_plugin_a/server/index.ts (100%) rename test/{server_integration => analytics}/__fixtures__/plugins/analytics_plugin_a/server/plugin.ts (100%) rename test/{server_integration => analytics}/__fixtures__/plugins/analytics_plugin_a/tsconfig.json (100%) create mode 100644 test/analytics/config.ts create mode 100644 test/analytics/services/index.ts create mode 100644 test/analytics/services/supertest.ts rename test/{server_integration/analytics => analytics/tests}/analytics.ts (97%) create mode 100644 test/analytics/tests/index.ts delete mode 100644 test/server_integration/analytics/config.ts diff --git a/.buildkite/scripts/steps/functional/oss_misc.sh b/.buildkite/scripts/steps/functional/oss_misc.sh index 48be6669f321b1..22d4eda608cc26 100755 --- a/.buildkite/scripts/steps/functional/oss_misc.sh +++ b/.buildkite/scripts/steps/functional/oss_misc.sh @@ -41,3 +41,11 @@ checks-reporter-with-killswitch "Status Integration Tests" \ --config test/server_integration/http/platform/config.status.ts \ --bail \ --debug + +# Tests that must be run against source in order to build test plugins +echo --- Analytics Integration Tests +checks-reporter-with-killswitch "Analytics Integration Tests" \ + node scripts/functional_tests \ + --config test/analytics/config.ts \ + --bail \ + --debug diff --git a/test/server_integration/__fixtures__/plugins/analytics_plugin_a/kibana.json b/test/analytics/__fixtures__/plugins/analytics_plugin_a/kibana.json similarity index 100% rename from test/server_integration/__fixtures__/plugins/analytics_plugin_a/kibana.json rename to test/analytics/__fixtures__/plugins/analytics_plugin_a/kibana.json diff --git a/test/server_integration/__fixtures__/plugins/analytics_plugin_a/package.json b/test/analytics/__fixtures__/plugins/analytics_plugin_a/package.json similarity index 79% rename from test/server_integration/__fixtures__/plugins/analytics_plugin_a/package.json rename to test/analytics/__fixtures__/plugins/analytics_plugin_a/package.json index 0c008f87c7e30c..aed0e403e11656 100644 --- a/test/server_integration/__fixtures__/plugins/analytics_plugin_a/package.json +++ b/test/analytics/__fixtures__/plugins/analytics_plugin_a/package.json @@ -1,7 +1,7 @@ { "name": "analytics_plugin_a", "version": "1.0.0", - "main": "target/test/server_integration/__fixtures__/plugins/analytics_plugin_a", + "main": "target/test/analytics/__fixtures__/plugins/analytics_plugin_a", "kibana": { "version": "kibana", "templateVersion": "1.0.0" diff --git a/test/server_integration/__fixtures__/plugins/analytics_plugin_a/server/custom_shipper.ts b/test/analytics/__fixtures__/plugins/analytics_plugin_a/server/custom_shipper.ts similarity index 100% rename from test/server_integration/__fixtures__/plugins/analytics_plugin_a/server/custom_shipper.ts rename to test/analytics/__fixtures__/plugins/analytics_plugin_a/server/custom_shipper.ts diff --git a/test/server_integration/__fixtures__/plugins/analytics_plugin_a/server/index.ts b/test/analytics/__fixtures__/plugins/analytics_plugin_a/server/index.ts similarity index 100% rename from test/server_integration/__fixtures__/plugins/analytics_plugin_a/server/index.ts rename to test/analytics/__fixtures__/plugins/analytics_plugin_a/server/index.ts diff --git a/test/server_integration/__fixtures__/plugins/analytics_plugin_a/server/plugin.ts b/test/analytics/__fixtures__/plugins/analytics_plugin_a/server/plugin.ts similarity index 100% rename from test/server_integration/__fixtures__/plugins/analytics_plugin_a/server/plugin.ts rename to test/analytics/__fixtures__/plugins/analytics_plugin_a/server/plugin.ts diff --git a/test/server_integration/__fixtures__/plugins/analytics_plugin_a/tsconfig.json b/test/analytics/__fixtures__/plugins/analytics_plugin_a/tsconfig.json similarity index 100% rename from test/server_integration/__fixtures__/plugins/analytics_plugin_a/tsconfig.json rename to test/analytics/__fixtures__/plugins/analytics_plugin_a/tsconfig.json diff --git a/test/analytics/config.ts b/test/analytics/config.ts new file mode 100644 index 00000000000000..94c867df517e67 --- /dev/null +++ b/test/analytics/config.ts @@ -0,0 +1,40 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import path from 'path'; +import { FtrConfigProviderContext } from '@kbn/test'; +import { services } from './services'; + +/* + * These tests exist in a separate configuration because: + * 1) The FTR does not support building and installing plugins against built Kibana. + * This test must be run against source only in order to build the fixture plugins. + * 2) It provides a specific service to make EBT testing easier. + * 3) The intention is to grow this suite as more developers use this feature. + */ +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const commonConfig = await readConfigFile(require.resolve('../common/config')); + const functionalConfig = await readConfigFile(require.resolve('../functional/config')); + + return { + testFiles: [require.resolve('./tests')], + services, + servers: commonConfig.get('servers'), + junit: { + reportName: 'Analytics Integration Tests', + }, + esTestCluster: functionalConfig.get('esTestCluster'), + kbnTestServer: { + ...functionalConfig.get('kbnTestServer'), + serverArgs: [ + ...functionalConfig.get('kbnTestServer.serverArgs'), + `--plugin-path=${path.resolve(__dirname, './__fixtures__/plugins/analytics_plugin_a')}`, + ], + }, + }; +} diff --git a/test/analytics/services/index.ts b/test/analytics/services/index.ts new file mode 100644 index 00000000000000..02a20c8aea1674 --- /dev/null +++ b/test/analytics/services/index.ts @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { GenericFtrProviderContext } from '@kbn/test'; +import { services as commonServices } from '../../common/services'; + +import { KibanaSupertestProvider, ElasticsearchSupertestProvider } from './supertest'; + +export const services = { + ...commonServices, + supertest: KibanaSupertestProvider, + esSupertest: ElasticsearchSupertestProvider, +}; + +export type FtrProviderContext = GenericFtrProviderContext; diff --git a/test/analytics/services/supertest.ts b/test/analytics/services/supertest.ts new file mode 100644 index 00000000000000..709b9ddd75c22e --- /dev/null +++ b/test/analytics/services/supertest.ts @@ -0,0 +1,37 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { systemIndicesSuperuser } from '@kbn/test'; + +import { FtrProviderContext } from 'test/functional/ftr_provider_context'; +import { format as formatUrl } from 'url'; + +import supertest from 'supertest'; + +export function KibanaSupertestProvider({ getService }: FtrProviderContext) { + const config = getService('config'); + const kibanaServerUrl = formatUrl(config.get('servers.kibana')); + return supertest(kibanaServerUrl); +} + +export function ElasticsearchSupertestProvider({ getService }: FtrProviderContext) { + const config = getService('config'); + const esServerConfig = config.get('servers.elasticsearch'); + const elasticSearchServerUrl = formatUrl({ + ...esServerConfig, + // Use system indices user so tests can write to system indices + auth: `${systemIndicesSuperuser.username}:${systemIndicesSuperuser.password}`, + }); + + let agentOptions = {}; + if ('certificateAuthorities' in esServerConfig) { + agentOptions = { ca: esServerConfig!.certificateAuthorities }; + } + + return supertest.agent(elasticSearchServerUrl, agentOptions); +} diff --git a/test/server_integration/analytics/analytics.ts b/test/analytics/tests/analytics.ts similarity index 97% rename from test/server_integration/analytics/analytics.ts rename to test/analytics/tests/analytics.ts index af22d9c07ffab6..39f676e2d73d33 100644 --- a/test/server_integration/analytics/analytics.ts +++ b/test/analytics/tests/analytics.ts @@ -8,10 +8,9 @@ import expect from '@kbn/expect'; import type { TelemetryCounter } from 'src/core/server'; -import { FtrProviderContext } from '../services/types'; +import { FtrProviderContext } from '../services'; import { Action } from '../__fixtures__/plugins/analytics_plugin_a/server/custom_shipper'; -// eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); diff --git a/test/analytics/tests/index.ts b/test/analytics/tests/index.ts new file mode 100644 index 00000000000000..b4ce62de63e357 --- /dev/null +++ b/test/analytics/tests/index.ts @@ -0,0 +1,15 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { FtrProviderContext } from '../services'; + +export default function ({ loadTestFile }: FtrProviderContext) { + describe('apis', () => { + loadTestFile(require.resolve('./analytics')); + }); +} diff --git a/test/scripts/test/server_integration.sh b/test/scripts/test/server_integration.sh index f0e34a8ce78909..6ec08c7727e205 100755 --- a/test/scripts/test/server_integration.sh +++ b/test/scripts/test/server_integration.sh @@ -19,10 +19,3 @@ checks-reporter-with-killswitch "Status Integration Tests" \ --config test/server_integration/http/platform/config.status.ts \ --bail \ --debug \ - -# Tests that must be run against source in order to build test plugins -checks-reporter-with-killswitch "Analytics Integration Tests" \ - node scripts/functional_tests \ - --config test/server_integration/analytics/config.ts \ - --bail \ - --debug \ diff --git a/test/server_integration/analytics/config.ts b/test/server_integration/analytics/config.ts deleted file mode 100644 index a68de8eff37b38..00000000000000 --- a/test/server_integration/analytics/config.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import path from 'path'; -import { FtrConfigProviderContext } from '@kbn/test'; - -/* - * These tests exist in a separate configuration because: - * 1) It must run as the first test after Kibana launches to clear the unavailable status. A separate config makes this - * easier to manage and prevent from breaking. - * 2) The other server_integration tests run against a built distributable, however the FTR does not support building - * and installing plugins against built Kibana. This test must be run against source only in order to build the - * fixture plugins - */ -// eslint-disable-next-line import/no-default-export -export default async function ({ readConfigFile }: FtrConfigProviderContext) { - const baseConfig = await readConfigFile(require.resolve('../config')); - - return { - testFiles: [require.resolve('./analytics')], - services: baseConfig.get('services'), - servers: baseConfig.get('servers'), - junit: { - reportName: 'Kibana Platform Analytics Integration Tests', - }, - esTestCluster: baseConfig.get('esTestCluster'), - kbnTestServer: { - ...baseConfig.get('kbnTestServer'), - serverArgs: [ - ...baseConfig.get('kbnTestServer.serverArgs'), - `--plugin-path=${path.resolve(__dirname, '../__fixtures__/plugins/analytics_plugin_a')}`, - ], - }, - }; -} diff --git a/test/tsconfig.json b/test/tsconfig.json index f98115f0fc04a7..c6256dbe2b9c7b 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -53,10 +53,10 @@ { "path": "../src/plugins/usage_collection/tsconfig.json" }, { "path": "../src/plugins/data_view_management/tsconfig.json" }, { "path": "../src/plugins/visualizations/tsconfig.json" }, + { "path": "analytics/__fixtures__/plugins/analytics_plugin_a/tsconfig.json"}, { "path": "interactive_setup_api_integration/fixtures/test_endpoints/tsconfig.json" }, { "path": "plugin_functional/plugins/core_app_status/tsconfig.json" }, { "path": "plugin_functional/plugins/core_provider_plugin/tsconfig.json" }, - { "path": "server_integration/__fixtures__/plugins/analytics_plugin_a/tsconfig.json" }, { "path": "server_integration/__fixtures__/plugins/status_plugin_a/tsconfig.json" }, { "path": "server_integration/__fixtures__/plugins/status_plugin_b/tsconfig.json" }, ] From 34fc3ceab4b8b619a27ca78b53fedeef03c6ef17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Mon, 28 Mar 2022 12:12:42 +0200 Subject: [PATCH 12/31] Fix test types --- src/core/public/plugins/plugins_service.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/public/plugins/plugins_service.test.ts b/src/core/public/plugins/plugins_service.test.ts index 390cba409257f7..63997d65c7d7b6 100644 --- a/src/core/public/plugins/plugins_service.test.ts +++ b/src/core/public/plugins/plugins_service.test.ts @@ -37,6 +37,7 @@ import { savedObjectsServiceMock } from '../saved_objects/saved_objects_service. import { deprecationsServiceMock } from '../deprecations/deprecations_service.mock'; import { themeServiceMock } from '../theme/theme_service.mock'; import { executionContextServiceMock } from '../execution_context/execution_context_service.mock'; +import { analyticsServiceMock } from '../analytics/analytics_service.mock'; export let mockPluginInitializers: Map; @@ -84,6 +85,7 @@ describe('PluginsService', () => { }, ]; mockSetupDeps = { + analytics: analyticsServiceMock.createAnalyticsServiceSetup(), application: applicationServiceMock.createInternalSetupContract(), fatalErrors: fatalErrorsServiceMock.createSetupContract(), executionContext: executionContextServiceMock.createSetupContract(), @@ -100,6 +102,7 @@ describe('PluginsService', () => { injectedMetadata: pick(mockSetupDeps.injectedMetadata, 'getInjectedVar'), }; mockStartDeps = { + analytics: analyticsServiceMock.createAnalyticsServiceStart(), application: applicationServiceMock.createInternalStartContract(), docLinks: docLinksServiceMock.createStartContract(), executionContext: executionContextServiceMock.createStartContract(), From 0451fcbb6092066f4cd4bc23ca6ab94ef0d0be52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Mon, 28 Mar 2022 12:42:41 +0200 Subject: [PATCH 13/31] Fix `public` core mocks --- src/core/public/mocks.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/public/mocks.ts b/src/core/public/mocks.ts index 6399b55c8a8944..38328f05de569b 100644 --- a/src/core/public/mocks.ts +++ b/src/core/public/mocks.ts @@ -30,6 +30,7 @@ import { themeServiceMock } from './theme/theme_service.mock'; export { chromeServiceMock } from './chrome/chrome_service.mock'; export { docLinksServiceMock } from './doc_links/doc_links_service.mock'; import { executionContextServiceMock } from './execution_context/execution_context_service.mock'; +import { analyticsServiceMock } from './analytics/analytics_service.mock'; export { fatalErrorsServiceMock } from './fatal_errors/fatal_errors_service.mock'; export { httpServiceMock } from './http/http_service.mock'; export { i18nServiceMock } from './i18n/i18n_service.mock'; @@ -53,6 +54,7 @@ function createCoreSetupMock({ pluginStartContract?: any; } = {}) { const mock = { + analytics: analyticsServiceMock.createAnalyticsServiceSetup(), application: applicationServiceMock.createSetupContract(), docLinks: docLinksServiceMock.createSetupContract(), executionContext: executionContextServiceMock.createSetupContract(), @@ -75,6 +77,7 @@ function createCoreSetupMock({ function createCoreStartMock({ basePath = '' } = {}) { const mock = { + analytics: analyticsServiceMock.createAnalyticsServiceStart(), application: applicationServiceMock.createStartContract(), chrome: chromeServiceMock.createStartContract(), docLinks: docLinksServiceMock.createStartContract(), From 3dc135231f6a9379f396abf4e2f73f8b29597ac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Mon, 28 Mar 2022 12:48:23 +0200 Subject: [PATCH 14/31] Fix paths after move --- .../__fixtures__/plugins/analytics_plugin_a/package.json | 4 ++-- .../__fixtures__/plugins/analytics_plugin_a/tsconfig.json | 2 +- test/tsconfig.json | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/analytics/__fixtures__/plugins/analytics_plugin_a/package.json b/test/analytics/__fixtures__/plugins/analytics_plugin_a/package.json index aed0e403e11656..dcb2fbcbe81d9c 100644 --- a/test/analytics/__fixtures__/plugins/analytics_plugin_a/package.json +++ b/test/analytics/__fixtures__/plugins/analytics_plugin_a/package.json @@ -8,7 +8,7 @@ }, "license": "SSPL-1.0 OR Elastic License 2.0", "scripts": { - "kbn": "node ../../../../../../scripts/kbn.js", - "build": "rm -rf './target' && ../../../../../../node_modules/.bin/tsc" + "kbn": "node ../../../../../scripts/kbn.js", + "build": "rm -rf './target' && ../../../../../node_modules/.bin/tsc" } } \ No newline at end of file diff --git a/test/analytics/__fixtures__/plugins/analytics_plugin_a/tsconfig.json b/test/analytics/__fixtures__/plugins/analytics_plugin_a/tsconfig.json index 14ebb2e7d00c47..0a16564a57758c 100644 --- a/test/analytics/__fixtures__/plugins/analytics_plugin_a/tsconfig.json +++ b/test/analytics/__fixtures__/plugins/analytics_plugin_a/tsconfig.json @@ -6,7 +6,7 @@ "include": [ "index.ts", "server/**/*.ts", - "../../../../../../typings/**/*", + "../../../../../typings/**/*", ], "exclude": [], "references": [ diff --git a/test/tsconfig.json b/test/tsconfig.json index c6256dbe2b9c7b..1ec9d94e0cd376 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -18,6 +18,7 @@ ], "exclude": [ "target/**/*", + "analytics/__fixtures__/plugins/**/*", "interpreter_functional/plugins/**/*", "plugin_functional/plugins/**/*", "server_integration/__fixtures__/plugins/**/*", From 1844bcf4a9275947d871f4edfb916aa93fef7d0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Mon, 28 Mar 2022 14:25:25 +0200 Subject: [PATCH 15/31] Add `public` FTR tests --- .../plugins/analytics_plugin_a/kibana.json | 2 +- .../public/custom_shipper.ts | 42 +++++++ .../analytics_plugin_a/public/index.ts | 13 ++ .../analytics_plugin_a/public/plugin.ts | 78 ++++++++++++ .../analytics_plugin_a/public/types.ts | 20 +++ .../plugins/analytics_plugin_a/tsconfig.json | 1 + test/analytics/config.ts | 1 + test/analytics/services/index.ts | 11 +- .../tests/analytics_from_the_browser.ts | 118 ++++++++++++++++++ ...lytics.ts => analytics_from_the_server.ts} | 2 +- test/analytics/tests/index.ts | 5 +- 11 files changed, 285 insertions(+), 8 deletions(-) create mode 100644 test/analytics/__fixtures__/plugins/analytics_plugin_a/public/custom_shipper.ts create mode 100644 test/analytics/__fixtures__/plugins/analytics_plugin_a/public/index.ts create mode 100644 test/analytics/__fixtures__/plugins/analytics_plugin_a/public/plugin.ts create mode 100644 test/analytics/__fixtures__/plugins/analytics_plugin_a/public/types.ts create mode 100644 test/analytics/tests/analytics_from_the_browser.ts rename test/analytics/tests/{analytics.ts => analytics_from_the_server.ts} (98%) diff --git a/test/analytics/__fixtures__/plugins/analytics_plugin_a/kibana.json b/test/analytics/__fixtures__/plugins/analytics_plugin_a/kibana.json index 1d0f0e17fbffd3..f666a05a64b42c 100644 --- a/test/analytics/__fixtures__/plugins/analytics_plugin_a/kibana.json +++ b/test/analytics/__fixtures__/plugins/analytics_plugin_a/kibana.json @@ -4,5 +4,5 @@ "version": "0.0.1", "kibanaVersion": "kibana", "server": true, - "ui": false + "ui": true } diff --git a/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/custom_shipper.ts b/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/custom_shipper.ts new file mode 100644 index 00000000000000..6364b0e61e8db3 --- /dev/null +++ b/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/custom_shipper.ts @@ -0,0 +1,42 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { Subject } from 'rxjs'; +import type { Event, EventContext, IShipper, TelemetryCounter } from 'src/core/public'; + +export interface Action { + action: string; + meta: any; +} + +export class CustomShipper implements IShipper { + public static shipperName = 'FTR-shipper'; + + public telemetryCounter$ = new Subject(); + + constructor(private readonly actions$: Subject) {} + + public reportEvents(events: Event[]) { + this.actions$.next({ action: 'reportEvents', meta: events }); + events.forEach((event) => { + this.telemetryCounter$.next({ + type: 'succeed', + event_type: event.event_type, + code: '200', + count: 1, + source: 'random_value', + }); + }); + } + optIn(isOptedIn: boolean) { + this.actions$.next({ action: 'optIn', meta: isOptedIn }); + } + extendContext(newContext: EventContext) { + this.actions$.next({ action: 'extendContext', meta: newContext }); + } +} diff --git a/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/index.ts b/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/index.ts new file mode 100644 index 00000000000000..75ee8354f97c9c --- /dev/null +++ b/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/index.ts @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { AnalyticsPluginA } from './plugin'; + +export function plugin() { + return new AnalyticsPluginA(); +} diff --git a/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/plugin.ts b/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/plugin.ts new file mode 100644 index 00000000000000..31e059770d4721 --- /dev/null +++ b/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/plugin.ts @@ -0,0 +1,78 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { BehaviorSubject, ReplaySubject } from 'rxjs'; +import { take, toArray } from 'rxjs/operators'; +import type { Plugin, CoreSetup, TelemetryCounter, CoreStart } from 'src/core/public'; +import type { Action } from './custom_shipper'; +import { CustomShipper } from './custom_shipper'; +import './types'; + +export class AnalyticsPluginA implements Plugin { + private readonly actions$ = new ReplaySubject(); + + public setup({ analytics }: CoreSetup) { + const { registerShipper, registerEventType, reportEvent, telemetryCounter$ } = analytics; + registerShipper(CustomShipper, this.actions$); + + const stats: TelemetryCounter[] = []; + telemetryCounter$.subscribe((event) => stats.push(event)); + + registerEventType({ + eventType: 'test-plugin-lifecycle', + schema: { + plugin: { + type: 'keyword', + _meta: { + description: 'The ID of the plugin', + }, + }, + step: { + type: 'keyword', + _meta: { + description: 'The lifecycle step in which the plugin is', + }, + }, + }, + }); + + // Report an event before the shipper is registered + reportEvent('test-plugin-lifecycle', { + plugin: 'analyticsPluginA', + step: 'setup', + }); + + window.__analyticsPluginA__ = { + getLastActions: async (takeNumberOfActions: number) => + this.actions$.pipe(take(takeNumberOfActions), toArray()).toPromise(), + stats, + setOptIn(optIn: boolean) { + analytics.optIn({ global: { enabled: optIn } }); + }, + }; + } + public start({ analytics }: CoreStart) { + analytics.registerContextProvider({ + context$: new BehaviorSubject({ user_agent: navigator.userAgent }).asObservable(), + schema: { + user_agent: { + type: 'keyword', + _meta: { + description: 'The user agent of the browser', + }, + }, + }, + }); + + analytics.reportEvent('test-plugin-lifecycle', { + plugin: 'analyticsPluginA', + step: 'start', + }); + } + public stop() {} +} diff --git a/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/types.ts b/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/types.ts new file mode 100644 index 00000000000000..37203512e36747 --- /dev/null +++ b/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/types.ts @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { TelemetryCounter } from 'src/core/public'; +import type { Action } from './custom_shipper'; + +declare global { + interface Window { + __analyticsPluginA__: { + getLastActions: (takeNumberOfActions: number) => Promise; + stats: TelemetryCounter[]; + setOptIn: (optIn: boolean) => void; + }; + } +} diff --git a/test/analytics/__fixtures__/plugins/analytics_plugin_a/tsconfig.json b/test/analytics/__fixtures__/plugins/analytics_plugin_a/tsconfig.json index 0a16564a57758c..d1faee2d113b63 100644 --- a/test/analytics/__fixtures__/plugins/analytics_plugin_a/tsconfig.json +++ b/test/analytics/__fixtures__/plugins/analytics_plugin_a/tsconfig.json @@ -5,6 +5,7 @@ }, "include": [ "index.ts", + "public/**/*.ts", "server/**/*.ts", "../../../../../typings/**/*", ], diff --git a/test/analytics/config.ts b/test/analytics/config.ts index 94c867df517e67..50d2e5c5868b98 100644 --- a/test/analytics/config.ts +++ b/test/analytics/config.ts @@ -24,6 +24,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { return { testFiles: [require.resolve('./tests')], services, + pageObjects: functionalConfig.get('pageObjects'), servers: commonConfig.get('servers'), junit: { reportName: 'Analytics Integration Tests', diff --git a/test/analytics/services/index.ts b/test/analytics/services/index.ts index 02a20c8aea1674..c1b7f8f5dba388 100644 --- a/test/analytics/services/index.ts +++ b/test/analytics/services/index.ts @@ -8,13 +8,16 @@ import { GenericFtrProviderContext } from '@kbn/test'; import { services as commonServices } from '../../common/services'; +import { services as functionalServices } from '../../functional/services'; +import { pageObjects } from '../../functional/page_objects'; -import { KibanaSupertestProvider, ElasticsearchSupertestProvider } from './supertest'; +// import { KibanaSupertestProvider, ElasticsearchSupertestProvider } from './supertest'; export const services = { ...commonServices, - supertest: KibanaSupertestProvider, - esSupertest: ElasticsearchSupertestProvider, + ...functionalServices, + // supertest: KibanaSupertestProvider, + // esSupertest: ElasticsearchSupertestProvider, }; -export type FtrProviderContext = GenericFtrProviderContext; +export type FtrProviderContext = GenericFtrProviderContext; diff --git a/test/analytics/tests/analytics_from_the_browser.ts b/test/analytics/tests/analytics_from_the_browser.ts new file mode 100644 index 00000000000000..9384b9ba3a5433 --- /dev/null +++ b/test/analytics/tests/analytics_from_the_browser.ts @@ -0,0 +1,118 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import expect from '@kbn/expect'; +import type { TelemetryCounter } from 'src/core/server'; +import { FtrProviderContext } from '../services'; +import { Action } from '../__fixtures__/plugins/analytics_plugin_a/server/custom_shipper'; +import '../__fixtures__/plugins/analytics_plugin_a/public/types'; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const { common } = getPageObjects(['common']); + const browser = getService('browser'); + + describe('analytics service: public side', () => { + const getTelemetryCounters = async ( + _takeNumberOfCounters: number + ): Promise => { + return await browser.execute( + ({ takeNumberOfCounters }) => + window.__analyticsPluginA__.stats.slice(-takeNumberOfCounters), + { takeNumberOfCounters: _takeNumberOfCounters } + ); + }; + + const getActions = async (takeNumberOfActions: number): Promise => { + return await browser.execute( + (count) => window.__analyticsPluginA__.getLastActions(count), + takeNumberOfActions + ); + }; + + beforeEach(async () => { + await common.navigateToApp('home'); + }); + + // this test should run first because it depends on optInConfig being undefined + it('should have internally enqueued the "lifecycle" events but not handed over to the shipper yet', async () => { + const telemetryCounters = await getTelemetryCounters(2); + expect(telemetryCounters).to.eql([ + { + type: 'enqueued', + event_type: 'test-plugin-lifecycle', + source: 'client', + code: 'enqueued', + count: 1, + }, + { + type: 'enqueued', + event_type: 'test-plugin-lifecycle', + source: 'client', + code: 'enqueued', + count: 1, + }, + ]); + }); + + it('after setting opt-in, it should extend the contexts and send the events', async () => { + await browser.execute(() => window.__analyticsPluginA__.setOptIn(true)); + + const actions = await getActions(3); + // Treating the PID as remote because the tests may run the server in a separate process to the suites + const remoteUserAgent = actions[1].meta.user_agent; + expect(actions).to.eql([ + { action: 'optIn', meta: true }, + { action: 'extendContext', meta: { user_agent: remoteUserAgent } }, + { + action: 'reportEvents', + meta: [ + { + timestamp: actions[2].meta[0].timestamp, + event_type: 'test-plugin-lifecycle', + context: {}, + properties: { plugin: 'analyticsPluginA', step: 'setup' }, + }, + { + timestamp: actions[2].meta[1].timestamp, + event_type: 'test-plugin-lifecycle', + context: { user_agent: remoteUserAgent }, + properties: { plugin: 'analyticsPluginA', step: 'start' }, + }, + ], + }, + ]); + + expect(remoteUserAgent).to.be.a('string'); + + const telemetryCounters = await getTelemetryCounters(3); + expect(telemetryCounters).to.eql([ + { + type: 'succeed', + event_type: 'test-plugin-lifecycle', + source: 'FTR-shipper', + code: '200', + count: 1, + }, + { + type: 'succeed', + event_type: 'test-plugin-lifecycle', + source: 'FTR-shipper', + code: '200', + count: 1, + }, + { + type: 'sent_to_shipper', + event_type: 'test-plugin-lifecycle', + source: 'client', + code: 'OK', + count: 2, + }, + ]); + }); + }); +} diff --git a/test/analytics/tests/analytics.ts b/test/analytics/tests/analytics_from_the_server.ts similarity index 98% rename from test/analytics/tests/analytics.ts rename to test/analytics/tests/analytics_from_the_server.ts index 39f676e2d73d33..aefd34e44e0792 100644 --- a/test/analytics/tests/analytics.ts +++ b/test/analytics/tests/analytics_from_the_server.ts @@ -36,7 +36,7 @@ export default function ({ getService }: FtrProviderContext) { return resp.body; }; - describe('analytics service', () => { + describe('analytics service: server side', () => { // this test should run first because it depends on optInConfig being undefined it('should have internally enqueued the "lifecycle" events but not handed over to the shipper yet', async () => { const telemetryCounters = await getTelemetryCounters(2); diff --git a/test/analytics/tests/index.ts b/test/analytics/tests/index.ts index b4ce62de63e357..f64b572e10d02c 100644 --- a/test/analytics/tests/index.ts +++ b/test/analytics/tests/index.ts @@ -9,7 +9,8 @@ import { FtrProviderContext } from '../services'; export default function ({ loadTestFile }: FtrProviderContext) { - describe('apis', () => { - loadTestFile(require.resolve('./analytics')); + describe('analytics', () => { + loadTestFile(require.resolve('./analytics_from_the_browser')); + loadTestFile(require.resolve('./analytics_from_the_server')); }); } From 9c325555c387357fed6c7b98c6de6ec48422481b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Mon, 28 Mar 2022 14:29:53 +0200 Subject: [PATCH 16/31] Fix Fleet's Storybook context --- x-pack/plugins/fleet/.storybook/context/index.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/x-pack/plugins/fleet/.storybook/context/index.tsx b/x-pack/plugins/fleet/.storybook/context/index.tsx index fbcbd4fd3a0811..4f21614a008494 100644 --- a/x-pack/plugins/fleet/.storybook/context/index.tsx +++ b/x-pack/plugins/fleet/.storybook/context/index.tsx @@ -52,6 +52,14 @@ export const StorybookContext: React.FC<{ storyContext?: StoryContext }> = ({ const startServices: FleetStartServices = useMemo( () => ({ ...stubbedStartServices, + analytics: { + registerContextProvider: () => {}, + registerEventType: () => {}, + registerShipper: () => {}, + reportEvent: () => {}, + optIn: () => {}, + telemetryCounter$: EMPTY, + }, application: getApplication(), executionContext: getExecutionContext(), chrome: getChrome(), From 485c2d8a7e4c53d1e75b3595e420db9861da8fb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Mon, 28 Mar 2022 15:55:39 +0200 Subject: [PATCH 17/31] Build analytics test bundle --- .buildkite/scripts/build_kibana_plugins.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.buildkite/scripts/build_kibana_plugins.sh b/.buildkite/scripts/build_kibana_plugins.sh index 1bd99a72933f46..830fbaa9c2c46c 100755 --- a/.buildkite/scripts/build_kibana_plugins.sh +++ b/.buildkite/scripts/build_kibana_plugins.sh @@ -4,6 +4,7 @@ set -euo pipefail echo "--- Build Platform Plugins" node scripts/build_kibana_platform_plugins \ + --scan-dir "$KIBANA_DIR/test/analytics/__fixtures_/plugins" \ --scan-dir "$KIBANA_DIR/test/plugin_functional/plugins" \ --scan-dir "$KIBANA_DIR/test/interpreter_functional/plugins" \ --scan-dir "$KIBANA_DIR/test/common/fixtures/plugins" \ From 267cdd7403b1b9004887cea12d24eabe9108fcc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Mon, 28 Mar 2022 18:59:13 +0200 Subject: [PATCH 18/31] Build analytics test bundle --- .buildkite/scripts/build_kibana_plugins.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/scripts/build_kibana_plugins.sh b/.buildkite/scripts/build_kibana_plugins.sh index 830fbaa9c2c46c..94366d9524346c 100755 --- a/.buildkite/scripts/build_kibana_plugins.sh +++ b/.buildkite/scripts/build_kibana_plugins.sh @@ -4,7 +4,7 @@ set -euo pipefail echo "--- Build Platform Plugins" node scripts/build_kibana_platform_plugins \ - --scan-dir "$KIBANA_DIR/test/analytics/__fixtures_/plugins" \ + --scan-dir "$KIBANA_DIR/test/analytics/__fixtures__/plugins" \ --scan-dir "$KIBANA_DIR/test/plugin_functional/plugins" \ --scan-dir "$KIBANA_DIR/test/interpreter_functional/plugins" \ --scan-dir "$KIBANA_DIR/test/common/fixtures/plugins" \ From 037bde7688137ff980a3b32f66c0c6e5232e51f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Mon, 28 Mar 2022 21:27:11 +0200 Subject: [PATCH 19/31] Add FTR helpers --- .../plugins/analytics_ftr_helpers/kibana.json | 8 ++ .../analytics_ftr_helpers/package.json | 14 ++++ .../public/custom_shipper.ts | 23 ++++++ .../analytics_ftr_helpers/public/index.ts | 13 ++++ .../analytics_ftr_helpers/public/plugin.ts | 42 ++++++++++ .../analytics_ftr_helpers/public/types.ts | 18 +++++ .../server/custom_shipper.ts | 23 ++++++ .../analytics_ftr_helpers/server/index.ts | 11 +++ .../analytics_ftr_helpers/server/plugin.ts | 76 +++++++++++++++++++ .../analytics_ftr_helpers/tsconfig.json | 16 ++++ .../analytics_plugin_a/server/plugin.ts | 55 +------------- test/analytics/config.ts | 1 + test/analytics/services/index.ts | 6 +- test/analytics/services/kibana_ebt.ts | 74 ++++++++++++++++++ test/analytics/services/supertest.ts | 37 --------- .../tests/analytics_from_the_browser.ts | 31 ++++++-- .../tests/analytics_from_the_server.ts | 35 ++++++--- test/analytics/tests/index.ts | 12 ++- .../from_the_browser/index.ts | 20 +++++ .../from_the_server/index.ts | 20 +++++ test/tsconfig.json | 1 + 21 files changed, 425 insertions(+), 111 deletions(-) create mode 100644 test/analytics/__fixtures__/plugins/analytics_ftr_helpers/kibana.json create mode 100644 test/analytics/__fixtures__/plugins/analytics_ftr_helpers/package.json create mode 100644 test/analytics/__fixtures__/plugins/analytics_ftr_helpers/public/custom_shipper.ts create mode 100644 test/analytics/__fixtures__/plugins/analytics_ftr_helpers/public/index.ts create mode 100644 test/analytics/__fixtures__/plugins/analytics_ftr_helpers/public/plugin.ts create mode 100644 test/analytics/__fixtures__/plugins/analytics_ftr_helpers/public/types.ts create mode 100644 test/analytics/__fixtures__/plugins/analytics_ftr_helpers/server/custom_shipper.ts create mode 100644 test/analytics/__fixtures__/plugins/analytics_ftr_helpers/server/index.ts create mode 100644 test/analytics/__fixtures__/plugins/analytics_ftr_helpers/server/plugin.ts create mode 100644 test/analytics/__fixtures__/plugins/analytics_ftr_helpers/tsconfig.json create mode 100644 test/analytics/services/kibana_ebt.ts delete mode 100644 test/analytics/services/supertest.ts create mode 100644 test/analytics/tests/instrumented_events/from_the_browser/index.ts create mode 100644 test/analytics/tests/instrumented_events/from_the_server/index.ts diff --git a/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/kibana.json b/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/kibana.json new file mode 100644 index 00000000000000..353ec45cdd991b --- /dev/null +++ b/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/kibana.json @@ -0,0 +1,8 @@ +{ + "id": "analyticsFtrHelpers", + "owner": { "name": "Core", "githubTeam": "kibana-core" }, + "version": "0.0.1", + "kibanaVersion": "kibana", + "server": true, + "ui": true +} diff --git a/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/package.json b/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/package.json new file mode 100644 index 00000000000000..c0a0c5082d1d33 --- /dev/null +++ b/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/package.json @@ -0,0 +1,14 @@ +{ + "name": "analytics_ftr_helpers", + "version": "1.0.0", + "main": "target/test/analytics/__fixtures__/plugins/analytics_ftr_helpers", + "kibana": { + "version": "kibana", + "templateVersion": "1.0.0" + }, + "license": "SSPL-1.0 OR Elastic License 2.0", + "scripts": { + "kbn": "node ../../../../../scripts/kbn.js", + "build": "rm -rf './target' && ../../../../../node_modules/.bin/tsc" + } +} \ No newline at end of file diff --git a/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/public/custom_shipper.ts b/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/public/custom_shipper.ts new file mode 100644 index 00000000000000..bda7ec2aadebbf --- /dev/null +++ b/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/public/custom_shipper.ts @@ -0,0 +1,23 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { Subject } from 'rxjs'; +import type { Event, IShipper } from 'src/core/public'; + +export class CustomShipper implements IShipper { + public static shipperName = 'FTR-helpers-shipper'; + + constructor(private readonly events$: Subject) {} + + public reportEvents(events: Event[]) { + events.forEach((event) => { + this.events$.next(event); + }); + } + optIn(isOptedIn: boolean) {} +} diff --git a/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/public/index.ts b/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/public/index.ts new file mode 100644 index 00000000000000..24e937012e386c --- /dev/null +++ b/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/public/index.ts @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { AnalyticsFTRHelpers } from './plugin'; + +export function plugin() { + return new AnalyticsFTRHelpers(); +} diff --git a/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/public/plugin.ts b/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/public/plugin.ts new file mode 100644 index 00000000000000..463cb6f8d61720 --- /dev/null +++ b/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/public/plugin.ts @@ -0,0 +1,42 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { ReplaySubject } from 'rxjs'; +import { filter, take, toArray } from 'rxjs/operators'; +import type { Plugin, CoreSetup, Event } from 'src/core/public'; +import { CustomShipper } from './custom_shipper'; +import './types'; + +export class AnalyticsFTRHelpers implements Plugin { + private readonly events$ = new ReplaySubject(); + + public setup({ analytics }: CoreSetup) { + analytics.registerShipper(CustomShipper, this.events$); + + window.__analytics_ftr_helpers__ = { + setOptIn(optIn: boolean) { + analytics.optIn({ global: { enabled: optIn } }); + }, + getLastEvents: async (takeNumberOfEvents, eventTypes = []) => + this.events$ + .pipe( + filter((event) => { + if (eventTypes.length > 0) { + return eventTypes.includes(event.event_type); + } + return true; + }), + take(takeNumberOfEvents), + toArray() + ) + .toPromise(), + }; + } + public start() {} + public stop() {} +} diff --git a/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/public/types.ts b/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/public/types.ts new file mode 100644 index 00000000000000..413335ee8293fe --- /dev/null +++ b/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/public/types.ts @@ -0,0 +1,18 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { Event, EventType } from 'src/core/public'; + +declare global { + interface Window { + __analytics_ftr_helpers__: { + setOptIn: (optIn: boolean) => void; + getLastEvents: (takeNumberOfEvents: number, eventTypes?: EventType[]) => Promise; + }; + } +} diff --git a/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/server/custom_shipper.ts b/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/server/custom_shipper.ts new file mode 100644 index 00000000000000..e9d8c3b6092093 --- /dev/null +++ b/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/server/custom_shipper.ts @@ -0,0 +1,23 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { Subject } from 'rxjs'; +import type { IShipper, Event } from 'src/core/server'; + +export class CustomShipper implements IShipper { + public static shipperName = 'FTR-helpers-shipper'; + + constructor(private readonly events$: Subject) {} + + public reportEvents(events: Event[]) { + events.forEach((event) => { + this.events$.next(event); + }); + } + optIn(isOptedIn: boolean) {} +} diff --git a/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/server/index.ts b/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/server/index.ts new file mode 100644 index 00000000000000..637348226e25c8 --- /dev/null +++ b/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/server/index.ts @@ -0,0 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { AnalyticsFTRHelpers } from './plugin'; + +export const plugin = () => new AnalyticsFTRHelpers(); diff --git a/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/server/plugin.ts b/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/server/plugin.ts new file mode 100644 index 00000000000000..26d61e2e5355f4 --- /dev/null +++ b/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/server/plugin.ts @@ -0,0 +1,76 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { ReplaySubject } from 'rxjs'; +import { schema } from '@kbn/config-schema'; +import type { Plugin, CoreSetup, Event } from 'src/core/server'; +import { filter, take, toArray } from 'rxjs/operators'; +import { CustomShipper } from './custom_shipper'; + +export class AnalyticsFTRHelpers implements Plugin { + public setup({ analytics, http }: CoreSetup, deps: {}) { + const { optIn, registerShipper } = analytics; + + const events$ = new ReplaySubject(); + registerShipper(CustomShipper, events$); + + const router = http.createRouter(); + + router.post( + { + path: '/internal/analytics_ftr_helpers/opt_in', + validate: { + query: schema.object({ + consent: schema.boolean(), + }), + }, + }, + (context, req, res) => { + const { consent } = req.query; + + optIn({ global: { enabled: consent } }); + + return res.ok(); + } + ); + + router.get( + { + path: '/internal/analytics_ftr_helpers/events', + validate: { + query: schema.object({ + takeNumberOfEvents: schema.number({ min: 1 }), + eventTypes: schema.arrayOf(schema.string()), + }), + }, + }, + async (context, req, res) => { + const { takeNumberOfEvents, eventTypes } = req.query; + + const events = await events$ + .pipe( + filter((event) => { + if (eventTypes.length > 0) { + return eventTypes.includes(event.event_type); + } + return true; + }), + take(takeNumberOfEvents), + toArray() + ) + .toPromise(); + + return res.ok({ body: events }); + } + ); + } + + public start() {} + + public stop() {} +} diff --git a/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/tsconfig.json b/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/tsconfig.json new file mode 100644 index 00000000000000..d1faee2d113b63 --- /dev/null +++ b/test/analytics/__fixtures__/plugins/analytics_ftr_helpers/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../../../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./target/types", + }, + "include": [ + "index.ts", + "public/**/*.ts", + "server/**/*.ts", + "../../../../../typings/**/*", + ], + "exclude": [], + "references": [ + { "path": "../../../../../src/core/tsconfig.json" } + ] +} diff --git a/test/analytics/__fixtures__/plugins/analytics_plugin_a/server/plugin.ts b/test/analytics/__fixtures__/plugins/analytics_plugin_a/server/plugin.ts index 991e6763af0eec..c17e020b67e28d 100644 --- a/test/analytics/__fixtures__/plugins/analytics_plugin_a/server/plugin.ts +++ b/test/analytics/__fixtures__/plugins/analytics_plugin_a/server/plugin.ts @@ -7,16 +7,15 @@ */ import { BehaviorSubject, ReplaySubject, Subject } from 'rxjs'; +import { take, toArray } from 'rxjs/operators'; import { schema } from '@kbn/config-schema'; import type { Plugin, CoreSetup, CoreStart, TelemetryCounter } from 'src/core/server'; -import { take, toArray } from 'rxjs/operators'; import type { Action } from './custom_shipper'; import { CustomShipper } from './custom_shipper'; export class AnalyticsPluginAPlugin implements Plugin { public setup({ analytics, http }: CoreSetup, deps: {}) { const { - optIn, registerContextProvider, registerEventType, registerShipper, @@ -56,24 +55,6 @@ export class AnalyticsPluginAPlugin implements Plugin { const router = http.createRouter(); - router.post( - { - path: '/internal/analytics_plugin_a/opt_in', - validate: { - query: schema.object({ - consent: schema.boolean(), - }), - }, - }, - (context, req, res) => { - const { consent } = req.query; - - optIn({ global: { enabled: consent } }); - - return res.ok(); - } - ); - const context$ = new Subject(); registerContextProvider({ context$, @@ -88,40 +69,6 @@ export class AnalyticsPluginAPlugin implements Plugin { }, }); - router.post( - { - path: '/internal/analytics_plugin_a/enrich_context', - validate: { - body: schema.object({ - context: schema.recordOf(schema.string(), schema.any()), - }), - }, - }, - (context, req, res) => { - context$.next({ custom_context: req.body.context }); - - return res.ok(); - } - ); - - router.post( - { - path: '/internal/analytics_plugin_a/report_event', - validate: { - body: schema.object({ - eventName: schema.string(), - event: schema.recordOf(schema.string(), schema.any()), - }), - }, - }, - (context, req, res) => { - // this is likely to fail because the event type is not registered - reportEvent(req.body.eventName, req.body.event); - - return res.ok(); - } - ); - router.get( { path: '/internal/analytics_plugin_a/stats', diff --git a/test/analytics/config.ts b/test/analytics/config.ts index 50d2e5c5868b98..46fa5d892997af 100644 --- a/test/analytics/config.ts +++ b/test/analytics/config.ts @@ -35,6 +35,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { serverArgs: [ ...functionalConfig.get('kbnTestServer.serverArgs'), `--plugin-path=${path.resolve(__dirname, './__fixtures__/plugins/analytics_plugin_a')}`, + `--plugin-path=${path.resolve(__dirname, './__fixtures__/plugins/analytics_ftr_helpers')}`, ], }, }; diff --git a/test/analytics/services/index.ts b/test/analytics/services/index.ts index c1b7f8f5dba388..0c75df9bc20500 100644 --- a/test/analytics/services/index.ts +++ b/test/analytics/services/index.ts @@ -11,13 +11,13 @@ import { services as commonServices } from '../../common/services'; import { services as functionalServices } from '../../functional/services'; import { pageObjects } from '../../functional/page_objects'; -// import { KibanaSupertestProvider, ElasticsearchSupertestProvider } from './supertest'; +import { KibanaEBTServerProvider, KibanaEBTUIProvider } from './kibana_ebt'; export const services = { ...commonServices, ...functionalServices, - // supertest: KibanaSupertestProvider, - // esSupertest: ElasticsearchSupertestProvider, + kibana_ebt_server: KibanaEBTServerProvider, + kibana_ebt_ui: KibanaEBTUIProvider, }; export type FtrProviderContext = GenericFtrProviderContext; diff --git a/test/analytics/services/kibana_ebt.ts b/test/analytics/services/kibana_ebt.ts new file mode 100644 index 00000000000000..cdb6e5ae28d95d --- /dev/null +++ b/test/analytics/services/kibana_ebt.ts @@ -0,0 +1,74 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { FtrProviderContext } from 'test/functional/ftr_provider_context'; +import '../__fixtures__/plugins/analytics_ftr_helpers/public/types'; + +export function KibanaEBTServerProvider({ getService }: FtrProviderContext) { + const supertest = getService('supertest'); + + return { + /** + * Change the opt-in state of the Kibana EBT client. + * @param optIn `true` to opt-in, `false` to opt-out. + */ + setOptIn: async (optIn: boolean) => { + await supertest + .post(`/internal/analytics_ftr_helpers/opt_in`) + .set('kbn-xsrf', 'xxx') + .query({ consent: optIn }) + .expect(200); + }, + /** + * Returns the last events of the specified types. + * @param numberOfEvents - number of events to return + * @param eventTypes (Optional) array of event types to return + */ + getLastEvents: async (takeNumberOfEvents: number, eventTypes: string[] = []) => { + const resp = await supertest + .get(`/internal/analytics_ftr_helpers/events`) + .query({ takeNumberOfEvents, eventTypes: JSON.stringify(eventTypes) }) + .set('kbn-xsrf', 'xxx') + .expect(200); + + return resp.body; + }, + }; +} + +export function KibanaEBTUIProvider({ getService, getPageObjects }: FtrProviderContext) { + const { common } = getPageObjects(['common']); + const browser = getService('browser'); + + return { + /** + * Change the opt-in state of the Kibana EBT client. + * @param optIn `true` to opt-in, `false` to opt-out. + */ + setOptIn: async (optIn: boolean) => { + await common.navigateToApp('home'); + await browser.execute((isOptIn) => window.__analytics_ftr_helpers__.setOptIn(isOptIn), optIn); + }, + /** + * Returns the last events of the specified types. + * @param numberOfEvents - number of events to return + * @param eventTypes (Optional) array of event types to return + */ + getLastEvents: async (numberOfEvents: number, eventTypes: string[] = []) => { + const events = await browser.execute( + ({ eventTypes: _eventTypes, numberOfEvents: _numberOfEvents }) => + window.__analytics_ftr_helpers__.getLastEvents(_numberOfEvents, _eventTypes), + { + eventTypes, + numberOfEvents, + } + ); + return events; + }, + }; +} diff --git a/test/analytics/services/supertest.ts b/test/analytics/services/supertest.ts deleted file mode 100644 index 709b9ddd75c22e..00000000000000 --- a/test/analytics/services/supertest.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { systemIndicesSuperuser } from '@kbn/test'; - -import { FtrProviderContext } from 'test/functional/ftr_provider_context'; -import { format as formatUrl } from 'url'; - -import supertest from 'supertest'; - -export function KibanaSupertestProvider({ getService }: FtrProviderContext) { - const config = getService('config'); - const kibanaServerUrl = formatUrl(config.get('servers.kibana')); - return supertest(kibanaServerUrl); -} - -export function ElasticsearchSupertestProvider({ getService }: FtrProviderContext) { - const config = getService('config'); - const esServerConfig = config.get('servers.elasticsearch'); - const elasticSearchServerUrl = formatUrl({ - ...esServerConfig, - // Use system indices user so tests can write to system indices - auth: `${systemIndicesSuperuser.username}:${systemIndicesSuperuser.password}`, - }); - - let agentOptions = {}; - if ('certificateAuthorities' in esServerConfig) { - agentOptions = { ca: esServerConfig!.certificateAuthorities }; - } - - return supertest.agent(elasticSearchServerUrl, agentOptions); -} diff --git a/test/analytics/tests/analytics_from_the_browser.ts b/test/analytics/tests/analytics_from_the_browser.ts index 9384b9ba3a5433..d24eed3e684a60 100644 --- a/test/analytics/tests/analytics_from_the_browser.ts +++ b/test/analytics/tests/analytics_from_the_browser.ts @@ -15,6 +15,7 @@ import '../__fixtures__/plugins/analytics_plugin_a/public/types'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const { common } = getPageObjects(['common']); const browser = getService('browser'); + const ebtUIHelper = getService('kibana_ebt_ui'); describe('analytics service: public side', () => { const getTelemetryCounters = async ( @@ -60,14 +61,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('after setting opt-in, it should extend the contexts and send the events', async () => { - await browser.execute(() => window.__analyticsPluginA__.setOptIn(true)); + await ebtUIHelper.setOptIn(true); const actions = await getActions(3); - // Treating the PID as remote because the tests may run the server in a separate process to the suites - const remoteUserAgent = actions[1].meta.user_agent; + + // Validating the remote user_agent because that's the only field that it's added by the FTR plugin. + const context = actions[1].meta; + expect(context).to.have.property('user_agent'); + expect(context.user_agent).to.be.a('string'); + expect(actions).to.eql([ { action: 'optIn', meta: true }, - { action: 'extendContext', meta: { user_agent: remoteUserAgent } }, + { action: 'extendContext', meta: context }, { action: 'reportEvents', meta: [ @@ -80,14 +85,28 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { { timestamp: actions[2].meta[1].timestamp, event_type: 'test-plugin-lifecycle', - context: { user_agent: remoteUserAgent }, + context, properties: { plugin: 'analyticsPluginA', step: 'start' }, }, ], }, ]); - expect(remoteUserAgent).to.be.a('string'); + // Testing the FTR helper as well + expect(await ebtUIHelper.getLastEvents(2, ['test-plugin-lifecycle'])).to.eql([ + { + timestamp: actions[2].meta[0].timestamp, + event_type: 'test-plugin-lifecycle', + context: {}, + properties: { plugin: 'analyticsPluginA', step: 'setup' }, + }, + { + timestamp: actions[2].meta[1].timestamp, + event_type: 'test-plugin-lifecycle', + context, + properties: { plugin: 'analyticsPluginA', step: 'start' }, + }, + ]); const telemetryCounters = await getTelemetryCounters(3); expect(telemetryCounters).to.eql([ diff --git a/test/analytics/tests/analytics_from_the_server.ts b/test/analytics/tests/analytics_from_the_server.ts index aefd34e44e0792..3cec7ff48b8ee9 100644 --- a/test/analytics/tests/analytics_from_the_server.ts +++ b/test/analytics/tests/analytics_from_the_server.ts @@ -13,6 +13,7 @@ import { Action } from '../__fixtures__/plugins/analytics_plugin_a/server/custom export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); + const ebtServerHelper = getService('kibana_ebt_server'); const getTelemetryCounters = async ( takeNumberOfCounters: number @@ -59,18 +60,17 @@ export default function ({ getService }: FtrProviderContext) { }); it('after setting opt-in, it should extend the contexts and send the events', async () => { - await supertest - .post(`/internal/analytics_plugin_a/opt_in`) - .set('kbn-xsrf', 'xxx') - .query({ consent: true }) - .expect(200); + await ebtServerHelper.setOptIn(true); const actions = await getActions(3); - // Treating the PID as remote because the tests may run the server in a separate process to the suites - const remotePID = actions[1].meta.pid; + // Validating the remote PID because that's the only field that it's added by the FTR plugin. + const context = actions[1].meta; + expect(context).to.have.property('pid'); + expect(context.pid).to.be.a('number'); + expect(actions).to.eql([ { action: 'optIn', meta: true }, - { action: 'extendContext', meta: { pid: remotePID } }, + { action: 'extendContext', meta: context }, { action: 'reportEvents', meta: [ @@ -83,13 +83,30 @@ export default function ({ getService }: FtrProviderContext) { { timestamp: actions[2].meta[1].timestamp, event_type: 'test-plugin-lifecycle', - context: { pid: remotePID }, + context, properties: { plugin: 'analyticsPluginA', step: 'start' }, }, ], }, ]); + // This helps us to also test the helpers + const events = await ebtServerHelper.getLastEvents(2, ['test-plugin-lifecycle']); + expect(events).to.eql([ + { + timestamp: actions[2].meta[0].timestamp, + event_type: 'test-plugin-lifecycle', + context: {}, + properties: { plugin: 'analyticsPluginA', step: 'setup' }, + }, + { + timestamp: actions[2].meta[1].timestamp, + event_type: 'test-plugin-lifecycle', + context, + properties: { plugin: 'analyticsPluginA', step: 'start' }, + }, + ]); + const telemetryCounters = await getTelemetryCounters(3); expect(telemetryCounters).to.eql([ { diff --git a/test/analytics/tests/index.ts b/test/analytics/tests/index.ts index f64b572e10d02c..67445802009289 100644 --- a/test/analytics/tests/index.ts +++ b/test/analytics/tests/index.ts @@ -10,7 +10,15 @@ import { FtrProviderContext } from '../services'; export default function ({ loadTestFile }: FtrProviderContext) { describe('analytics', () => { - loadTestFile(require.resolve('./analytics_from_the_browser')); - loadTestFile(require.resolve('./analytics_from_the_server')); + // These tests need to run before the other tests because they require the initial `unknown` opt-in state + describe('analytics service', () => { + loadTestFile(require.resolve('./analytics_from_the_browser')); + loadTestFile(require.resolve('./analytics_from_the_server')); + }); + + describe('instrumented events', () => { + loadTestFile(require.resolve('./instrumented_events/from_the_browser')); + loadTestFile(require.resolve('./instrumented_events/from_the_server')); + }); }); } diff --git a/test/analytics/tests/instrumented_events/from_the_browser/index.ts b/test/analytics/tests/instrumented_events/from_the_browser/index.ts new file mode 100644 index 00000000000000..daf21180d2328d --- /dev/null +++ b/test/analytics/tests/instrumented_events/from_the_browser/index.ts @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { FtrProviderContext } from '../../../services'; + +export default function ({ getService }: FtrProviderContext) { + describe('from the browser', () => { + beforeEach(async () => { + await getService('kibana_ebt_ui').setOptIn(true); + }); + + // Add tests for UI-instrumented events here: + // loadTestFile(require.resolve('./some_event')); + }); +} diff --git a/test/analytics/tests/instrumented_events/from_the_server/index.ts b/test/analytics/tests/instrumented_events/from_the_server/index.ts new file mode 100644 index 00000000000000..8961b9e92994c6 --- /dev/null +++ b/test/analytics/tests/instrumented_events/from_the_server/index.ts @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { FtrProviderContext } from '../../../services'; + +export default function ({ getService }: FtrProviderContext) { + describe('from the server', () => { + beforeEach(async () => { + await getService('kibana_ebt_server').setOptIn(true); + }); + + // Add tests for UI-instrumented events here: + // loadTestFile(require.resolve('./some_event')); + }); +} diff --git a/test/tsconfig.json b/test/tsconfig.json index 1ec9d94e0cd376..a17887ddce5fe2 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -54,6 +54,7 @@ { "path": "../src/plugins/usage_collection/tsconfig.json" }, { "path": "../src/plugins/data_view_management/tsconfig.json" }, { "path": "../src/plugins/visualizations/tsconfig.json" }, + { "path": "analytics/__fixtures__/plugins/analytics_ftr_helpers/tsconfig.json"}, { "path": "analytics/__fixtures__/plugins/analytics_plugin_a/tsconfig.json"}, { "path": "interactive_setup_api_integration/fixtures/test_endpoints/tsconfig.json" }, { "path": "plugin_functional/plugins/core_app_status/tsconfig.json" }, From b6d156205389420978473a3e80947b0322c8a077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Mon, 28 Mar 2022 21:37:52 +0200 Subject: [PATCH 20/31] Add readme to the FTR tests --- test/analytics/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/analytics/README.md diff --git a/test/analytics/README.md b/test/analytics/README.md new file mode 100644 index 00000000000000..bf2f9bb2f17b5c --- /dev/null +++ b/test/analytics/README.md @@ -0,0 +1,21 @@ +# FTR tests for the `core.analytics` service + +This suite allows us to test the event-based telemetry client provided by the `core.analytics` service. + +## How to add my own tests + +Implement your own tests in the `tests/instrumented_events/(from_the_browser|from_the_server)/` directory and list it in the `tests/instrumented_events/(from_the_browser|from_the_server)/index.ts` file. + +There are 2 FTR helpers to allow you to retrieve the generated events: + +1. For events generated in the UI, you can use `kibana_ebt_ui` to retrieve the events. +2. For events generated in the server, you can use the `kibana_ebt_server` helper. + +The API is the same for both of them: +```typescript +// To retrieve the last 2 events of type "my-event-type +const events = await getService('kibana_ebt_ui').getLastEvents(2, ['my-event-type']); +expect(events).to... +``` + +If you are reusing these helpers in another suite, please remember to make sure to optIn via `await getService('kibana_ebt_ui').setOptIn(true);` \ No newline at end of file From d0f35681a7d1f728124350999bb9f55dd408afe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Mon, 28 Mar 2022 22:32:25 +0200 Subject: [PATCH 21/31] Remove commented code --- .../elastic-analytics/src/analytics_client/analytics_client.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/elastic-analytics/src/analytics_client/analytics_client.ts b/packages/elastic-analytics/src/analytics_client/analytics_client.ts index 742680f98947e3..8e1b1446a45d9b 100644 --- a/packages/elastic-analytics/src/analytics_client/analytics_client.ts +++ b/packages/elastic-analytics/src/analytics_client/analytics_client.ts @@ -200,7 +200,6 @@ export class AnalyticsClient implements IAnalyticsClient { }; public registerContextProvider = (contextProviderOpts: ContextProviderOpts) => { - // const contextProviderID = `context_provider_${Date.now()}`; contextProviderOpts.context$ .pipe( tap((ctx) => { From 89fbc4184a5b2e58f2aab479854c927611473a24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Wed, 30 Mar 2022 14:04:23 +0200 Subject: [PATCH 22/31] Move `this.telemetryCounter$` declaration to the top --- .../src/analytics_client/analytics_client.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/elastic-analytics/src/analytics_client/analytics_client.ts b/packages/elastic-analytics/src/analytics_client/analytics_client.ts index 8e1b1446a45d9b..459e6567ab9dd3 100644 --- a/packages/elastic-analytics/src/analytics_client/analytics_client.ts +++ b/packages/elastic-analytics/src/analytics_client/analytics_client.ts @@ -39,8 +39,9 @@ import type { OptInConfigPerType } from './types'; import { ShippersRegistry } from './shippers_registry'; export class AnalyticsClient implements IAnalyticsClient { - public readonly telemetryCounter$: Observable; private readonly internalTelemetryCounter$ = new Subject(); + public readonly telemetryCounter$: Observable = + this.internalTelemetryCounter$.pipe(share()); // Using `share` so we can have multiple subscribers /** * This queue holds all the events until both conditions occur: * 1. We know the user's optIn decision. @@ -71,8 +72,6 @@ export class AnalyticsClient implements IAnalyticsClient { ); constructor(private readonly initContext: AnalyticsClientInitContext) { - this.telemetryCounter$ = this.internalTelemetryCounter$.pipe(share()); // Using `share` so we can have multiple subscribers - // Observer that will emit when both events occur: the OptInConfig is set + a shipper has been registered const configReceivedAndShipperReceivedObserver$ = combineLatest([ this.optInConfigWithReplay$, From bd9bbf895b0205c98498b10baa908fc967a781c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Wed, 30 Mar 2022 14:12:07 +0200 Subject: [PATCH 23/31] Feedback on the README --- packages/elastic-analytics/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/elastic-analytics/README.md b/packages/elastic-analytics/README.md index 45ed22e0992332..3448179898ce54 100644 --- a/packages/elastic-analytics/README.md +++ b/packages/elastic-analytics/README.md @@ -164,19 +164,19 @@ class MyVeryOwnShipper implements IShipper { // ... } - reportEvents = (events: Event[]): void => { + public reportEvents(events: Event[]): void { // Send the events to the analytics platform } - optIn = (isOptedIn: boolean): void => { + public optIn(isOptedIn: boolean): void { // Start/stop any sending mechanisms } - extendContext = (newContext: EventContext): void => { + public extendContext(newContext: EventContext): void { // Call any custom APIs to internally set the context } // Emit any success/failed/dropped activity - telemetryCounter$: Observable; + public telemetryCounter$: Observable; } // Register the custom shipper @@ -191,9 +191,9 @@ The syntax of a schema is a _simplified ES mapping on steroids_: it removes some **DISCLAIMER:** **The schema is not a direct mapping to ES indices.** The final structure of how the event is stored will depend on many factors like the context providers, shippers and final analytics solution. -#### Schema Specification: First order data types (`string`, `number`, `boolean`) +#### Schema Specification: Primitive data types (`string`, `number`, `boolean`) -When declaring first-order values like `string` or `number`, the basic schema must contain both: `type` and `_meta`. +When declaring primitive values like `string` or `number`, the basic schema must contain both: `type` and `_meta`. The `type` value depends on the type of the content to report in that field. Refer to the table below for the values allowed in the schema `type`: @@ -327,4 +327,4 @@ The `_meta` adds the invaluable information of a `description` and whether a fie It can be attached to any schema definition as seen in the examples above. For high-order types, like arrays or objects, the `_meta` field is optional. For first-order types, like numbers, strings, booleans or `pass_through`, the `_meta` key is mandatory. -The `optional` field is optional by default, and there are some TS validations to enforce `optional: true` when the matching field is declared as optional in the types. However, it's highly encouraged to be explicit about declaring it even when the field is not optional. +The field `_meta.optional` is not required unless the schema is describing an optional field. In that case, `_meta.optional: true` is required. However, it's highly encouraged to be explicit about declaring it even when the described field is not optional. From 44b7f13f605de995f33d394b2be886c10bf50d4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Wed, 30 Mar 2022 16:58:47 +0200 Subject: [PATCH 24/31] PR feedback about mocks and setup vs. start contracts --- ...lugin-core-public.analyticsservicestart.md | 2 +- ...lugin-core-server.analyticsservicestart.md | 2 +- packages/elastic-analytics/BUILD.bazel | 1 - .../src/analytics_client/analytics_client.ts | 134 ++++++++++-------- .../src/analytics_client/mocks.ts | 21 +-- .../analytics/analytics_service.mock.ts | 45 +++--- .../public/analytics/analytics_service.ts | 32 +---- src/core/public/analytics/logger.ts | 37 +++++ src/core/public/public.api.md | 2 +- .../analytics/analytics_service.mock.ts | 60 +++++--- .../server/analytics/analytics_service.ts | 8 +- src/core/server/plugins/plugin_context.ts | 3 - src/core/server/server.api.md | 2 +- .../analytics_plugin_a/public/plugin.ts | 16 ++- .../analytics_plugin_a/server/plugin.ts | 22 +-- 15 files changed, 211 insertions(+), 176 deletions(-) create mode 100644 src/core/public/analytics/logger.ts diff --git a/docs/development/core/public/kibana-plugin-core-public.analyticsservicestart.md b/docs/development/core/public/kibana-plugin-core-public.analyticsservicestart.md index 53e31769892415..9198bc7275046e 100644 --- a/docs/development/core/public/kibana-plugin-core-public.analyticsservicestart.md +++ b/docs/development/core/public/kibana-plugin-core-public.analyticsservicestart.md @@ -9,5 +9,5 @@ Exposes the public APIs of the AnalyticsClient during the start phase Signature: ```typescript -export declare type AnalyticsServiceStart = AnalyticsClient; +export declare type AnalyticsServiceStart = Pick; ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.analyticsservicestart.md b/docs/development/core/server/kibana-plugin-core-server.analyticsservicestart.md index f3f4aca98762c8..828577889da612 100644 --- a/docs/development/core/server/kibana-plugin-core-server.analyticsservicestart.md +++ b/docs/development/core/server/kibana-plugin-core-server.analyticsservicestart.md @@ -9,5 +9,5 @@ Exposes the public APIs of the AnalyticsClient during the start phase Signature: ```typescript -export declare type AnalyticsServiceStart = AnalyticsClient; +export declare type AnalyticsServiceStart = Pick; ``` diff --git a/packages/elastic-analytics/BUILD.bazel b/packages/elastic-analytics/BUILD.bazel index a1cc469b2823b9..a73c908c7ea52c 100644 --- a/packages/elastic-analytics/BUILD.bazel +++ b/packages/elastic-analytics/BUILD.bazel @@ -37,7 +37,6 @@ NPM_MODULE_EXTRA_FILES = [ # eg. "@npm//lodash" RUNTIME_DEPS = [ "@npm//rxjs", - "//packages/kbn-logging-mocks", ] # In this array place dependencies necessary to build the types, which will include the diff --git a/packages/elastic-analytics/src/analytics_client/analytics_client.ts b/packages/elastic-analytics/src/analytics_client/analytics_client.ts index 459e6567ab9dd3..cc7a9d3bf1b33b 100644 --- a/packages/elastic-analytics/src/analytics_client/analytics_client.ts +++ b/packages/elastic-analytics/src/analytics_client/analytics_client.ts @@ -72,64 +72,7 @@ export class AnalyticsClient implements IAnalyticsClient { ); constructor(private readonly initContext: AnalyticsClientInitContext) { - // Observer that will emit when both events occur: the OptInConfig is set + a shipper has been registered - const configReceivedAndShipperReceivedObserver$ = combineLatest([ - this.optInConfigWithReplay$, - this.shipperRegistered$, - ]); - - // Flush the internal queue when we get any optInConfig and, at least, 1 shipper - this.internalEventQueue$ - .pipe( - // Take until will close the observer once we reach the condition below - takeUntil(configReceivedAndShipperReceivedObserver$), - - // Accumulate the events until we can send them - buffer(configReceivedAndShipperReceivedObserver$), - - // Minimal delay only to make this chain async and let the optIn operation to complete first. - delay(0), - - // Re-emit the context to make sure all the shippers got it (only if opted-in) - tap(() => { - if (this.optInConfig$.value?.global.enabled) { - this.context$.next(this.context$.value); - } - }), - - // Minimal delay only to make this chain async and let - // the context update operation to complete first. - delay(0), - - // Flatten the array of events - concatMap((events) => from(events)), - - // Discard opted-out events - filter((event) => { - const optInConfig = this.optInConfig$.value; - const isGloballyOptedIn = optInConfig?.global.enabled === true; - const eventIsNotOptedOut = - (optInConfig?.event_types && - // Checking it's not `false` because if a shipper is not explicitly specified, we assume opted-in based on the global state - optInConfig.event_types[event.event_type]?.enabled !== false) ?? - true; - return isGloballyOptedIn && eventIsNotOptedOut; - }), - - // Let's group the requests per eventType for easier batching - groupBy((event) => event.event_type), - mergeMap((groupedObservable) => - groupedObservable.pipe( - bufferCount(1000), // Batching up-to 1000 events per event type for backpressure reasons - map((events) => ({ eventType: groupedObservable.key, events })) - ) - ) - ) - .subscribe(({ eventType, events }) => { - const eventTypeOptInConfig = - this.optInConfig$.value?.event_types && this.optInConfig$.value?.event_types[eventType]; - this.sendToShipper(eventType, events, eventTypeOptInConfig); - }); + this.reportEnqueuedEventsWhenClientIsReady(); } public reportEvent = >( @@ -344,4 +287,79 @@ export class AnalyticsClient implements IAnalyticsClient { }, {} as Partial) ); } + + /** + * Once the client is ready (it has a valid optInConfig and at least one shipper), + * flush any early events and ship them or discard them based on the optInConfig. + * @private + */ + private reportEnqueuedEventsWhenClientIsReady() { + // Observer that will emit when both events occur: the OptInConfig is set + a shipper has been registered + const configReceivedAndShipperReceivedObserver$ = combineLatest([ + this.optInConfigWithReplay$, + this.shipperRegistered$, + ]); + + // Flush the internal queue when we get any optInConfig and, at least, 1 shipper + this.internalEventQueue$ + .pipe( + // Take until will close the observer once we reach the condition below + takeUntil(configReceivedAndShipperReceivedObserver$), + + // Accumulate the events until we can send them + buffer(configReceivedAndShipperReceivedObserver$), + + // Minimal delay only to make this chain async and let the optIn operation to complete first. + delay(0), + + // Re-emit the context to make sure all the shippers got it (only if opted-in) + tap(() => { + if (this.optInConfig$.value?.global.enabled) { + this.context$.next(this.context$.value); + } + }), + + // Minimal delay only to make this chain async and let + // the context update operation to complete first. + delay(0), + + // Flatten the array of events + concatMap((events) => from(events)), + + // Discard opted-out events + filter((event) => this.eventIsOptedIn(event.event_type)), + + // Let's group the requests per eventType for easier batching + groupBy((event) => event.event_type), + mergeMap((groupedObservable) => + groupedObservable.pipe( + bufferCount(1000), // Batching up-to 1000 events per event type for backpressure reasons + map((events) => ({ eventType: groupedObservable.key, events })) + ) + ) + ) + .subscribe(({ eventType, events }) => { + const eventTypeOptInConfig = + this.optInConfig$.value?.event_types && this.optInConfig$.value?.event_types[eventType]; + this.sendToShipper(eventType, events, eventTypeOptInConfig); + }); + } + + /** + * Returns whether the event type is opted-in or not. + * @remarks It does not check the opt-in state at the shipper's level. + * + * @param eventType The event type to check + * @private + */ + private eventIsOptedIn(eventType: EventType): boolean { + const optInConfig = this.optInConfig$.value; + const isGloballyOptedIn = optInConfig?.global.enabled === true; + const eventIsNotOptedOut = + (optInConfig?.event_types && + // Checking it's not `false` because if a shipper is not explicitly specified, we assume opted-in based on the global state + optInConfig.event_types[eventType]?.enabled !== false) ?? + true; + return isGloballyOptedIn && eventIsNotOptedOut; + } } diff --git a/packages/elastic-analytics/src/analytics_client/mocks.ts b/packages/elastic-analytics/src/analytics_client/mocks.ts index 32981a62cb9f6a..49780c44bc079a 100644 --- a/packages/elastic-analytics/src/analytics_client/mocks.ts +++ b/packages/elastic-analytics/src/analytics_client/mocks.ts @@ -6,24 +6,17 @@ * Side Public License, v 1. */ -import { loggerMock } from '@kbn/logging-mocks'; +import { Subject } from 'rxjs'; import type { IAnalyticsClient } from './types'; -import { AnalyticsClient } from './analytics_client'; function createMockedAnalyticsClient(): jest.Mocked { - const analyticsClient = new AnalyticsClient({ - isDev: true, - sendTo: 'production', - logger: loggerMock.create(), - }); - return { - optIn: jest.fn().mockImplementation(analyticsClient.optIn), - reportEvent: jest.fn().mockImplementation(analyticsClient.reportEvent), - registerEventType: jest.fn().mockImplementation(analyticsClient.registerEventType), - registerContextProvider: jest.fn().mockImplementation(analyticsClient.registerContextProvider), - registerShipper: jest.fn().mockImplementation(analyticsClient.registerShipper), - telemetryCounter$: analyticsClient.telemetryCounter$, + optIn: jest.fn().mockImplementation(), + reportEvent: jest.fn().mockImplementation(), + registerEventType: jest.fn().mockImplementation(), + registerContextProvider: jest.fn().mockImplementation(), + registerShipper: jest.fn().mockImplementation(), + telemetryCounter$: new Subject(), }; } diff --git a/src/core/public/analytics/analytics_service.mock.ts b/src/core/public/analytics/analytics_service.mock.ts index 50048ba188ba6a..8e2b938d5af472 100644 --- a/src/core/public/analytics/analytics_service.mock.ts +++ b/src/core/public/analytics/analytics_service.mock.ts @@ -6,41 +6,44 @@ * Side Public License, v 1. */ +import { Subject } from 'rxjs'; import type { PublicMethodsOf } from '@kbn/utility-types'; -import type { AnalyticsClient } from '@elastic/analytics'; -import { createAnalytics } from '@elastic/analytics'; -import { loggerMock } from '@kbn/logging-mocks'; -import type { AnalyticsService } from './analytics_service'; +import type { + AnalyticsService, + AnalyticsServiceSetup, + AnalyticsServiceStart, +} from './analytics_service'; type AnalyticsServiceContract = PublicMethodsOf; -const createAnalyticsClientMock = (): jest.Mocked => { - const analyticsClient = createAnalytics({ - isDev: true, - sendTo: 'staging', - logger: loggerMock.create(), - }); +const createAnalyticsServiceSetup = (): jest.Mocked => { + return { + optIn: jest.fn(), + reportEvent: jest.fn(), + registerEventType: jest.fn(), + registerContextProvider: jest.fn(), + registerShipper: jest.fn(), + telemetryCounter$: new Subject(), + }; +}; +const createAnalyticsServiceStart = (): jest.Mocked => { return { - optIn: jest.fn().mockImplementation(analyticsClient.optIn), - reportEvent: jest.fn().mockImplementation(analyticsClient.reportEvent), - registerEventType: jest.fn().mockImplementation(analyticsClient.registerEventType), - registerContextProvider: jest.fn().mockImplementation(analyticsClient.registerContextProvider), - registerShipper: jest.fn().mockImplementation(analyticsClient.registerShipper), - telemetryCounter$: analyticsClient.telemetryCounter$, + optIn: jest.fn(), + reportEvent: jest.fn(), + telemetryCounter$: new Subject(), }; }; const createAnalyticsServiceMock = (): jest.Mocked => { return { - setup: jest.fn().mockImplementation(createAnalyticsClientMock), - start: jest.fn().mockImplementation(createAnalyticsClientMock), + setup: jest.fn().mockImplementation(createAnalyticsServiceSetup), + start: jest.fn().mockImplementation(createAnalyticsServiceStart), }; }; export const analyticsServiceMock = { create: createAnalyticsServiceMock, - createAnalyticsServicePreboot: createAnalyticsClientMock, - createAnalyticsServiceSetup: createAnalyticsClientMock, - createAnalyticsServiceStart: createAnalyticsClientMock, + createAnalyticsServiceSetup, + createAnalyticsServiceStart, }; diff --git a/src/core/public/analytics/analytics_service.ts b/src/core/public/analytics/analytics_service.ts index 1cbcfd3e2e9d24..4a7868e06e9278 100644 --- a/src/core/public/analytics/analytics_service.ts +++ b/src/core/public/analytics/analytics_service.ts @@ -7,9 +7,9 @@ */ import type { AnalyticsClient } from '@elastic/analytics'; -import type { Logger } from '@kbn/logging'; import { createAnalytics } from '@elastic/analytics'; import { CoreContext } from '../core_system'; +import { createLogger } from './logger'; /** * Exposes the public APIs of the AnalyticsClient during the setup phase. @@ -22,35 +22,18 @@ export type AnalyticsServiceSetup = AnalyticsClient; * {@link AnalyticsClient} * @public */ -export type AnalyticsServiceStart = AnalyticsClient; +export type AnalyticsServiceStart = Pick< + AnalyticsClient, + 'optIn' | 'reportEvent' | 'telemetryCounter$' +>; export class AnalyticsService { private readonly analyticsClient: AnalyticsClient; constructor(core: CoreContext) { - // TODO: Replace with a core logger once we implement it. - // For now, it logs only in dev mode - const logger: Logger = { - // eslint-disable-next-line no-console - fatal: (...args) => (core.env.mode.dev ? console.error(...args) : void 0), - // eslint-disable-next-line no-console - error: (...args) => (core.env.mode.dev ? console.error(...args) : void 0), - // eslint-disable-next-line no-console - warn: (...args) => (core.env.mode.dev ? console.warn(...args) : void 0), - // eslint-disable-next-line no-console - info: (...args) => (core.env.mode.dev ? console.info(...args) : void 0), - // eslint-disable-next-line no-console - debug: (...args) => (core.env.mode.dev ? console.debug(...args) : void 0), - // eslint-disable-next-line no-console - trace: (...args) => (core.env.mode.dev ? console.trace(...args) : void 0), - // eslint-disable-next-line no-console - log: (...args) => (core.env.mode.dev ? console.log(...args) : void 0), - get: () => logger, - }; - this.analyticsClient = createAnalytics({ isDev: core.env.mode.dev, - logger, + logger: createLogger(core.env.mode.dev), // TODO: We need to be able to edit sendTo once we resolve the telemetry config. // For now, we are relying on whether it's a distributable or running from source. sendTo: core.env.packageInfo.dist ? 'production' : 'staging', @@ -70,9 +53,6 @@ export class AnalyticsService { public start(): AnalyticsServiceStart { return { optIn: this.analyticsClient.optIn, - registerContextProvider: this.analyticsClient.registerContextProvider, - registerEventType: this.analyticsClient.registerEventType, - registerShipper: this.analyticsClient.registerShipper, reportEvent: this.analyticsClient.reportEvent, telemetryCounter$: this.analyticsClient.telemetryCounter$, }; diff --git a/src/core/public/analytics/logger.ts b/src/core/public/analytics/logger.ts new file mode 100644 index 00000000000000..869fdbbd9fd859 --- /dev/null +++ b/src/core/public/analytics/logger.ts @@ -0,0 +1,37 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { Logger } from '@kbn/logging'; + +/** + * Create custom logger until we have a proper logging solution: https://github.com/elastic/kibana/issues/33796 + * @param isDev Is Kibana running in Dev Mode? + */ +export function createLogger(isDev: boolean): Logger { + // TODO: Replace with a core logger once we implement it in https://github.com/elastic/kibana/issues/33796 + // For now, it logs only in dev mode + const logger: Logger = { + // eslint-disable-next-line no-console + fatal: (...args) => (isDev ? console.error(...args) : void 0), + // eslint-disable-next-line no-console + error: (...args) => (isDev ? console.error(...args) : void 0), + // eslint-disable-next-line no-console + warn: (...args) => (isDev ? console.warn(...args) : void 0), + // eslint-disable-next-line no-console + info: (...args) => (isDev ? console.info(...args) : void 0), + // eslint-disable-next-line no-console + debug: (...args) => (isDev ? console.debug(...args) : void 0), + // eslint-disable-next-line no-console + trace: (...args) => (isDev ? console.trace(...args) : void 0), + // eslint-disable-next-line no-console + log: (...args) => (isDev ? console.log(...args) : void 0), + get: () => logger, + }; + + return logger; +} diff --git a/src/core/public/public.api.md b/src/core/public/public.api.md index fed04036fdf806..37cc3203f89f30 100644 --- a/src/core/public/public.api.md +++ b/src/core/public/public.api.md @@ -75,7 +75,7 @@ export type AnalyticsServiceSetup = AnalyticsClient; // Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver // // @public -export type AnalyticsServiceStart = AnalyticsClient; +export type AnalyticsServiceStart = Pick; // @public (undocumented) export interface App extends AppNavOptions { diff --git a/src/core/server/analytics/analytics_service.mock.ts b/src/core/server/analytics/analytics_service.mock.ts index 00eb021f3251e7..2b3629c4d89188 100644 --- a/src/core/server/analytics/analytics_service.mock.ts +++ b/src/core/server/analytics/analytics_service.mock.ts @@ -7,41 +7,57 @@ */ import type { PublicMethodsOf } from '@kbn/utility-types'; -import type { AnalyticsClient } from '@elastic/analytics'; -import { createAnalytics } from '@elastic/analytics'; -import type { AnalyticsService } from './analytics_service'; -import { loggerMock } from '../logging/logger.mock'; +import type { + AnalyticsService, + AnalyticsServicePreboot, + AnalyticsServiceSetup, + AnalyticsServiceStart, +} from './analytics_service'; +import { Subject } from 'rxjs'; type AnalyticsServiceContract = PublicMethodsOf; -const createAnalyticsClientMock = (): jest.Mocked => { - const analyticsClient = createAnalytics({ - isDev: true, - sendTo: 'staging', - logger: loggerMock.create(), - }); +const createAnalyticsServicePreboot = (): jest.Mocked => { + return { + optIn: jest.fn(), + reportEvent: jest.fn(), + registerEventType: jest.fn(), + registerContextProvider: jest.fn(), + registerShipper: jest.fn(), + telemetryCounter$: new Subject(), + }; +}; + +const createAnalyticsServiceSetup = (): jest.Mocked => { + return { + optIn: jest.fn(), + reportEvent: jest.fn(), + registerEventType: jest.fn(), + registerContextProvider: jest.fn(), + registerShipper: jest.fn(), + telemetryCounter$: new Subject(), + }; +}; +const createAnalyticsServiceStart = (): jest.Mocked => { return { - optIn: jest.fn().mockImplementation(analyticsClient.optIn), - reportEvent: jest.fn().mockImplementation(analyticsClient.reportEvent), - registerEventType: jest.fn().mockImplementation(analyticsClient.registerEventType), - registerContextProvider: jest.fn().mockImplementation(analyticsClient.registerContextProvider), - registerShipper: jest.fn().mockImplementation(analyticsClient.registerShipper), - telemetryCounter$: analyticsClient.telemetryCounter$, + optIn: jest.fn(), + reportEvent: jest.fn(), + telemetryCounter$: new Subject(), }; }; const createAnalyticsServiceMock = (): jest.Mocked => { return { - preboot: jest.fn().mockImplementation(createAnalyticsClientMock), - setup: jest.fn().mockImplementation(createAnalyticsClientMock), - start: jest.fn().mockImplementation(createAnalyticsClientMock), + preboot: jest.fn().mockImplementation(createAnalyticsServicePreboot), + setup: jest.fn().mockImplementation(createAnalyticsServiceSetup), + start: jest.fn().mockImplementation(createAnalyticsServiceStart), }; }; export const analyticsServiceMock = { create: createAnalyticsServiceMock, - createAnalyticsServicePreboot: createAnalyticsClientMock, - createAnalyticsServiceSetup: createAnalyticsClientMock, - createAnalyticsServiceStart: createAnalyticsClientMock, + createAnalyticsServicePreboot, + createAnalyticsServiceSetup, + createAnalyticsServiceStart, }; diff --git a/src/core/server/analytics/analytics_service.ts b/src/core/server/analytics/analytics_service.ts index ac47de6b7439ad..7f020ca7957c57 100644 --- a/src/core/server/analytics/analytics_service.ts +++ b/src/core/server/analytics/analytics_service.ts @@ -27,7 +27,10 @@ export type AnalyticsServiceSetup = AnalyticsClient; * {@link AnalyticsClient} * @public */ -export type AnalyticsServiceStart = AnalyticsClient; +export type AnalyticsServiceStart = Pick< + AnalyticsClient, + 'optIn' | 'reportEvent' | 'telemetryCounter$' +>; export class AnalyticsService { private readonly analyticsClient: AnalyticsClient; @@ -65,9 +68,6 @@ export class AnalyticsService { public start(): AnalyticsServiceStart { return { optIn: this.analyticsClient.optIn, - registerContextProvider: this.analyticsClient.registerContextProvider, - registerEventType: this.analyticsClient.registerEventType, - registerShipper: this.analyticsClient.registerShipper, reportEvent: this.analyticsClient.reportEvent, telemetryCounter$: this.analyticsClient.telemetryCounter$, }; diff --git a/src/core/server/plugins/plugin_context.ts b/src/core/server/plugins/plugin_context.ts index 22c4005d8b6984..218442b0bf05da 100644 --- a/src/core/server/plugins/plugin_context.ts +++ b/src/core/server/plugins/plugin_context.ts @@ -253,9 +253,6 @@ export function createPluginStartContext( return { analytics: { optIn: deps.analytics.optIn, - registerContextProvider: deps.analytics.registerContextProvider, - registerEventType: deps.analytics.registerEventType, - registerShipper: deps.analytics.registerShipper, reportEvent: deps.analytics.reportEvent, telemetryCounter$: deps.analytics.telemetryCounter$, }, diff --git a/src/core/server/server.api.md b/src/core/server/server.api.md index 987f9ae5b87f15..2b8ab30a572b8c 100644 --- a/src/core/server/server.api.md +++ b/src/core/server/server.api.md @@ -86,7 +86,7 @@ export type AnalyticsServiceSetup = AnalyticsClient; // Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver // // @public -export type AnalyticsServiceStart = AnalyticsClient; +export type AnalyticsServiceStart = Pick; // @public export const APP_WRAPPER_CLASS = "kbnAppWrapper"; diff --git a/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/plugin.ts b/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/plugin.ts index 31e059770d4721..146be678bddba6 100644 --- a/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/plugin.ts +++ b/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/plugin.ts @@ -17,7 +17,13 @@ export class AnalyticsPluginA implements Plugin { private readonly actions$ = new ReplaySubject(); public setup({ analytics }: CoreSetup) { - const { registerShipper, registerEventType, reportEvent, telemetryCounter$ } = analytics; + const { + registerShipper, + registerContextProvider, + registerEventType, + reportEvent, + telemetryCounter$, + } = analytics; registerShipper(CustomShipper, this.actions$); const stats: TelemetryCounter[] = []; @@ -55,9 +61,8 @@ export class AnalyticsPluginA implements Plugin { analytics.optIn({ global: { enabled: optIn } }); }, }; - } - public start({ analytics }: CoreStart) { - analytics.registerContextProvider({ + + registerContextProvider({ context$: new BehaviorSubject({ user_agent: navigator.userAgent }).asObservable(), schema: { user_agent: { @@ -68,7 +73,8 @@ export class AnalyticsPluginA implements Plugin { }, }, }); - + } + public start({ analytics }: CoreStart) { analytics.reportEvent('test-plugin-lifecycle', { plugin: 'analyticsPluginA', step: 'start', diff --git a/test/analytics/__fixtures__/plugins/analytics_plugin_a/server/plugin.ts b/test/analytics/__fixtures__/plugins/analytics_plugin_a/server/plugin.ts index c17e020b67e28d..eaeefcced0a0ca 100644 --- a/test/analytics/__fixtures__/plugins/analytics_plugin_a/server/plugin.ts +++ b/test/analytics/__fixtures__/plugins/analytics_plugin_a/server/plugin.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { BehaviorSubject, ReplaySubject, Subject } from 'rxjs'; +import { BehaviorSubject, ReplaySubject } from 'rxjs'; import { take, toArray } from 'rxjs/operators'; import { schema } from '@kbn/config-schema'; import type { Plugin, CoreSetup, CoreStart, TelemetryCounter } from 'src/core/server'; @@ -55,20 +55,6 @@ export class AnalyticsPluginAPlugin implements Plugin { const router = http.createRouter(); - const context$ = new Subject(); - registerContextProvider({ - context$, - schema: { - custom_context: { - type: 'pass_through', - _meta: { - description: - 'Passing through anything that is reported via the HTTP API below for testing', - }, - }, - }, - }); - router.get( { path: '/internal/analytics_plugin_a/stats', @@ -102,10 +88,8 @@ export class AnalyticsPluginAPlugin implements Plugin { return res.ok({ body: actions }); } ); - } - public start({ analytics }: CoreStart) { - analytics.registerContextProvider({ + registerContextProvider({ context$: new BehaviorSubject({ pid: process.pid }), schema: { pid: { @@ -116,7 +100,9 @@ export class AnalyticsPluginAPlugin implements Plugin { }, }, }); + } + public start({ analytics }: CoreStart) { analytics.reportEvent('test-plugin-lifecycle', { plugin: 'analyticsPluginA', step: 'start', From 37778cb634761bcf42c2ba1a2137f545eb4c59f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Wed, 30 Mar 2022 17:04:42 +0200 Subject: [PATCH 25/31] Remove duplicated types from the usage_collection plugin --- .../server/collector/types.ts | 40 ++++--------------- 1 file changed, 8 insertions(+), 32 deletions(-) diff --git a/src/plugins/usage_collection/server/collector/types.ts b/src/plugins/usage_collection/server/collector/types.ts index 8d427d211a191b..141faf0ef2f6b3 100644 --- a/src/plugins/usage_collection/server/collector/types.ts +++ b/src/plugins/usage_collection/server/collector/types.ts @@ -8,39 +8,15 @@ import type { ElasticsearchClient, SavedObjectsClientContract, Logger } from 'src/core/server'; -/** Types matching number values **/ -export type AllowedSchemaNumberTypes = - | 'long' - | 'integer' - | 'short' - | 'byte' - | 'double' - | 'float' - | 'date'; -/** Types matching string values **/ -export type AllowedSchemaStringTypes = 'keyword' | 'text' | 'date'; -/** Types matching boolean values **/ -export type AllowedSchemaBooleanTypes = 'boolean'; +import type { PossibleSchemaTypes } from '@elastic/analytics'; -/** - * Possible type values in the schema - */ -export type AllowedSchemaTypes = - | AllowedSchemaNumberTypes - | AllowedSchemaStringTypes - | AllowedSchemaBooleanTypes; - -/** - * Helper to ensure the declared types match the schema types - */ -export type PossibleSchemaTypes = U extends string - ? AllowedSchemaStringTypes - : U extends number - ? AllowedSchemaNumberTypes - : U extends boolean - ? AllowedSchemaBooleanTypes - : // allow any schema type from the union if typescript is unable to resolve the exact U type - AllowedSchemaTypes; +export type { + AllowedSchemaTypes, + AllowedSchemaStringTypes, + AllowedSchemaBooleanTypes, + AllowedSchemaNumberTypes, + PossibleSchemaTypes, +} from '@elastic/analytics'; /** * Helper to find out whether to keep recursively looking or if we are on an end value From fdbb58addbf75eef9a556de1dc5e50adafb24675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Wed, 30 Mar 2022 18:48:46 +0200 Subject: [PATCH 26/31] Export TelemetryCountersType as enum --- .../analytics_client/analytics_client.test.ts | 3 +- .../src/analytics_client/analytics_client.ts | 10 ++--- .../src/analytics_client/index.ts | 1 - .../shippers_registry.test.ts | 4 +- .../src/analytics_client/shippers_registry.ts | 45 ++++++------------- .../src/analytics_client/types.ts | 22 ++++----- .../elastic-analytics/src/events/index.ts | 3 +- .../elastic-analytics/src/events/types.ts | 41 +++++++++++++++-- packages/elastic-analytics/src/index.ts | 4 +- src/core/public/analytics/index.ts | 2 + src/core/public/index.ts | 1 + src/core/public/public.api.md | 3 ++ src/core/server/analytics/index.ts | 2 + src/core/server/index.ts | 1 + src/core/server/server.api.md | 3 ++ .../public/custom_shipper.ts | 3 +- .../server/custom_shipper.ts | 3 +- .../tests/analytics_from_the_browser.ts | 4 +- .../tests/analytics_from_the_server.ts | 4 +- 19 files changed, 93 insertions(+), 66 deletions(-) diff --git a/packages/elastic-analytics/src/analytics_client/analytics_client.test.ts b/packages/elastic-analytics/src/analytics_client/analytics_client.test.ts index 35139c8d20594f..8c25efcf5f60aa 100644 --- a/packages/elastic-analytics/src/analytics_client/analytics_client.test.ts +++ b/packages/elastic-analytics/src/analytics_client/analytics_client.test.ts @@ -15,6 +15,7 @@ import { AnalyticsClient } from './analytics_client'; import { take, toArray } from 'rxjs/operators'; import { shippersMock } from '../shippers/mocks'; import type { EventContext, TelemetryCounter } from '../events'; +import { TelemetryCounterType } from '../events'; const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); @@ -261,7 +262,7 @@ describe('AnalyticsClient', () => { const counterEventPromise = analyticsClient.telemetryCounter$.pipe(take(1)).toPromise(); const counter: TelemetryCounter = { - type: 'succeed', + type: TelemetryCounterType.succeeded, source: 'a random value', event_type: 'eventTypeA', code: '200', diff --git a/packages/elastic-analytics/src/analytics_client/analytics_client.ts b/packages/elastic-analytics/src/analytics_client/analytics_client.ts index cc7a9d3bf1b33b..fc5a4fe7b06fb0 100644 --- a/packages/elastic-analytics/src/analytics_client/analytics_client.ts +++ b/packages/elastic-analytics/src/analytics_client/analytics_client.ts @@ -27,14 +27,14 @@ import type { IShipper } from '../shippers'; import type { AnalyticsClientInitContext, ContextProviderOpts, - EventType, EventTypeOpts, IAnalyticsClient, OptInConfig, RegisterShipperOpts, ShipperClassConstructor, } from './types'; -import type { Event, EventContext, TelemetryCounter } from '../events'; +import type { Event, EventContext, EventType, TelemetryCounter } from '../events'; +import { TelemetryCounterType } from '../events'; import type { OptInConfigPerType } from './types'; import { ShippersRegistry } from './shippers_registry'; @@ -83,7 +83,7 @@ export class AnalyticsClient implements IAnalyticsClient { const timestamp = new Date().toISOString(); this.internalTelemetryCounter$.next({ - type: 'enqueued', + type: TelemetryCounterType.enqueued, source: 'client', event_type: eventType, code: 'enqueued', @@ -92,7 +92,7 @@ export class AnalyticsClient implements IAnalyticsClient { if (!this.eventTypeRegistry.get(eventType)) { this.internalTelemetryCounter$.next({ - type: 'dropped', + type: TelemetryCounterType.dropped, source: 'client', event_type: eventType, code: 'UnregisteredType', @@ -264,7 +264,7 @@ export class AnalyticsClient implements IAnalyticsClient { }); if (sentToShipper) { this.internalTelemetryCounter$.next({ - type: 'sent_to_shipper', + type: TelemetryCounterType.sent_to_shipper, source: 'client', event_type: eventType, code: 'OK', diff --git a/packages/elastic-analytics/src/analytics_client/index.ts b/packages/elastic-analytics/src/analytics_client/index.ts index 360f7baf528f54..7a682de3c9772b 100644 --- a/packages/elastic-analytics/src/analytics_client/index.ts +++ b/packages/elastic-analytics/src/analytics_client/index.ts @@ -17,7 +17,6 @@ export type { OptInConfig, OptInConfigPerType, ShipperName, - EventType, // Types for the registerContextProvider API ContextProviderOpts, // Types for the registerEventType API diff --git a/packages/elastic-analytics/src/analytics_client/shippers_registry.test.ts b/packages/elastic-analytics/src/analytics_client/shippers_registry.test.ts index 55fcac6c9b273a..9fbb4c308f56c4 100644 --- a/packages/elastic-analytics/src/analytics_client/shippers_registry.test.ts +++ b/packages/elastic-analytics/src/analytics_client/shippers_registry.test.ts @@ -54,7 +54,7 @@ describe('ShippersRegistry', () => { `RandomEvent${Date.now()}` ); // eslint-disable-next-line dot-notation - expect(shippersForEventType).toBe(shippersRegistry['shippersRegistry'].global); + expect(shippersForEventType).toBe(shippersRegistry['globalShippers']); expect(shippersForEventType.size).toBe(1); expect(shippersForEventType.get(shipperName)).toBe(shipper); }); @@ -116,7 +116,7 @@ describe('ShippersRegistry', () => { `RandomEvent${Date.now()}` ); // eslint-disable-next-line dot-notation - expect(shippersForEventTypeNotFound).toBe(shippersRegistry['shippersRegistry'].global); + expect(shippersForEventTypeNotFound).toBe(shippersRegistry['globalShippers']); expect(shippersForEventTypeNotFound.size).toBe(0); }); }); diff --git a/packages/elastic-analytics/src/analytics_client/shippers_registry.ts b/packages/elastic-analytics/src/analytics_client/shippers_registry.ts index f3468e513acf5c..8380775679861d 100644 --- a/packages/elastic-analytics/src/analytics_client/shippers_registry.ts +++ b/packages/elastic-analytics/src/analytics_client/shippers_registry.ts @@ -6,39 +6,29 @@ * Side Public License, v 1. */ -import { EventType, ShipperName } from './types'; -import { IShipper } from '../shippers'; +import type { EventType } from '../events'; +import type { IShipper } from '../shippers'; +import type { ShipperName } from './types'; /** * Holds the map of the { [shipperName]: shipperInstance } */ export type ShippersMap = Map; -/** - * Registry of shippers at different levels - */ -interface ShippersRegistries { +export class ShippersRegistry { /** * Holds all the shippers: global and eventTypeExclusive. * This helps to avoid looping over all the shippers when we just need them all. */ - allShippers: ShippersMap; + public readonly allShippers: ShippersMap = new Map(); /** * Holds the shippers that are not registered as exclusive to any event-type */ - global: ShippersMap; + private readonly globalShippers: ShippersMap = new Map(); /** * Holds the shippers that are exclusive to an event-type in the format of { [eventType]: ShippersMap } */ - eventTypeExclusive: Map; -} - -export class ShippersRegistry { - private readonly shippersRegistry: ShippersRegistries = { - allShippers: new Map(), - global: new Map(), - eventTypeExclusive: new Map(), - }; + private readonly eventTypeExclusiveShippers: Map = new Map(); /** * Adds shipper to the registry. @@ -46,11 +36,11 @@ export class ShippersRegistry { * @param shipper The initialized shipper. */ public addGlobalShipper(shipperName: ShipperName, shipper: IShipper) { - if (this.shippersRegistry.global.get(shipperName)) { + if (this.globalShippers.get(shipperName)) { throw new Error(`Shipper "${shipperName}" is already registered`); } - this.shippersRegistry.global.set(shipperName, shipper); - this.shippersRegistry.allShippers.set(shipperName, shipper); + this.globalShippers.set(shipperName, shipper); + this.allShippers.set(shipperName, shipper); } /** @@ -64,20 +54,13 @@ export class ShippersRegistry { shipperName: ShipperName, shipper: IShipper ) { - const eventExclusiveMap = this.shippersRegistry.eventTypeExclusive.get(eventType) || new Map(); + const eventExclusiveMap = this.eventTypeExclusiveShippers.get(eventType) || new Map(); if (eventExclusiveMap.get(shipperName)) { throw new Error(`${shipperName} is already registered for event-type ${eventType}`); } eventExclusiveMap.set(shipperName, shipper); - this.shippersRegistry.eventTypeExclusive.set(eventType, eventExclusiveMap); - this.shippersRegistry.allShippers.set(shipperName, shipper); - } - - /** - * Returns all the registered shippers - */ - public get allShippers(): ShippersMap { - return this.shippersRegistry.allShippers; + this.eventTypeExclusiveShippers.set(eventType, eventExclusiveMap); + this.allShippers.set(shipperName, shipper); } /** @@ -85,6 +68,6 @@ export class ShippersRegistry { * @param eventType The name of the event type. */ public getShippersForEventType(eventType: EventType): ShippersMap { - return this.shippersRegistry.eventTypeExclusive.get(eventType) || this.shippersRegistry.global; + return this.eventTypeExclusiveShippers.get(eventType) || this.globalShippers; } } diff --git a/packages/elastic-analytics/src/analytics_client/types.ts b/packages/elastic-analytics/src/analytics_client/types.ts index efc10e7263ce27..3c756291e70aff 100644 --- a/packages/elastic-analytics/src/analytics_client/types.ts +++ b/packages/elastic-analytics/src/analytics_client/types.ts @@ -13,7 +13,7 @@ import type { Observable } from 'rxjs'; import type { Logger } from '@kbn/logging'; import type { IShipper } from '../shippers'; -import type { EventContext, TelemetryCounter } from '../events'; +import type { EventContext, EventType, TelemetryCounter } from '../events'; import type { RootSchema } from '../schema'; /** @@ -34,6 +34,11 @@ export interface AnalyticsClientInitContext { logger: Logger; } +/** + * Shipper Name used for indexed structures. Only used to improve the readability of the types + */ +export type ShipperName = string; + /** * Constructor of a {@link IShipper} */ @@ -41,7 +46,7 @@ export interface ShipperClassConstructor { /** * The shipper's unique name */ - shipperName: string; + shipperName: ShipperName; /** * The constructor @@ -61,18 +66,9 @@ export interface RegisterShipperOpts { * @internal Set as internal and deprecated until we come up with the best design for this. * Not in the scope of the initial MVP. */ - exclusiveEventTypes?: string[]; + exclusiveEventTypes?: EventType[]; } -/** - * Shipper Name used for indexed structures. Only used to improve the readability of the types - */ -export type ShipperName = string; -/** - * Event Type used for indexed structures. Only used to improve the readability of the types - */ -export type EventType = string; - /** * Sets whether a type of event is enabled/disabled globally or per shipper. */ @@ -147,7 +143,7 @@ export interface EventTypeOpts { /** * The event type's unique name. */ - eventType: string; + eventType: EventType; /** * Schema declaring and documenting the expected structure of this event type. * diff --git a/packages/elastic-analytics/src/events/index.ts b/packages/elastic-analytics/src/events/index.ts index 701e93b952d8a9..3400a496aa9b76 100644 --- a/packages/elastic-analytics/src/events/index.ts +++ b/packages/elastic-analytics/src/events/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export type { Event, EventContext, TelemetryCounter } from './types'; +export type { Event, EventType, EventContext, TelemetryCounter } from './types'; +export { TelemetryCounterType } from './types'; diff --git a/packages/elastic-analytics/src/events/types.ts b/packages/elastic-analytics/src/events/types.ts index 97f9ef15b41891..fccce205aa5eac 100644 --- a/packages/elastic-analytics/src/events/types.ts +++ b/packages/elastic-analytics/src/events/types.ts @@ -11,6 +11,39 @@ export interface EventContext { [key: string]: unknown; } +/** + * Event Type used for indexed structures. Only used to improve the readability of the types + */ +export type EventType = string; + +/** + * Types of the Telemetry Counter: It allows to differentiate what happened to the events + */ +export enum TelemetryCounterType { + /** + * The event was accepted and will be sent to the shippers when they become available (and opt-in === true). + */ + enqueued = 'enqueued', + /** + * The event was sent to at least one shipper. + */ + sent_to_shipper = 'sent_to_shipper', + /** + * The event was successfully sent by the shipper. + */ + succeeded = 'succeeded', + /** + * There was an error when processing/shipping the event. + * Refer to the Telemetry Counter's code for the reason. + */ + failed = 'failed', + /** + * The event was dropped from the queue. + * Refer to the Telemetry Counter's code for the reason. + */ + dropped = 'dropped', +} + /** * Shape of the events emitted by the telemetryCounter$ observable */ @@ -18,7 +51,7 @@ export interface TelemetryCounter { /** * Indicates if the event contains data about succeeded, failed or dropped events. */ - type: 'enqueued' | 'sent_to_shipper' | 'succeed' | 'failed' | 'dropped'; + type: TelemetryCounterType; /** * Who emitted the event? It can be "client" or the name of the shipper. */ @@ -26,13 +59,13 @@ export interface TelemetryCounter { /** * The event type the success/failure/drop event refers to. */ - event_type: string; + event_type: EventType; /** * Code to provide additional information about the success or failure. Examples are 200/400/504/ValidationError/UnknownError */ code: string; /** - * The number of events that met this event. + * The number of events that this counter refers to. */ count: number; } @@ -48,7 +81,7 @@ export interface Event { /** * The event type. */ - event_type: string; + event_type: EventType; /** * The specific properties of the event type. */ diff --git a/packages/elastic-analytics/src/index.ts b/packages/elastic-analytics/src/index.ts index dd00282135f4c5..382974783aeb11 100644 --- a/packages/elastic-analytics/src/index.ts +++ b/packages/elastic-analytics/src/index.ts @@ -31,13 +31,13 @@ export type { OptInConfig, OptInConfigPerType, ShipperName, - EventType, // Types for the registerContextProvider API ContextProviderOpts, // Types for the registerEventType API EventTypeOpts, } from './analytics_client'; -export type { Event, EventContext, TelemetryCounter } from './events'; +export type { Event, EventContext, EventType, TelemetryCounter } from './events'; +export { TelemetryCounterType } from './events'; export type { RootSchema, SchemaObject, diff --git a/src/core/public/analytics/index.ts b/src/core/public/analytics/index.ts index f6b961102ef865..c371955123059f 100644 --- a/src/core/public/analytics/index.ts +++ b/src/core/public/analytics/index.ts @@ -21,3 +21,5 @@ export type { ContextProviderOpts, TelemetryCounter, } from '@elastic/analytics'; + +export { TelemetryCounterType } from '@elastic/analytics'; diff --git a/src/core/public/index.ts b/src/core/public/index.ts index 351970de43e645..273524c51f3e91 100644 --- a/src/core/public/index.ts +++ b/src/core/public/index.ts @@ -86,6 +86,7 @@ export type { ContextProviderOpts, TelemetryCounter, } from './analytics'; +export { TelemetryCounterType } from './analytics'; export { AppNavLinkStatus, AppStatus, ScopedHistory } from './application'; export type { diff --git a/src/core/public/public.api.md b/src/core/public/public.api.md index 37cc3203f89f30..a7baf324cc4a1f 100644 --- a/src/core/public/public.api.md +++ b/src/core/public/public.api.md @@ -53,6 +53,7 @@ import * as Rx from 'rxjs'; import { SchemaTypeError } from '@kbn/config-schema'; import { ShipperClassConstructor } from '@elastic/analytics'; import { TelemetryCounter } from '@elastic/analytics'; +import { TelemetryCounterType } from '@elastic/analytics'; import type { ThemeVersion } from '@kbn/ui-shared-deps-npm'; import { TransitionPromptHook } from 'history'; import { Type } from '@kbn/config-schema'; @@ -1472,6 +1473,8 @@ export type StartServicesAccessor { category?: string[]; diff --git a/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/custom_shipper.ts b/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/custom_shipper.ts index 6364b0e61e8db3..2980bdb056b02c 100644 --- a/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/custom_shipper.ts +++ b/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/custom_shipper.ts @@ -8,6 +8,7 @@ import { Subject } from 'rxjs'; import type { Event, EventContext, IShipper, TelemetryCounter } from 'src/core/public'; +import { TelemetryCounterType } from '../../../../../../src/core/public'; export interface Action { action: string; @@ -25,7 +26,7 @@ export class CustomShipper implements IShipper { this.actions$.next({ action: 'reportEvents', meta: events }); events.forEach((event) => { this.telemetryCounter$.next({ - type: 'succeed', + type: TelemetryCounterType.succeeded, event_type: event.event_type, code: '200', count: 1, diff --git a/test/analytics/__fixtures__/plugins/analytics_plugin_a/server/custom_shipper.ts b/test/analytics/__fixtures__/plugins/analytics_plugin_a/server/custom_shipper.ts index 98c6e5b55ab8a4..74d6a43d5709fa 100644 --- a/test/analytics/__fixtures__/plugins/analytics_plugin_a/server/custom_shipper.ts +++ b/test/analytics/__fixtures__/plugins/analytics_plugin_a/server/custom_shipper.ts @@ -8,6 +8,7 @@ import { Subject } from 'rxjs'; import type { IShipper, Event, EventContext, TelemetryCounter } from 'src/core/server'; +import { TelemetryCounterType } from '../../../../../../src/core/public'; export interface Action { action: string; @@ -25,7 +26,7 @@ export class CustomShipper implements IShipper { this.actions$.next({ action: 'reportEvents', meta: events }); events.forEach((event) => { this.telemetryCounter$.next({ - type: 'succeed', + type: TelemetryCounterType.succeeded, event_type: event.event_type, code: '200', count: 1, diff --git a/test/analytics/tests/analytics_from_the_browser.ts b/test/analytics/tests/analytics_from_the_browser.ts index d24eed3e684a60..9c866204ce18ed 100644 --- a/test/analytics/tests/analytics_from_the_browser.ts +++ b/test/analytics/tests/analytics_from_the_browser.ts @@ -111,14 +111,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const telemetryCounters = await getTelemetryCounters(3); expect(telemetryCounters).to.eql([ { - type: 'succeed', + type: 'succeeded', event_type: 'test-plugin-lifecycle', source: 'FTR-shipper', code: '200', count: 1, }, { - type: 'succeed', + type: 'succeeded', event_type: 'test-plugin-lifecycle', source: 'FTR-shipper', code: '200', diff --git a/test/analytics/tests/analytics_from_the_server.ts b/test/analytics/tests/analytics_from_the_server.ts index 3cec7ff48b8ee9..8555d91031d27e 100644 --- a/test/analytics/tests/analytics_from_the_server.ts +++ b/test/analytics/tests/analytics_from_the_server.ts @@ -110,14 +110,14 @@ export default function ({ getService }: FtrProviderContext) { const telemetryCounters = await getTelemetryCounters(3); expect(telemetryCounters).to.eql([ { - type: 'succeed', + type: 'succeeded', event_type: 'test-plugin-lifecycle', source: 'FTR-shipper', code: '200', count: 1, }, { - type: 'succeed', + type: 'succeeded', event_type: 'test-plugin-lifecycle', source: 'FTR-shipper', code: '200', From ca6f5f7fa17beffe88b4017b9829d7dfcedc9658 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Wed, 30 Mar 2022 19:25:00 +0200 Subject: [PATCH 27/31] Missing type nit --- packages/elastic-analytics/src/events/types.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/elastic-analytics/src/events/types.ts b/packages/elastic-analytics/src/events/types.ts index fccce205aa5eac..8523b7791150a5 100644 --- a/packages/elastic-analytics/src/events/types.ts +++ b/packages/elastic-analytics/src/events/types.ts @@ -6,6 +6,8 @@ * Side Public License, v 1. */ +import type { ShipperName } from '../analytics_client'; + export interface EventContext { // TODO: Extend with known keys [key: string]: unknown; @@ -55,7 +57,7 @@ export interface TelemetryCounter { /** * Who emitted the event? It can be "client" or the name of the shipper. */ - source: 'client' | string; + source: 'client' | ShipperName; /** * The event type the success/failure/drop event refers to. */ From 255681290cf9693b3d6c6d0249b3de38558363cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Wed, 30 Mar 2022 20:43:52 +0200 Subject: [PATCH 28/31] FTRs import `TelemetryCounterType from the package --- .../plugins/analytics_plugin_a/public/custom_shipper.ts | 2 +- .../plugins/analytics_plugin_a/server/custom_shipper.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/custom_shipper.ts b/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/custom_shipper.ts index 2980bdb056b02c..a0d943736db4fa 100644 --- a/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/custom_shipper.ts +++ b/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/custom_shipper.ts @@ -7,8 +7,8 @@ */ import { Subject } from 'rxjs'; +import { TelemetryCounterType } from '@elastic/analytics'; import type { Event, EventContext, IShipper, TelemetryCounter } from 'src/core/public'; -import { TelemetryCounterType } from '../../../../../../src/core/public'; export interface Action { action: string; diff --git a/test/analytics/__fixtures__/plugins/analytics_plugin_a/server/custom_shipper.ts b/test/analytics/__fixtures__/plugins/analytics_plugin_a/server/custom_shipper.ts index 74d6a43d5709fa..949623314e6039 100644 --- a/test/analytics/__fixtures__/plugins/analytics_plugin_a/server/custom_shipper.ts +++ b/test/analytics/__fixtures__/plugins/analytics_plugin_a/server/custom_shipper.ts @@ -7,8 +7,8 @@ */ import { Subject } from 'rxjs'; +import { TelemetryCounterType } from '@elastic/analytics'; import type { IShipper, Event, EventContext, TelemetryCounter } from 'src/core/server'; -import { TelemetryCounterType } from '../../../../../../src/core/public'; export interface Action { action: string; From e012c07aaae7aacf4bd56befb5363f7b7c345e71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Wed, 30 Mar 2022 21:41:26 +0200 Subject: [PATCH 29/31] Simplify AnalyticsClient by moving the OptInConfig logic to a service --- .../analytics_client/analytics_client.test.ts | 4 +- .../src/analytics_client/analytics_client.ts | 57 +-- .../analytics_client/opt_in_config.test.ts | 329 ++++++++++++++++++ .../src/analytics_client/opt_in_config.ts | 66 ++++ 4 files changed, 411 insertions(+), 45 deletions(-) create mode 100644 packages/elastic-analytics/src/analytics_client/opt_in_config.test.ts create mode 100644 packages/elastic-analytics/src/analytics_client/opt_in_config.ts diff --git a/packages/elastic-analytics/src/analytics_client/analytics_client.test.ts b/packages/elastic-analytics/src/analytics_client/analytics_client.test.ts index 8c25efcf5f60aa..cdb380d6154017 100644 --- a/packages/elastic-analytics/src/analytics_client/analytics_client.test.ts +++ b/packages/elastic-analytics/src/analytics_client/analytics_client.test.ts @@ -589,7 +589,9 @@ describe('AnalyticsClient', () => { analyticsClient.optIn({ global: { enabled: true } }); // eslint-disable-next-line dot-notation - expect(analyticsClient['optInConfig$'].value).toEqual({ global: { enabled: true } }); + expect(analyticsClient['optInConfig$'].value!['optInConfig']).toEqual({ + global: { enabled: true }, + }); }); test('Updates each shipper optIn config for global opt-in: true', () => { diff --git a/packages/elastic-analytics/src/analytics_client/analytics_client.ts b/packages/elastic-analytics/src/analytics_client/analytics_client.ts index fc5a4fe7b06fb0..7f21027e8bb67a 100644 --- a/packages/elastic-analytics/src/analytics_client/analytics_client.ts +++ b/packages/elastic-analytics/src/analytics_client/analytics_client.ts @@ -35,8 +35,8 @@ import type { } from './types'; import type { Event, EventContext, EventType, TelemetryCounter } from '../events'; import { TelemetryCounterType } from '../events'; -import type { OptInConfigPerType } from './types'; import { ShippersRegistry } from './shippers_registry'; +import { OptInConfigService } from './opt_in_config'; export class AnalyticsClient implements IAnalyticsClient { private readonly internalTelemetryCounter$ = new Subject(); @@ -61,9 +61,9 @@ export class AnalyticsClient implements IAnalyticsClient { Observable>, Partial >(); - private readonly optInConfig$ = new BehaviorSubject(undefined); + private readonly optInConfig$ = new BehaviorSubject(undefined); private readonly optInConfigWithReplay$ = this.optInConfig$.pipe( - filter((optInConfig): optInConfig is OptInConfig => typeof optInConfig !== 'undefined'), + filter((optInConfig): optInConfig is OptInConfigService => typeof optInConfig !== 'undefined'), shareReplay(1) ); private readonly contextWithReplay$ = this.context$.pipe( @@ -108,9 +108,8 @@ export class AnalyticsClient implements IAnalyticsClient { } const optInConfig = this.optInConfig$.value; - const eventTypeOptInConfig = optInConfig?.event_types && optInConfig?.event_types[eventType]; - if (optInConfig?.global.enabled === false || eventTypeOptInConfig?.enabled === false) { + if (optInConfig?.isEventTypeOptedIn(eventType) === false) { // If opted out, skip early return; } @@ -126,7 +125,7 @@ export class AnalyticsClient implements IAnalyticsClient { // If the opt-in config is not provided yet, we need to enqueue the event to an internal queue this.internalEventQueue$.next(event); } else { - this.sendToShipper(eventType, [event], eventTypeOptInConfig); + this.sendToShipper(eventType, [event]); } }; @@ -138,7 +137,8 @@ export class AnalyticsClient implements IAnalyticsClient { }; public optIn = (optInConfig: OptInConfig) => { - this.optInConfig$.next(optInConfig); + const optInConfigInstance = new OptInConfigService(optInConfig); + this.optInConfig$.next(optInConfigInstance); }; public registerContextProvider = (contextProviderOpts: ContextProviderOpts) => { @@ -198,9 +198,7 @@ export class AnalyticsClient implements IAnalyticsClient { // Spread the optIn configuration updates this.optInConfigWithReplay$.subscribe((optInConfig) => { - const isShipperExplicitlyOptedIn = - (optInConfig.global.shippers && optInConfig.global.shippers[shipperName]) ?? true; - const isOptedIn = optInConfig.global.enabled && isShipperExplicitlyOptedIn; + const isOptedIn = optInConfig.isShipperOptedIn(shipperName); try { shipper.optIn(isOptedIn); } catch (err) { @@ -233,21 +231,12 @@ export class AnalyticsClient implements IAnalyticsClient { * Forwards the `events` to the registered shippers, bearing in mind if the shipper is opted-in for that eventType. * @param eventType The event type's name * @param events A bulk array of events matching the eventType. - * @param eventTypeOptInConfig The optIn config for the sepecific eventType. * @private */ - private sendToShipper( - eventType: EventType, - events: Event[], - eventTypeOptInConfig?: OptInConfigPerType - ) { + private sendToShipper(eventType: EventType, events: Event[]) { let sentToShipper = false; this.shippersRegistry.getShippersForEventType(eventType).forEach((shipper, shipperName) => { - const isShipperOptedIn = - ((this.optInConfig$.value?.global.shippers && - this.optInConfig$.value.global.shippers[shipperName]) ?? - true) && - ((eventTypeOptInConfig?.shippers && eventTypeOptInConfig.shippers[shipperName]) ?? true); + const isShipperOptedIn = this.optInConfig$.value?.isShipperOptedIn(shipperName, eventType); // Only send it to the non-explicitly opted-out shippers if (isShipperOptedIn) { @@ -314,7 +303,7 @@ export class AnalyticsClient implements IAnalyticsClient { // Re-emit the context to make sure all the shippers got it (only if opted-in) tap(() => { - if (this.optInConfig$.value?.global.enabled) { + if (this.optInConfig$.value?.isOptedIn()) { this.context$.next(this.context$.value); } }), @@ -327,7 +316,7 @@ export class AnalyticsClient implements IAnalyticsClient { concatMap((events) => from(events)), // Discard opted-out events - filter((event) => this.eventIsOptedIn(event.event_type)), + filter((event) => this.optInConfig$.value?.isEventTypeOptedIn(event.event_type) === true), // Let's group the requests per eventType for easier batching groupBy((event) => event.event_type), @@ -339,27 +328,7 @@ export class AnalyticsClient implements IAnalyticsClient { ) ) .subscribe(({ eventType, events }) => { - const eventTypeOptInConfig = - this.optInConfig$.value?.event_types && this.optInConfig$.value?.event_types[eventType]; - this.sendToShipper(eventType, events, eventTypeOptInConfig); + this.sendToShipper(eventType, events); }); } - - /** - * Returns whether the event type is opted-in or not. - * @remarks It does not check the opt-in state at the shipper's level. - * - * @param eventType The event type to check - * @private - */ - private eventIsOptedIn(eventType: EventType): boolean { - const optInConfig = this.optInConfig$.value; - const isGloballyOptedIn = optInConfig?.global.enabled === true; - const eventIsNotOptedOut = - (optInConfig?.event_types && - // Checking it's not `false` because if a shipper is not explicitly specified, we assume opted-in based on the global state - optInConfig.event_types[eventType]?.enabled !== false) ?? - true; - return isGloballyOptedIn && eventIsNotOptedOut; - } } diff --git a/packages/elastic-analytics/src/analytics_client/opt_in_config.test.ts b/packages/elastic-analytics/src/analytics_client/opt_in_config.test.ts new file mode 100644 index 00000000000000..8c34d79086a3c5 --- /dev/null +++ b/packages/elastic-analytics/src/analytics_client/opt_in_config.test.ts @@ -0,0 +1,329 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { OptInConfigService } from './opt_in_config'; + +describe('OptInConfigService', () => { + describe('isOptedIn', () => { + test('Returns `true` when `global.enabled: true`', () => { + const config = new OptInConfigService({ global: { enabled: true } }); + expect(config.isOptedIn()).toBe(true); + }); + + test('Returns `false` when `global.enabled: false`', () => { + const config = new OptInConfigService({ global: { enabled: false } }); + expect(config.isOptedIn()).toBe(false); + }); + }); + + describe('isEventTypeOptedIn', () => { + test('Returns `true` when `global.enabled: true` and no eventType specific config is provided', () => { + const config = new OptInConfigService({ global: { enabled: true } }); + expect(config.isEventTypeOptedIn('test-event-1')).toBe(true); + }); + + test('Returns `false` when `global.enabled: false` and no eventType specific config is provided', () => { + const config = new OptInConfigService({ global: { enabled: false } }); + expect(config.isEventTypeOptedIn('test-event-1')).toBe(false); + }); + + test('Returns `true` when `global.enabled: true` and event_type config exists but not for the requested eventType', () => { + const config = new OptInConfigService({ + global: { enabled: true }, + event_types: { + 'test-event-2': { enabled: true }, + 'test-event-3': { enabled: false }, + }, + }); + expect(config.isEventTypeOptedIn('test-event-1')).toBe(true); + }); + + test('Returns `false` when `global.enabled: false` and event_type config exists but not for the requested eventType', () => { + const config = new OptInConfigService({ + global: { enabled: false }, + event_types: { + 'test-event-2': { enabled: true }, + 'test-event-3': { enabled: false }, + }, + }); + expect(config.isEventTypeOptedIn('test-event-1')).toBe(false); + }); + + test('Returns `true` when `global.enabled: true` and event_type config exists and it is `true`', () => { + const config = new OptInConfigService({ + global: { enabled: true }, + event_types: { + 'test-event-1': { enabled: true }, + }, + }); + expect(config.isEventTypeOptedIn('test-event-1')).toBe(true); + }); + + test('Returns `false` when `global.enabled: false` and event_type config exists and it is `true`', () => { + const config = new OptInConfigService({ + global: { enabled: false }, + event_types: { + 'test-event-1': { enabled: true }, + }, + }); + expect(config.isEventTypeOptedIn('test-event-1')).toBe(false); + }); + + test('Returns `false` when `global.enabled: true` and event_type config exists and it is `false`', () => { + const config = new OptInConfigService({ + global: { enabled: true }, + event_types: { + 'test-event-1': { enabled: false }, + }, + }); + expect(config.isEventTypeOptedIn('test-event-1')).toBe(false); + }); + + test('Returns `false` when `global.enabled: false` and event_type config exists and it is `false`', () => { + const config = new OptInConfigService({ + global: { enabled: false }, + event_types: { + 'test-event-1': { enabled: false }, + }, + }); + expect(config.isEventTypeOptedIn('test-event-1')).toBe(false); + }); + }); + describe('isShipperOptedIn', () => { + test('Returns `true` when `global.enabled: true` and no shipper specific config is provided', () => { + const config = new OptInConfigService({ global: { enabled: true } }); + expect(config.isShipperOptedIn('test-shipper-1')).toBe(true); + expect(config.isShipperOptedIn('test-shipper-1', 'test-event-1')).toBe(true); + }); + + test('Returns `false` when `global.enabled: false` and no shipper specific config is provided', () => { + const config = new OptInConfigService({ global: { enabled: false } }); + expect(config.isShipperOptedIn('test-shipper-1')).toBe(false); + expect(config.isShipperOptedIn('test-shipper-1', 'test-event-1')).toBe(false); + }); + + test('Returns `true` when `global.enabled: true` and shipper config exists but not for the requested eventType', () => { + const config = new OptInConfigService({ + global: { + enabled: true, + shippers: { + 'test-shipper-2': true, + 'test-shipper-3': false, + }, + }, + }); + expect(config.isShipperOptedIn('test-shipper-1')).toBe(true); + expect(config.isShipperOptedIn('test-shipper-1', 'test-event-1')).toBe(true); + }); + + test('Returns `false` when `global.enabled: false` and shipper config exists but not for the requested eventType', () => { + const config = new OptInConfigService({ + global: { + enabled: false, + shippers: { + 'test-shipper-2': true, + 'test-shipper-3': false, + }, + }, + }); + expect(config.isShipperOptedIn('test-shipper-1')).toBe(false); + expect(config.isShipperOptedIn('test-shipper-1', 'test-event-1')).toBe(false); + }); + + test('Returns `true` when `global.enabled: true` and shipper config exists and it is `true`', () => { + const config = new OptInConfigService({ + global: { + enabled: true, + shippers: { + 'test-shipper-1': true, + }, + }, + }); + expect(config.isShipperOptedIn('test-shipper-1')).toBe(true); + expect(config.isShipperOptedIn('test-shipper-1', 'test-event-1')).toBe(true); + }); + + test('Returns `false` when `global.enabled: false` and shipper config exists and it is `true`', () => { + const config = new OptInConfigService({ + global: { + enabled: false, + shippers: { + 'test-shipper-1': true, + }, + }, + }); + expect(config.isShipperOptedIn('test-shipper-1')).toBe(false); + expect(config.isShipperOptedIn('test-shipper-1', 'test-event-1')).toBe(false); + }); + + test('Returns `false` when `global.enabled: true` and shipper config exists and it is `false`', () => { + const config = new OptInConfigService({ + global: { + enabled: true, + shippers: { + 'test-shipper-1': false, + }, + }, + }); + expect(config.isShipperOptedIn('test-shipper-1')).toBe(false); + expect(config.isShipperOptedIn('test-shipper-1', 'test-event-1')).toBe(false); + }); + + test('Returns `false` when `global.enabled: false` and shipper config exists and it is `false`', () => { + const config = new OptInConfigService({ + global: { + enabled: false, + shippers: { + 'test-shipper-1': false, + }, + }, + }); + expect(config.isShipperOptedIn('test-shipper-1')).toBe(false); + expect(config.isShipperOptedIn('test-shipper-1', 'test-event-1')).toBe(false); + }); + + describe('with event_type config', () => { + test('Returns `true` when `global.enabled: true`, `shipper: true` and `event: true` (no `event.shippers`)', () => { + const config = new OptInConfigService({ + global: { + enabled: true, + shippers: { + 'test-shipper-1': true, + }, + }, + event_types: { + 'test-event-1': { + enabled: true, + }, + }, + }); + expect(config.isShipperOptedIn('test-shipper-1', 'test-event-1')).toBe(true); + }); + + test('Returns `true` when `global.enabled: true`, `shipper: true`, `event: true` (`event.shippers` exists but for others)', () => { + const config = new OptInConfigService({ + global: { + enabled: true, + shippers: { + 'test-shipper-1': true, + }, + }, + event_types: { + 'test-event-1': { + enabled: true, + shippers: { + 'test-shipper-2': false, + }, + }, + }, + }); + expect(config.isShipperOptedIn('test-shipper-1', 'test-event-1')).toBe(true); + }); + + test('Returns `true` when `global.enabled: true`, `shipper: true`, `event: true` (`event.shipper: true`)', () => { + const config = new OptInConfigService({ + global: { + enabled: true, + shippers: { + 'test-shipper-1': true, + }, + }, + event_types: { + 'test-event-1': { + enabled: true, + shippers: { + 'test-shipper-1': true, + }, + }, + }, + }); + expect(config.isShipperOptedIn('test-shipper-1', 'test-event-1')).toBe(true); + }); + + test('Returns `false` when `global.enabled: false`, `shipper: true`, `event: true` (`event.shipper: true`)', () => { + const config = new OptInConfigService({ + global: { + enabled: false, + shippers: { + 'test-shipper-1': true, + }, + }, + event_types: { + 'test-event-1': { + enabled: true, + shippers: { + 'test-shipper-1': true, + }, + }, + }, + }); + expect(config.isShipperOptedIn('test-shipper-1', 'test-event-1')).toBe(false); + }); + + test('Returns `false` when `global.enabled: true`, `shipper: false`, `event: true` (`event.shipper: true`)', () => { + const config = new OptInConfigService({ + global: { + enabled: true, + shippers: { + 'test-shipper-1': false, + }, + }, + event_types: { + 'test-event-1': { + enabled: true, + shippers: { + 'test-shipper-1': true, + }, + }, + }, + }); + expect(config.isShipperOptedIn('test-shipper-1', 'test-event-1')).toBe(false); + }); + + test('Returns `false` when `global.enabled: true`, `shipper: true`, `event: false` (`event.shipper: true`)', () => { + const config = new OptInConfigService({ + global: { + enabled: true, + shippers: { + 'test-shipper-1': true, + }, + }, + event_types: { + 'test-event-1': { + enabled: false, + shippers: { + 'test-shipper-1': true, + }, + }, + }, + }); + expect(config.isShipperOptedIn('test-shipper-1', 'test-event-1')).toBe(false); + }); + + test('Returns `false` when `global.enabled: true`, `shipper: true`, `event: true` (`event.shipper: false`)', () => { + const config = new OptInConfigService({ + global: { + enabled: true, + shippers: { + 'test-shipper-1': true, + }, + }, + event_types: { + 'test-event-1': { + enabled: true, + shippers: { + 'test-shipper-1': false, + }, + }, + }, + }); + expect(config.isShipperOptedIn('test-shipper-1', 'test-event-1')).toBe(false); + }); + }); + }); +}); diff --git a/packages/elastic-analytics/src/analytics_client/opt_in_config.ts b/packages/elastic-analytics/src/analytics_client/opt_in_config.ts new file mode 100644 index 00000000000000..83498864173430 --- /dev/null +++ b/packages/elastic-analytics/src/analytics_client/opt_in_config.ts @@ -0,0 +1,66 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { OptInConfig, ShipperName } from './types'; +import type { EventType } from '../events'; + +export class OptInConfigService { + constructor(private readonly optInConfig: OptInConfig) {} + + /** + * Is globally opted in? + */ + public isOptedIn(): boolean { + return this.optInConfig.global.enabled; + } + + /** + * Is the given event type opted in? + * @param eventType the event type to check + */ + public isEventTypeOptedIn(eventType: EventType): boolean { + const isGlobalOptedIn = this.isOptedIn(); + // In case of not provided a specific eventType consent, we assume opted-in + const isEventTypeOptedIn = + (this.optInConfig.event_types && this.optInConfig.event_types[eventType]?.enabled) ?? true; + + return isGlobalOptedIn && isEventTypeOptedIn; + } + + /** + * Is the given shipper opted in? + * @param shipperName the shipper to check + * @param eventType the event type to check for the shipper + */ + public isShipperOptedIn(shipperName: ShipperName, eventType?: EventType): boolean { + const isGlobalOptedIn = this.isOptedIn(); + + // In case of not provided a specific shipper consent, we assume opted-in + const isShipperGloballyOptedIn: boolean = + (this.optInConfig.global.shippers && this.optInConfig.global.shippers[shipperName]) ?? true; + + if (eventType) { + const isEventTypeOptedIn = this.isEventTypeOptedIn(eventType); + + const eventTypeOptInConfig = + this.optInConfig.event_types && this.optInConfig.event_types[eventType]; + // In case of not provided a specific eventType-level shipper consent, we assume opted-in + const isEventTypeShipperOptedIn: boolean = + (eventTypeOptInConfig?.shippers && eventTypeOptInConfig.shippers[shipperName]) ?? true; + + return ( + isGlobalOptedIn && + isShipperGloballyOptedIn && + isEventTypeOptedIn && + isEventTypeShipperOptedIn + ); + } else { + return isGlobalOptedIn && isShipperGloballyOptedIn; + } + } +} From 5cba9a8f1a9a9a4d319eb155d39a23900e12046a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Wed, 30 Mar 2022 22:23:10 +0200 Subject: [PATCH 30/31] Context Provider has a name and is not removed after completion --- packages/elastic-analytics/README.md | 1 + .../analytics_client/analytics_client.test.ts | 49 +++++++++++- .../src/analytics_client/analytics_client.ts | 50 ++---------- .../src/analytics_client/context_service.ts | 77 +++++++++++++++++++ .../src/analytics_client/mocks.ts | 11 +-- .../src/analytics_client/types.ts | 14 ++++ .../analytics/analytics_service.mock.ts | 1 + .../public/analytics/analytics_service.ts | 1 + .../analytics/analytics_service.mock.ts | 2 + .../server/analytics/analytics_service.ts | 2 + src/core/server/plugins/plugin_context.ts | 2 + .../analytics_plugin_a/public/plugin.ts | 1 + .../analytics_plugin_a/server/plugin.ts | 1 + 13 files changed, 162 insertions(+), 50 deletions(-) create mode 100644 packages/elastic-analytics/src/analytics_client/context_service.ts diff --git a/packages/elastic-analytics/README.md b/packages/elastic-analytics/README.md index 3448179898ce54..f5cd01c811ac60 100644 --- a/packages/elastic-analytics/README.md +++ b/packages/elastic-analytics/README.md @@ -97,6 +97,7 @@ Context is important! For that reason, the client internally appends the timesta ```typescript analytics.registerContextProvider({ + name: 'my_context_provider', // RxJS Observable that emits every time the context changes. For example: a License changes from `basic` to `trial`. context$, // Similar to the `reportEvent` API, schema defining the structure of the expected output of the context$ observable. diff --git a/packages/elastic-analytics/src/analytics_client/analytics_client.test.ts b/packages/elastic-analytics/src/analytics_client/analytics_client.test.ts index cdb380d6154017..05b5f6c40dc7bd 100644 --- a/packages/elastic-analytics/src/analytics_client/analytics_client.test.ts +++ b/packages/elastic-analytics/src/analytics_client/analytics_client.test.ts @@ -320,6 +320,7 @@ describe('AnalyticsClient', () => { const context$ = new Subject<{ a_field: boolean }>(); analyticsClient.registerContextProvider({ + name: 'contextProviderA', schema: { a_field: { type: 'boolean', @@ -370,6 +371,7 @@ describe('AnalyticsClient', () => { test('Registers a context provider', async () => { const context$ = new Subject<{ a_field: boolean }>(); analyticsClient.registerContextProvider({ + name: 'contextProviderA', schema: { a_field: { type: 'boolean', @@ -392,6 +394,7 @@ describe('AnalyticsClient', () => { test('It does not break if context emits `undefined`', async () => { const context$ = new Subject<{ a_field: boolean }>(); analyticsClient.registerContextProvider({ + name: 'contextProviderA', schema: { a_field: { type: 'boolean', @@ -416,6 +419,7 @@ describe('AnalyticsClient', () => { test('It does not break for BehaviourSubjects (emitting as soon as they connect)', async () => { const context$ = new BehaviorSubject<{ a_field: boolean }>({ a_field: true }); analyticsClient.registerContextProvider({ + name: 'contextProviderA', schema: { a_field: { type: 'boolean', @@ -436,6 +440,7 @@ describe('AnalyticsClient', () => { test('Merges all the contexts together', async () => { const contextA$ = new Subject<{ a_field: boolean }>(); analyticsClient.registerContextProvider({ + name: 'contextProviderA', schema: { a_field: { type: 'boolean', @@ -449,6 +454,7 @@ describe('AnalyticsClient', () => { const contextB$ = new Subject<{ a_field?: boolean; b_field: number }>(); analyticsClient.registerContextProvider({ + name: 'contextProviderB', schema: { a_field: { type: 'boolean', @@ -487,6 +493,7 @@ describe('AnalyticsClient', () => { test('The global context is not polluted by context providers removing reported fields', async () => { const context$ = new Subject<{ a_field?: boolean; b_field: number }>(); analyticsClient.registerContextProvider({ + name: 'contextProviderA', schema: { a_field: { type: 'boolean', @@ -521,16 +528,49 @@ describe('AnalyticsClient', () => { ]); }); - test('Removes the context provider after it completes', async () => { + test('Fails to register 2 context providers with the same name', () => { + analyticsClient.registerContextProvider({ + name: 'contextProviderA', + schema: { + a_field: { + type: 'boolean', + _meta: { + description: 'a_field description', + }, + }, + }, + context$: new Subject<{ a_field: boolean }>(), + }); + expect(() => { + analyticsClient.registerContextProvider({ + name: 'contextProviderA', + schema: { + a_field: { + type: 'boolean', + _meta: { + description: 'a_field description', + }, + }, + }, + context$: new Subject<{ a_field: boolean }>(), + }); + }).toThrowErrorMatchingInlineSnapshot( + `"Context provider with name 'contextProviderA' already registered"` + ); + }); + + test('Does not remove the context provider after it completes', async () => { const context$ = new Subject<{ a_field: boolean }>(); - // eslint-disable-next-line dot-notation - const contextProvidersRegistry = analyticsClient['contextProvidersRegistry']; + const contextProvidersRegistry = + // eslint-disable-next-line dot-notation + analyticsClient['contextService']['contextProvidersRegistry']; // The context registry is empty expect(contextProvidersRegistry.size).toBe(0); analyticsClient.registerContextProvider({ + name: 'contextProviderA', schema: { a_field: { type: 'boolean', @@ -551,6 +591,9 @@ describe('AnalyticsClient', () => { // Still in the registry expect(contextProvidersRegistry.size).toBe(1); context$.complete(); + // Still in the registry + expect(contextProvidersRegistry.size).toBe(1); + analyticsClient.removeContextProvider('contextProviderA'); // The context provider is removed from the registry expect(contextProvidersRegistry.size).toBe(0); await expect(globalContextPromise).resolves.toEqual([ diff --git a/packages/elastic-analytics/src/analytics_client/analytics_client.ts b/packages/elastic-analytics/src/analytics_client/analytics_client.ts index 7f21027e8bb67a..1c7f261aaf4b4f 100644 --- a/packages/elastic-analytics/src/analytics_client/analytics_client.ts +++ b/packages/elastic-analytics/src/analytics_client/analytics_client.ts @@ -26,6 +26,7 @@ import { import type { IShipper } from '../shippers'; import type { AnalyticsClientInitContext, + ContextProviderName, ContextProviderOpts, EventTypeOpts, IAnalyticsClient, @@ -37,6 +38,7 @@ import type { Event, EventContext, EventType, TelemetryCounter } from '../events import { TelemetryCounterType } from '../events'; import { ShippersRegistry } from './shippers_registry'; import { OptInConfigService } from './opt_in_config'; +import { ContextService } from './context_service'; export class AnalyticsClient implements IAnalyticsClient { private readonly internalTelemetryCounter$ = new Subject(); @@ -56,11 +58,8 @@ export class AnalyticsClient implements IAnalyticsClient { */ private readonly shipperRegistered$ = new Subject(); private readonly eventTypeRegistry = new Map>(); + private readonly contextService: ContextService; private readonly context$ = new BehaviorSubject>({}); - private readonly contextProvidersRegistry = new Map< - Observable>, - Partial - >(); private readonly optInConfig$ = new BehaviorSubject(undefined); private readonly optInConfigWithReplay$ = this.optInConfig$.pipe( filter((optInConfig): optInConfig is OptInConfigService => typeof optInConfig !== 'undefined'), @@ -72,6 +71,7 @@ export class AnalyticsClient implements IAnalyticsClient { ); constructor(private readonly initContext: AnalyticsClientInitContext) { + this.contextService = new ContextService(this.context$, this.initContext.isDev); this.reportEnqueuedEventsWhenClientIsReady(); } @@ -142,30 +142,11 @@ export class AnalyticsClient implements IAnalyticsClient { }; public registerContextProvider = (contextProviderOpts: ContextProviderOpts) => { - contextProviderOpts.context$ - .pipe( - tap((ctx) => { - if (this.initContext.isDev) { - // TODO: In the future we may need to validate the input of the context based on the schema (only if isDev) - } - }) - ) - .subscribe({ - next: (ctx) => { - // We store each context linked to the context provider so they can increase and reduce - // the number of fields they report without having left-overs in the global context. - this.contextProvidersRegistry.set(contextProviderOpts.context$, ctx); + this.contextService.registerContextProvider(contextProviderOpts); + }; - // For every context change, we rebuild the global context. - // It's better to do it here than to rebuild it for every reportEvent. - this.updateGlobalContext(); - }, - complete: () => { - // Delete the context provider from the registry when the observable completes - this.contextProvidersRegistry.delete(contextProviderOpts.context$); - this.updateGlobalContext(); - }, - }); + public removeContextProvider = (name: ContextProviderName) => { + this.contextService.removeContextProvider(name); }; public registerShipper = ( @@ -262,21 +243,6 @@ export class AnalyticsClient implements IAnalyticsClient { } } - /** - * Loops through all the context providers and sets the global context - * @private - */ - private updateGlobalContext() { - this.context$.next( - [...this.contextProvidersRegistry.values()].reduce((acc, context) => { - return { - ...acc, - ...context, - }; - }, {} as Partial) - ); - } - /** * Once the client is ready (it has a valid optInConfig and at least one shipper), * flush any early events and ship them or discard them based on the optInConfig. diff --git a/packages/elastic-analytics/src/analytics_client/context_service.ts b/packages/elastic-analytics/src/analytics_client/context_service.ts new file mode 100644 index 00000000000000..cee3e56b389d16 --- /dev/null +++ b/packages/elastic-analytics/src/analytics_client/context_service.ts @@ -0,0 +1,77 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { Subject, Subscription } from 'rxjs'; +import { tap } from 'rxjs/operators'; +import type { EventContext } from '../events'; +import type { ContextProviderName, ContextProviderOpts } from './types'; + +export class ContextService { + private readonly contextProvidersRegistry = new Map>(); + private readonly contextProvidersSubscriptions = new Map(); + + constructor( + private readonly context$: Subject>, + private readonly isDevMode: boolean + ) {} + + /** + * Registers a context provider, and subscribes to any updates from it. + * @param contextProviderOpts The options to register the context provider {@link ContextProviderOpts} + */ + public registerContextProvider({ name, context$ }: ContextProviderOpts) { + if (this.contextProvidersSubscriptions.has(name)) { + throw new Error(`Context provider with name '${name}' already registered`); + } + + const subscription = context$ + .pipe( + tap((ctx) => { + if (this.isDevMode) { + // TODO: In the future we may need to validate the input of the context based on the schema (only if isDev) + } + }) + ) + .subscribe((context) => { + // We store each context linked to the context provider so they can increase and reduce + // the number of fields they report without having left-overs in the global context. + this.contextProvidersRegistry.set(name, context); + + // For every context change, we rebuild the global context. + // It's better to do it here than to rebuild it for every reportEvent. + this.updateGlobalContext(); + }); + + this.contextProvidersSubscriptions.set(name, subscription); + } + + /** + * Removes the context provider from the registry, unsubscribes from it, and rebuilds the global context. + * @param name The name of the context provider to remove. + */ + public removeContextProvider(name: ContextProviderName) { + this.contextProvidersSubscriptions.get(name)?.unsubscribe(); + this.contextProvidersRegistry.delete(name); + this.updateGlobalContext(); + } + + /** + * Loops through all the context providers and sets the global context + * @private + */ + private updateGlobalContext() { + this.context$.next( + [...this.contextProvidersRegistry.values()].reduce((acc, context) => { + return { + ...acc, + ...context, + }; + }, {} as Partial) + ); + } +} diff --git a/packages/elastic-analytics/src/analytics_client/mocks.ts b/packages/elastic-analytics/src/analytics_client/mocks.ts index 49780c44bc079a..da707178a756e9 100644 --- a/packages/elastic-analytics/src/analytics_client/mocks.ts +++ b/packages/elastic-analytics/src/analytics_client/mocks.ts @@ -11,11 +11,12 @@ import type { IAnalyticsClient } from './types'; function createMockedAnalyticsClient(): jest.Mocked { return { - optIn: jest.fn().mockImplementation(), - reportEvent: jest.fn().mockImplementation(), - registerEventType: jest.fn().mockImplementation(), - registerContextProvider: jest.fn().mockImplementation(), - registerShipper: jest.fn().mockImplementation(), + optIn: jest.fn(), + reportEvent: jest.fn(), + registerEventType: jest.fn(), + registerContextProvider: jest.fn(), + removeContextProvider: jest.fn(), + registerShipper: jest.fn(), telemetryCounter$: new Subject(), }; } diff --git a/packages/elastic-analytics/src/analytics_client/types.ts b/packages/elastic-analytics/src/analytics_client/types.ts index 3c756291e70aff..782d6b16fa594f 100644 --- a/packages/elastic-analytics/src/analytics_client/types.ts +++ b/packages/elastic-analytics/src/analytics_client/types.ts @@ -120,10 +120,19 @@ export interface OptInConfig { event_types?: Record; } +/** + * ContextProviderName used for indexed structures. Only used to improve the readability of the types + */ +export type ContextProviderName = string; + /** * Definition of a context provider */ export interface ContextProviderOpts> { + /** + * The name of the provider. + */ + name: ContextProviderName; /** * Observable that emits the custom context. */ @@ -193,6 +202,11 @@ export interface IAnalyticsClient { * @param contextProviderOpts {@link ContextProviderOpts} */ registerContextProvider: (contextProviderOpts: ContextProviderOpts) => void; + /** + * Removes the context provider and stop enriching the events from its context. + * @param contextProviderName The name of the context provider to remove. + */ + removeContextProvider: (contextProviderName: ContextProviderName) => void; /** * Observable to emit the stats of the processed events. */ diff --git a/src/core/public/analytics/analytics_service.mock.ts b/src/core/public/analytics/analytics_service.mock.ts index 8e2b938d5af472..c14d4a82168508 100644 --- a/src/core/public/analytics/analytics_service.mock.ts +++ b/src/core/public/analytics/analytics_service.mock.ts @@ -22,6 +22,7 @@ const createAnalyticsServiceSetup = (): jest.Mocked => { reportEvent: jest.fn(), registerEventType: jest.fn(), registerContextProvider: jest.fn(), + removeContextProvider: jest.fn(), registerShipper: jest.fn(), telemetryCounter$: new Subject(), }; diff --git a/src/core/public/analytics/analytics_service.ts b/src/core/public/analytics/analytics_service.ts index 4a7868e06e9278..ab17eb46192ae3 100644 --- a/src/core/public/analytics/analytics_service.ts +++ b/src/core/public/analytics/analytics_service.ts @@ -44,6 +44,7 @@ export class AnalyticsService { return { optIn: this.analyticsClient.optIn, registerContextProvider: this.analyticsClient.registerContextProvider, + removeContextProvider: this.analyticsClient.removeContextProvider, registerEventType: this.analyticsClient.registerEventType, registerShipper: this.analyticsClient.registerShipper, reportEvent: this.analyticsClient.reportEvent, diff --git a/src/core/server/analytics/analytics_service.mock.ts b/src/core/server/analytics/analytics_service.mock.ts index 2b3629c4d89188..74f675ac37b8f2 100644 --- a/src/core/server/analytics/analytics_service.mock.ts +++ b/src/core/server/analytics/analytics_service.mock.ts @@ -23,6 +23,7 @@ const createAnalyticsServicePreboot = (): jest.Mocked = reportEvent: jest.fn(), registerEventType: jest.fn(), registerContextProvider: jest.fn(), + removeContextProvider: jest.fn(), registerShipper: jest.fn(), telemetryCounter$: new Subject(), }; @@ -34,6 +35,7 @@ const createAnalyticsServiceSetup = (): jest.Mocked => { reportEvent: jest.fn(), registerEventType: jest.fn(), registerContextProvider: jest.fn(), + removeContextProvider: jest.fn(), registerShipper: jest.fn(), telemetryCounter$: new Subject(), }; diff --git a/src/core/server/analytics/analytics_service.ts b/src/core/server/analytics/analytics_service.ts index 7f020ca7957c57..1d3d5e88f64a23 100644 --- a/src/core/server/analytics/analytics_service.ts +++ b/src/core/server/analytics/analytics_service.ts @@ -49,6 +49,7 @@ export class AnalyticsService { return { optIn: this.analyticsClient.optIn, registerContextProvider: this.analyticsClient.registerContextProvider, + removeContextProvider: this.analyticsClient.removeContextProvider, registerEventType: this.analyticsClient.registerEventType, registerShipper: this.analyticsClient.registerShipper, reportEvent: this.analyticsClient.reportEvent, @@ -59,6 +60,7 @@ export class AnalyticsService { return { optIn: this.analyticsClient.optIn, registerContextProvider: this.analyticsClient.registerContextProvider, + removeContextProvider: this.analyticsClient.removeContextProvider, registerEventType: this.analyticsClient.registerEventType, registerShipper: this.analyticsClient.registerShipper, reportEvent: this.analyticsClient.reportEvent, diff --git a/src/core/server/plugins/plugin_context.ts b/src/core/server/plugins/plugin_context.ts index 218442b0bf05da..4272a9767b90e4 100644 --- a/src/core/server/plugins/plugin_context.ts +++ b/src/core/server/plugins/plugin_context.ts @@ -111,6 +111,7 @@ export function createPluginPrebootSetupContext( analytics: { optIn: deps.analytics.optIn, registerContextProvider: deps.analytics.registerContextProvider, + removeContextProvider: deps.analytics.removeContextProvider, registerEventType: deps.analytics.registerEventType, registerShipper: deps.analytics.registerShipper, reportEvent: deps.analytics.reportEvent, @@ -158,6 +159,7 @@ export function createPluginSetupContext( analytics: { optIn: deps.analytics.optIn, registerContextProvider: deps.analytics.registerContextProvider, + removeContextProvider: deps.analytics.removeContextProvider, registerEventType: deps.analytics.registerEventType, registerShipper: deps.analytics.registerShipper, reportEvent: deps.analytics.reportEvent, diff --git a/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/plugin.ts b/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/plugin.ts index 146be678bddba6..021a57f126612c 100644 --- a/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/plugin.ts +++ b/test/analytics/__fixtures__/plugins/analytics_plugin_a/public/plugin.ts @@ -63,6 +63,7 @@ export class AnalyticsPluginA implements Plugin { }; registerContextProvider({ + name: 'analyticsPluginA', context$: new BehaviorSubject({ user_agent: navigator.userAgent }).asObservable(), schema: { user_agent: { diff --git a/test/analytics/__fixtures__/plugins/analytics_plugin_a/server/plugin.ts b/test/analytics/__fixtures__/plugins/analytics_plugin_a/server/plugin.ts index eaeefcced0a0ca..1abb73c09b37a3 100644 --- a/test/analytics/__fixtures__/plugins/analytics_plugin_a/server/plugin.ts +++ b/test/analytics/__fixtures__/plugins/analytics_plugin_a/server/plugin.ts @@ -90,6 +90,7 @@ export class AnalyticsPluginAPlugin implements Plugin { ); registerContextProvider({ + name: 'analyticsPluginA', context$: new BehaviorSubject({ pid: process.pid }), schema: { pid: { From e87b4749a1b222224f4bfac027b213621b1b35e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Thu, 31 Mar 2022 10:51:17 +0200 Subject: [PATCH 31/31] OptInConfig APIs: return early when possible --- .../src/analytics_client/opt_in_config.ts | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/packages/elastic-analytics/src/analytics_client/opt_in_config.ts b/packages/elastic-analytics/src/analytics_client/opt_in_config.ts index 83498864173430..6fece8b8e2a8f6 100644 --- a/packages/elastic-analytics/src/analytics_client/opt_in_config.ts +++ b/packages/elastic-analytics/src/analytics_client/opt_in_config.ts @@ -24,12 +24,14 @@ export class OptInConfigService { * @param eventType the event type to check */ public isEventTypeOptedIn(eventType: EventType): boolean { - const isGlobalOptedIn = this.isOptedIn(); + if (!this.isOptedIn()) { + return false; + } // In case of not provided a specific eventType consent, we assume opted-in const isEventTypeOptedIn = (this.optInConfig.event_types && this.optInConfig.event_types[eventType]?.enabled) ?? true; - return isGlobalOptedIn && isEventTypeOptedIn; + return isEventTypeOptedIn; } /** @@ -38,14 +40,22 @@ export class OptInConfigService { * @param eventType the event type to check for the shipper */ public isShipperOptedIn(shipperName: ShipperName, eventType?: EventType): boolean { - const isGlobalOptedIn = this.isOptedIn(); + if (!this.isOptedIn()) { + return false; + } // In case of not provided a specific shipper consent, we assume opted-in const isShipperGloballyOptedIn: boolean = (this.optInConfig.global.shippers && this.optInConfig.global.shippers[shipperName]) ?? true; + if (!isShipperGloballyOptedIn) { + return false; + } + if (eventType) { - const isEventTypeOptedIn = this.isEventTypeOptedIn(eventType); + if (!this.isEventTypeOptedIn(eventType)) { + return false; + } const eventTypeOptInConfig = this.optInConfig.event_types && this.optInConfig.event_types[eventType]; @@ -53,14 +63,9 @@ export class OptInConfigService { const isEventTypeShipperOptedIn: boolean = (eventTypeOptInConfig?.shippers && eventTypeOptInConfig.shippers[shipperName]) ?? true; - return ( - isGlobalOptedIn && - isShipperGloballyOptedIn && - isEventTypeOptedIn && - isEventTypeShipperOptedIn - ); + return isEventTypeShipperOptedIn; } else { - return isGlobalOptedIn && isShipperGloballyOptedIn; + return isShipperGloballyOptedIn; } } }