mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 11:05:39 -04:00
[EBT] Split @elastic/analytics
package (#130574)
Co-authored-by: Spencer <spencer@elastic.co>
This commit is contained in:
parent
45851e16c9
commit
fbc8a7176b
58 changed files with 281 additions and 74 deletions
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
|
@ -270,7 +270,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/analytics/ @elastic/kibana-core
|
||||
/packages/kbn-config-schema/ @elastic/kibana-core
|
||||
/packages/kbn-std/ @elastic/kibana-core
|
||||
/packages/kbn-config/ @elastic/kibana-core
|
||||
|
|
|
@ -101,7 +101,6 @@
|
|||
"@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",
|
||||
|
@ -134,6 +133,8 @@
|
|||
"@kbn/ambient-storybook-types": "link:bazel-bin/packages/kbn-ambient-storybook-types",
|
||||
"@kbn/ambient-ui-types": "link:bazel-bin/packages/kbn-ambient-ui-types",
|
||||
"@kbn/analytics": "link:bazel-bin/packages/kbn-analytics",
|
||||
"@kbn/analytics-client": "link:bazel-bin/packages/analytics/client",
|
||||
"@kbn/analytics-shippers-fullstory": "link:bazel-bin/packages/analytics/shippers/fullstory",
|
||||
"@kbn/apm-config-loader": "link:bazel-bin/packages/kbn-apm-config-loader",
|
||||
"@kbn/apm-utils": "link:bazel-bin/packages/kbn-apm-utils",
|
||||
"@kbn/coloring": "link:bazel-bin/packages/kbn-coloring",
|
||||
|
@ -207,7 +208,6 @@
|
|||
"@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/mapbox__vector-tile": "1.3.0",
|
||||
"@types/moment-duration-format": "^2.2.3",
|
||||
|
@ -604,6 +604,8 @@
|
|||
"@types/kbn__ace": "link:bazel-bin/packages/kbn-ace/npm_module_types",
|
||||
"@types/kbn__alerts": "link:bazel-bin/packages/kbn-alerts/npm_module_types",
|
||||
"@types/kbn__analytics": "link:bazel-bin/packages/kbn-analytics/npm_module_types",
|
||||
"@types/kbn__analytics-client": "link:bazel-bin/packages/analytics/client/npm_module_types",
|
||||
"@types/kbn__analytics-shippers-fullstory": "link:bazel-bin/packages/analytics/shippers/fullstory/npm_module_types",
|
||||
"@types/kbn__apm-config-loader": "link:bazel-bin/packages/kbn-apm-config-loader/npm_module_types",
|
||||
"@types/kbn__apm-utils": "link:bazel-bin/packages/kbn-apm-utils/npm_module_types",
|
||||
"@types/kbn__axe-config": "link:bazel-bin/packages/kbn-axe-config/npm_module_types",
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
filegroup(
|
||||
name = "build_pkg_code",
|
||||
srcs = [
|
||||
"//packages/elastic-analytics:build",
|
||||
"//packages/analytics/client:build",
|
||||
"//packages/analytics/shippers/fullstory:build",
|
||||
"//packages/elastic-apm-synthtrace:build",
|
||||
"//packages/elastic-eslint-config-kibana:build",
|
||||
"//packages/elastic-safer-lodash-set:build",
|
||||
|
@ -112,7 +113,8 @@ filegroup(
|
|||
filegroup(
|
||||
name = "build_pkg_types",
|
||||
srcs = [
|
||||
"//packages/elastic-analytics:build_types",
|
||||
"//packages/analytics/client:build_types",
|
||||
"//packages/analytics/shippers/fullstory:build_types",
|
||||
"//packages/elastic-apm-synthtrace:build_types",
|
||||
"//packages/elastic-safer-lodash-set:build_types",
|
||||
"//packages/kbn-ace:build_types",
|
||||
|
|
11
packages/analytics/README.md
Normal file
11
packages/analytics/README.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# @kbn/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.
|
||||
|
||||
## Client
|
||||
|
||||
Holds the public APIs to report events, enrich the events' context and set up the transport mechanisms. Refer to the [client's docs](./client/README.md) for more information.
|
||||
|
||||
## Prebuilt shippers
|
||||
|
||||
Elastic-approved shippers are available as `@kbn/analytics-shippers-*` packages. Refer to the [shippers' docs](./shippers/README.md) for more information.
|
|
@ -2,8 +2,8 @@ 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"
|
||||
PKG_DIRNAME = "client"
|
||||
PKG_REQUIRE_NAME = "@kbn/analytics-client"
|
||||
|
||||
SOURCE_FILES = glob(
|
||||
[
|
||||
|
@ -36,7 +36,6 @@ NPM_MODULE_EXTRA_FILES = [
|
|||
# "@npm//name-of-package"
|
||||
# eg. "@npm//lodash"
|
||||
RUNTIME_DEPS = [
|
||||
"@npm//moment",
|
||||
"@npm//rxjs",
|
||||
]
|
||||
|
||||
|
@ -52,7 +51,6 @@ RUNTIME_DEPS = [
|
|||
TYPES_DEPS = [
|
||||
"@npm//@types/node",
|
||||
"@npm//@types/jest",
|
||||
"@npm//moment",
|
||||
"@npm//rxjs",
|
||||
"//packages/kbn-logging:npm_module_types",
|
||||
"//packages/kbn-logging-mocks:npm_module_types",
|
|
@ -1,4 +1,4 @@
|
|||
# @elastic/analytics
|
||||
# @kbn/analytics-client
|
||||
|
||||
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.
|
||||
|
||||
|
@ -7,7 +7,7 @@ This module implements the Analytics client used for Event-Based Telemetry. The
|
|||
It all starts by creating the client with the `createAnalytics` API:
|
||||
|
||||
```typescript
|
||||
import { createAnalytics } from '@elastic/analytics';
|
||||
import { createAnalytics } from '@kbn/analytics-client';
|
||||
|
||||
const analytics = createAnalytics({
|
||||
// Set to `true` when running in developer mode.
|
||||
|
@ -145,7 +145,7 @@ There are some prebuilt shippers in this package that can be enabled using the A
|
|||
|
||||
#### Prebuilt shippers
|
||||
|
||||
TODO when actually implemented
|
||||
Refer to the [shippers' documentation](../shippers/README.md) for more information.
|
||||
|
||||
#### Custom shippers
|
||||
|
||||
|
@ -158,7 +158,7 @@ import type {
|
|||
EventContext,
|
||||
IShipper,
|
||||
TelemetryCounter
|
||||
} from '@elastic/analytics';
|
||||
} from '@kbn/analytics-client';
|
||||
|
||||
class MyVeryOwnShipper implements IShipper {
|
||||
constructor(myOptions: MyOptions, initContext: AnalyticsClientInitContext) {
|
|
@ -8,6 +8,6 @@
|
|||
|
||||
module.exports = {
|
||||
preset: '@kbn/test/jest_node',
|
||||
rootDir: '../..',
|
||||
roots: ['<rootDir>/packages/elastic-analytics'],
|
||||
rootDir: '../../../',
|
||||
roots: ['<rootDir>/packages/analytics/client'],
|
||||
};
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "@elastic/analytics",
|
||||
"name": "@kbn/analytics-client",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"main": "./target_node/index.js",
|
|
@ -55,5 +55,4 @@ export type {
|
|||
AllowedSchemaTypes,
|
||||
} from './schema';
|
||||
|
||||
export type { IShipper, FullStorySnippetConfig, FullStoryShipperConfig } from './shippers';
|
||||
export { FullStoryShipper } from './shippers';
|
||||
export type { IShipper } from './shippers';
|
|
@ -7,6 +7,3 @@
|
|||
*/
|
||||
|
||||
export type { IShipper } from './types';
|
||||
|
||||
export { FullStoryShipper } from './fullstory';
|
||||
export type { FullStorySnippetConfig, FullStoryShipperConfig } from './fullstory';
|
|
@ -1,9 +1,8 @@
|
|||
{
|
||||
"extends": "../../tsconfig.bazel.json",
|
||||
"extends": "../../../tsconfig.bazel.json",
|
||||
"compilerOptions": {
|
||||
"declaration": true,
|
||||
"emitDeclarationOnly": true,
|
||||
"isolatedModules": true,
|
||||
"outDir": "target_types",
|
||||
"rootDir": "src",
|
||||
"stripInternal": false,
|
5
packages/analytics/shippers/README.md
Normal file
5
packages/analytics/shippers/README.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
# @kbn/analytics-shippers-*
|
||||
|
||||
This directory holds the implementation of the _built-in_ shippers provided by the Analytics client. At the moment, the shippers are:
|
||||
|
||||
* [FullStory](./fullstory/README.md)
|
118
packages/analytics/shippers/fullstory/BUILD.bazel
Normal file
118
packages/analytics/shippers/fullstory/BUILD.bazel
Normal file
|
@ -0,0 +1,118 @@
|
|||
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 = "fullstory"
|
||||
PKG_REQUIRE_NAME = "@kbn/analytics-shippers-fullstory"
|
||||
|
||||
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//moment",
|
||||
]
|
||||
|
||||
# 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//moment",
|
||||
"//packages/analytics/client:npm_module_types",
|
||||
"//packages/kbn-logging-mocks: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"],
|
||||
)
|
23
packages/analytics/shippers/fullstory/README.md
Normal file
23
packages/analytics/shippers/fullstory/README.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
# @kbn/analytics-shippers-fullstory
|
||||
|
||||
FullStory implementation as a shipper for the `@kbn/analytics-client`.
|
||||
|
||||
## How to use it
|
||||
|
||||
This module is intended to be used on the UI only. It does not support server-side events.
|
||||
|
||||
```typescript
|
||||
import { FullStoryShipper } from "@kbn/analytics-shippers-fullstory";
|
||||
|
||||
analytics.registerShipper(FullStoryShipper, { fullStoryOrgId: '12345' })
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
| Name | Description |
|
||||
|:----------------:|:----------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `fullStoryOrgId` | FullStory account ID |
|
||||
| `host` | The host to send the data to. Used to overcome AdBlockers by using custom DNSs. If not specified, it defaults to `fullstory.com`. |
|
||||
| `scriptUrl` | The URL to load the FullStory client from. Falls back to `edge.fullstory.com/s/fs.js` if not specified. |
|
||||
| `debug` | Whether the debug logs should be printed to the console. Defaults to `false`. |
|
||||
| `namespace` | The name of the variable where the API is stored: `window[namespace]`. Defaults to `FS`. |
|
13
packages/analytics/shippers/fullstory/jest.config.js
Normal file
13
packages/analytics/shippers/fullstory/jest.config.js
Normal file
|
@ -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: ['<rootDir>/packages/analytics/shippers/fullstory'],
|
||||
};
|
7
packages/analytics/shippers/fullstory/package.json
Normal file
7
packages/analytics/shippers/fullstory/package.json
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"name": "@kbn/analytics-shippers-fullstory",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"main": "./target_node/index.js",
|
||||
"license": "SSPL-1.0 OR Elastic License 2.0"
|
||||
}
|
|
@ -6,9 +6,12 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import type { IShipper } from '../types';
|
||||
import type { AnalyticsClientInitContext } from '../../analytics_client';
|
||||
import type { EventContext, Event } from '../../events';
|
||||
import type {
|
||||
AnalyticsClientInitContext,
|
||||
EventContext,
|
||||
Event,
|
||||
IShipper,
|
||||
} from '@kbn/analytics-client';
|
||||
import type { FullStoryApi } from './types';
|
||||
import type { FullStorySnippetConfig } from './load_snippet';
|
||||
import { getParsedVersion } from './get_parsed_version';
|
17
packages/analytics/shippers/fullstory/tsconfig.json
Normal file
17
packages/analytics/shippers/fullstory/tsconfig.json
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"extends": "../../../../tsconfig.bazel.json",
|
||||
"compilerOptions": {
|
||||
"declaration": true,
|
||||
"emitDeclarationOnly": true,
|
||||
"outDir": "target_types",
|
||||
"rootDir": "src",
|
||||
"stripInternal": false,
|
||||
"types": [
|
||||
"jest",
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*"
|
||||
]
|
||||
}
|
|
@ -19,7 +19,12 @@ import { REPO_ROOT } from '@kbn/utils';
|
|||
* eg. src/vis_editors => would find a package at src/vis_editors/foo/package.json
|
||||
* src/vis_editors/* => would find a package at src/vis_editors/foo/bar/package.json
|
||||
*/
|
||||
export const BAZEL_PACKAGE_DIRS = ['packages', 'packages/shared-ux/*'];
|
||||
export const BAZEL_PACKAGE_DIRS = [
|
||||
'packages',
|
||||
'packages/shared-ux/*',
|
||||
'packages/analytics',
|
||||
'packages/analytics/shippers',
|
||||
];
|
||||
|
||||
/**
|
||||
* Resolve all the BAZEL_PACKAGE_DIRS to absolute paths
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import type { AnalyticsClient } from '@elastic/analytics';
|
||||
import { createAnalytics } from '@elastic/analytics';
|
||||
import type { AnalyticsClient } from '@kbn/analytics-client';
|
||||
import { createAnalytics } from '@kbn/analytics-client';
|
||||
import { CoreContext } from '../core_system';
|
||||
import { createLogger } from './logger';
|
||||
|
||||
|
|
|
@ -20,6 +20,6 @@ export type {
|
|||
OptInConfig,
|
||||
ContextProviderOpts,
|
||||
TelemetryCounter,
|
||||
} from '@elastic/analytics';
|
||||
} from '@kbn/analytics-client';
|
||||
|
||||
export { TelemetryCounterType } from '@elastic/analytics';
|
||||
export { TelemetryCounterType } from '@kbn/analytics-client';
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
/// <reference types="node" />
|
||||
|
||||
import { Action } from 'history';
|
||||
import { AnalyticsClient } from '@elastic/analytics';
|
||||
import { AnalyticsClient } from '@kbn/analytics-client';
|
||||
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 { ContextProviderOpts } from '@kbn/analytics-client';
|
||||
import { DetailedPeerCertificate } from 'tls';
|
||||
import type { DocLinks } from '@kbn/doc-links';
|
||||
import { EnvironmentMode } from '@kbn/config';
|
||||
|
@ -24,15 +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 { Event as Event_2 } from '@kbn/analytics-client';
|
||||
import { EventContext } from '@kbn/analytics-client';
|
||||
import { EventType } from '@kbn/analytics-client';
|
||||
import { EventTypeOpts } from '@kbn/analytics-client';
|
||||
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 { IShipper } from '@kbn/analytics-client';
|
||||
import { Location as Location_2 } from 'history';
|
||||
import { LocationDescriptorObject } from 'history';
|
||||
import { Logger } from '@kbn/logging';
|
||||
|
@ -40,7 +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 { OptInConfig } from '@kbn/analytics-client';
|
||||
import { PackageInfo } from '@kbn/config';
|
||||
import { Path } from 'history';
|
||||
import { PeerCertificate } from 'tls';
|
||||
|
@ -50,9 +50,9 @@ 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 { TelemetryCounterType } from '@elastic/analytics';
|
||||
import { ShipperClassConstructor } from '@kbn/analytics-client';
|
||||
import { TelemetryCounter } from '@kbn/analytics-client';
|
||||
import { TelemetryCounterType } from '@kbn/analytics-client';
|
||||
import type { ThemeVersion } from '@kbn/ui-shared-deps-npm';
|
||||
import { TransitionPromptHook } from 'history';
|
||||
import { Type } from '@kbn/config-schema';
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import type { AnalyticsClient } from '@elastic/analytics';
|
||||
import { createAnalytics } from '@elastic/analytics';
|
||||
import type { AnalyticsClient } from '@kbn/analytics-client';
|
||||
import { createAnalytics } from '@kbn/analytics-client';
|
||||
import type { CoreContext } from '../core_context';
|
||||
|
||||
/**
|
||||
|
|
|
@ -24,6 +24,6 @@ export type {
|
|||
OptInConfig,
|
||||
ContextProviderOpts,
|
||||
TelemetryCounter,
|
||||
} from '@elastic/analytics';
|
||||
} from '@kbn/analytics-client';
|
||||
|
||||
export { TelemetryCounterType } from '@elastic/analytics';
|
||||
export { TelemetryCounterType } from '@kbn/analytics-client';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
/// <reference types="node" />
|
||||
|
||||
import { AddConfigDeprecation } from '@kbn/config';
|
||||
import { AnalyticsClient } from '@elastic/analytics';
|
||||
import { AnalyticsClient } from '@kbn/analytics-client';
|
||||
import apm from 'elastic-apm-node';
|
||||
import Boom from '@hapi/boom';
|
||||
import { ByteSizeValue } from '@kbn/config-schema';
|
||||
|
@ -21,7 +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 { ContextProviderOpts } from '@kbn/analytics-client';
|
||||
import { DetailedPeerCertificate } from 'tls';
|
||||
import type { DocLinks } from '@kbn/doc-links';
|
||||
import { Duration } from 'moment';
|
||||
|
@ -34,12 +34,12 @@ 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 { Event as Event_2 } from '@kbn/analytics-client';
|
||||
import { EventContext } from '@kbn/analytics-client';
|
||||
import { EventType } from '@kbn/analytics-client';
|
||||
import { EventTypeOpts } from '@kbn/analytics-client';
|
||||
import { IncomingHttpHeaders } from 'http';
|
||||
import { IShipper } from '@elastic/analytics';
|
||||
import { IShipper } from '@kbn/analytics-client';
|
||||
import { Logger } from '@kbn/logging';
|
||||
import { LoggerFactory } from '@kbn/logging';
|
||||
import { LogLevel as LogLevel_2 } from '@kbn/logging';
|
||||
|
@ -48,7 +48,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 { OptInConfig } from '@kbn/analytics-client';
|
||||
import { PackageInfo } from '@kbn/config';
|
||||
import { PathConfigType } from '@kbn/utils';
|
||||
import { PeerCertificate } from 'tls';
|
||||
|
@ -60,10 +60,10 @@ 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 { ShipperClassConstructor } from '@kbn/analytics-client';
|
||||
import { Stream } from 'stream';
|
||||
import { TelemetryCounter } from '@elastic/analytics';
|
||||
import { TelemetryCounterType } from '@elastic/analytics';
|
||||
import { TelemetryCounter } from '@kbn/analytics-client';
|
||||
import { TelemetryCounterType } from '@kbn/analytics-client';
|
||||
import { Type } from '@kbn/config-schema';
|
||||
import { TypeOf } from '@kbn/config-schema';
|
||||
import { UiCounterMetricType } from '@kbn/analytics';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import type { ElasticsearchClient, SavedObjectsClientContract, Logger } from '@kbn/core/server';
|
||||
|
||||
import type { PossibleSchemaTypes } from '@elastic/analytics';
|
||||
import type { PossibleSchemaTypes } from '@kbn/analytics-client';
|
||||
|
||||
export type {
|
||||
AllowedSchemaTypes,
|
||||
|
@ -16,7 +16,7 @@ export type {
|
|||
AllowedSchemaBooleanTypes,
|
||||
AllowedSchemaNumberTypes,
|
||||
PossibleSchemaTypes,
|
||||
} from '@elastic/analytics';
|
||||
} from '@kbn/analytics-client';
|
||||
|
||||
/**
|
||||
* Helper to find out whether to keep recursively looking or if we are on an end value
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import { Subject } from 'rxjs';
|
||||
import { TelemetryCounterType } from '@elastic/analytics';
|
||||
import { TelemetryCounterType } from '@kbn/analytics-client';
|
||||
import type { Event, EventContext, IShipper, TelemetryCounter } from '@kbn/core/public';
|
||||
|
||||
export interface Action {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import { Subject } from 'rxjs';
|
||||
import { TelemetryCounterType } from '@elastic/analytics';
|
||||
import { TelemetryCounterType } from '@kbn/analytics-client';
|
||||
import type { IShipper, Event, EventContext, TelemetryCounter } from '@kbn/core/server';
|
||||
|
||||
export interface Action {
|
||||
|
|
|
@ -255,7 +255,7 @@ export class CloudPlugin implements Plugin<CloudSetup> {
|
|||
}
|
||||
|
||||
// Keep this import async so that we do not load any FullStory code into the browser when it is disabled.
|
||||
const { FullStoryShipper } = await import('@elastic/analytics');
|
||||
const { FullStoryShipper } = await import('@kbn/analytics-shippers-fullstory');
|
||||
analytics.registerShipper(FullStoryShipper, {
|
||||
fullStoryOrgId,
|
||||
// Load an Elastic-internally audited script. Ideally, it should be hosted on a CDN.
|
||||
|
|
24
yarn.lock
24
yarn.lock
|
@ -1415,10 +1415,6 @@
|
|||
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"
|
||||
|
@ -2932,6 +2928,14 @@
|
|||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@kbn/analytics-client@link:bazel-bin/packages/analytics/client":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@kbn/analytics-shippers-fullstory@link:bazel-bin/packages/analytics/shippers/fullstory":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@kbn/analytics@link:bazel-bin/packages/kbn-analytics":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
|
@ -5606,10 +5610,6 @@
|
|||
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 ""
|
||||
|
@ -6020,6 +6020,14 @@
|
|||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@types/kbn__analytics-client@link:bazel-bin/packages/analytics/client/npm_module_types":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@types/kbn__analytics-shippers-fullstory@link:bazel-bin/packages/analytics/shippers/fullstory/npm_module_types":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@types/kbn__analytics@link:bazel-bin/packages/kbn-analytics/npm_module_types":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue