Skip to content

Commit bb9ebc2

Browse files
author
Liza Katz
authored
APM execution context - app, page, entitiy id (elastic#124996) (elastic#126751)
* Client side execution app level context propagation * context$ + apm rum integration * invert the context parent \ child relationship (cc @mikhail) move more things to top level context * Pass down context to apm on server * types * eslint * parent <> child * docs + eslint + jest * execution context mock * eslint * jest * jest * server jest * check * jest * storybook * jest * report the current space * fix server side context container * Remove spaces for now * docssss * jest * lint * test * docs * revert file * doc * all context params are optional * clear on page change * lint * ts * skipped test again * testing fixes * oops * code review #1 * code review #2 * getAsLabels * maps inherit dashboard context * docs * ts * Give common context to all vis editors * fix test * ts \ es \ tests * labels * missing types * docsy docs * cr #3 * improve jest * Use editor name * Update src/plugins/visualizations/public/visualize_app/components/visualize_editor.tsx Co-authored-by: Marco Liberati <[email protected]> * fix maps context * jest tests for maps * cr * docs * Update execution_context.test.ts * docs * lint Co-authored-by: Marco Liberati <[email protected]> (cherry picked from commit d5416ed) # Conflicts: # src/plugins/discover/public/application/context/context_app.tsx # x-pack/plugins/lens/public/app_plugin/app.tsx
1 parent 573f60e commit bb9ebc2

File tree

84 files changed

+909
-113
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+909
-113
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [CoreSetup](./kibana-plugin-core-public.coresetup.md) &gt; [executionContext](./kibana-plugin-core-public.coresetup.executioncontext.md)
4+
5+
## CoreSetup.executionContext property
6+
7+
[ExecutionContextSetup](./kibana-plugin-core-public.executioncontextsetup.md)
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
executionContext: ExecutionContextSetup;
13+
```

docs/development/core/public/kibana-plugin-core-public.coresetup.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export interface CoreSetup<TPluginsStart extends object = object, TStart = unkno
1717
| Property | Type | Description |
1818
| --- | --- | --- |
1919
| [application](./kibana-plugin-core-public.coresetup.application.md) | ApplicationSetup | [ApplicationSetup](./kibana-plugin-core-public.applicationsetup.md) |
20+
| [executionContext](./kibana-plugin-core-public.coresetup.executioncontext.md) | ExecutionContextSetup | [ExecutionContextSetup](./kibana-plugin-core-public.executioncontextsetup.md) |
2021
| [fatalErrors](./kibana-plugin-core-public.coresetup.fatalerrors.md) | FatalErrorsSetup | [FatalErrorsSetup](./kibana-plugin-core-public.fatalerrorssetup.md) |
2122
| [getStartServices](./kibana-plugin-core-public.coresetup.getstartservices.md) | StartServicesAccessor&lt;TPluginsStart, TStart&gt; | [StartServicesAccessor](./kibana-plugin-core-public.startservicesaccessor.md) |
2223
| [http](./kibana-plugin-core-public.coresetup.http.md) | HttpSetup | [HttpSetup](./kibana-plugin-core-public.httpsetup.md) |
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [CoreStart](./kibana-plugin-core-public.corestart.md) &gt; [executionContext](./kibana-plugin-core-public.corestart.executioncontext.md)
4+
5+
## CoreStart.executionContext property
6+
7+
[ExecutionContextStart](./kibana-plugin-core-public.executioncontextstart.md)
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
executionContext: ExecutionContextStart;
13+
```

docs/development/core/public/kibana-plugin-core-public.corestart.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export interface CoreStart
2020
| [chrome](./kibana-plugin-core-public.corestart.chrome.md) | ChromeStart | [ChromeStart](./kibana-plugin-core-public.chromestart.md) |
2121
| [deprecations](./kibana-plugin-core-public.corestart.deprecations.md) | DeprecationsServiceStart | [DeprecationsServiceStart](./kibana-plugin-core-public.deprecationsservicestart.md) |
2222
| [docLinks](./kibana-plugin-core-public.corestart.doclinks.md) | DocLinksStart | [DocLinksStart](./kibana-plugin-core-public.doclinksstart.md) |
23+
| [executionContext](./kibana-plugin-core-public.corestart.executioncontext.md) | ExecutionContextStart | [ExecutionContextStart](./kibana-plugin-core-public.executioncontextstart.md) |
2324
| [fatalErrors](./kibana-plugin-core-public.corestart.fatalerrors.md) | FatalErrorsStart | [FatalErrorsStart](./kibana-plugin-core-public.fatalerrorsstart.md) |
2425
| [http](./kibana-plugin-core-public.corestart.http.md) | HttpStart | [HttpStart](./kibana-plugin-core-public.httpstart.md) |
2526
| [i18n](./kibana-plugin-core-public.corestart.i18n.md) | I18nStart | [I18nStart](./kibana-plugin-core-public.i18nstart.md) |
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [ExecutionContextSetup](./kibana-plugin-core-public.executioncontextsetup.md) &gt; [clear](./kibana-plugin-core-public.executioncontextsetup.clear.md)
4+
5+
## ExecutionContextSetup.clear() method
6+
7+
clears the context
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
clear(): void;
13+
```
14+
<b>Returns:</b>
15+
16+
void
17+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [ExecutionContextSetup](./kibana-plugin-core-public.executioncontextsetup.md) &gt; [context$](./kibana-plugin-core-public.executioncontextsetup.context_.md)
4+
5+
## ExecutionContextSetup.context$ property
6+
7+
The current context observable
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
context$: Observable<KibanaExecutionContext>;
13+
```
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [ExecutionContextSetup](./kibana-plugin-core-public.executioncontextsetup.md) &gt; [get](./kibana-plugin-core-public.executioncontextsetup.get.md)
4+
5+
## ExecutionContextSetup.get() method
6+
7+
Get the current top level context
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
get(): KibanaExecutionContext;
13+
```
14+
<b>Returns:</b>
15+
16+
KibanaExecutionContext
17+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [ExecutionContextSetup](./kibana-plugin-core-public.executioncontextsetup.md) &gt; [getAsLabels](./kibana-plugin-core-public.executioncontextsetup.getaslabels.md)
4+
5+
## ExecutionContextSetup.getAsLabels() method
6+
7+
returns apm labels
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
getAsLabels(): Labels;
13+
```
14+
<b>Returns:</b>
15+
16+
Labels
17+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [ExecutionContextSetup](./kibana-plugin-core-public.executioncontextsetup.md)
4+
5+
## ExecutionContextSetup interface
6+
7+
Kibana execution context. Used to provide execution context to Elasticsearch, reporting, performance monitoring, etc.
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
export interface ExecutionContextSetup
13+
```
14+
15+
## Properties
16+
17+
| Property | Type | Description |
18+
| --- | --- | --- |
19+
| [context$](./kibana-plugin-core-public.executioncontextsetup.context_.md) | Observable&lt;KibanaExecutionContext&gt; | The current context observable |
20+
21+
## Methods
22+
23+
| Method | Description |
24+
| --- | --- |
25+
| [clear()](./kibana-plugin-core-public.executioncontextsetup.clear.md) | clears the context |
26+
| [get()](./kibana-plugin-core-public.executioncontextsetup.get.md) | Get the current top level context |
27+
| [getAsLabels()](./kibana-plugin-core-public.executioncontextsetup.getaslabels.md) | returns apm labels |
28+
| [set(c$)](./kibana-plugin-core-public.executioncontextsetup.set.md) | Set the current top level context |
29+
| [withGlobalContext(context)](./kibana-plugin-core-public.executioncontextsetup.withglobalcontext.md) | merges the current top level context with the specific event context |
30+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [ExecutionContextSetup](./kibana-plugin-core-public.executioncontextsetup.md) &gt; [set](./kibana-plugin-core-public.executioncontextsetup.set.md)
4+
5+
## ExecutionContextSetup.set() method
6+
7+
Set the current top level context
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
set(c$: KibanaExecutionContext): void;
13+
```
14+
15+
## Parameters
16+
17+
| Parameter | Type | Description |
18+
| --- | --- | --- |
19+
| c$ | KibanaExecutionContext | |
20+
21+
<b>Returns:</b>
22+
23+
void
24+

0 commit comments

Comments
 (0)