Skip to content

Commit fcb66fd

Browse files
Merge branch 'master' into ftr/remove-retry-usage-in-testSubjects
2 parents ca671f2 + 02a2d07 commit fcb66fd

File tree

64 files changed

+847
-388
lines changed

Some content is hidden

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

64 files changed

+847
-388
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@
164164

165165
# Pulse
166166
/packages/kbn-analytics/ @elastic/pulse
167-
/src/legacy/core_plugins/ui_metric/ @elastic/pulse
168167
/src/plugins/kibana_usage_collection/ @elastic/pulse
169168
/src/plugins/newsfeed/ @elastic/pulse
170169
/src/plugins/telemetry/ @elastic/pulse

src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,13 @@ export class IndexPattern implements IIndexPattern {
299299
}
300300

301301
async popularizeField(fieldName: string, unit = 1) {
302+
/**
303+
* This function is just used by Discover and it's high likely to be removed in the near future
304+
* It doesn't use the save function to skip the error message that's displayed when
305+
* a user adds several columns in a higher frequency that the changes can be persisted to ES
306+
* resulting in 409 errors
307+
*/
308+
if (!this.id) return;
302309
const field = this.fields.getByName(fieldName);
303310
if (!field) {
304311
return;
@@ -308,7 +315,15 @@ export class IndexPattern implements IIndexPattern {
308315
return;
309316
}
310317
field.count = count;
311-
await this.save();
318+
319+
try {
320+
const res = await this.savedObjectsClient.update(type, this.id, this.prepBody(), {
321+
version: this.version,
322+
});
323+
this.version = res._version;
324+
} catch (e) {
325+
// no need for an error message here
326+
}
312327
}
313328

314329
getNonScriptedFields() {

x-pack/plugins/apm/public/application/index.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { UpdateBreadcrumbs } from '../components/app/Main/UpdateBreadcrumbs';
2424
import { APMIndicesPermission } from '../components/app/APMIndicesPermission';
2525
import { ScrollToTopOnPathChange } from '../components/app/Main/ScrollToTopOnPathChange';
2626
import { routes } from '../components/app/Main/route_config';
27-
import { history } from '../utils/history';
27+
import { history, resetHistory } from '../utils/history';
2828
import { ConfigSchema } from '..';
2929
import 'react-vis/dist/style.css';
3030

@@ -111,6 +111,7 @@ export const renderApp = (
111111
{ element }: AppMountParameters,
112112
config: ConfigSchema
113113
) => {
114+
resetHistory();
114115
ReactDOM.render(
115116
<ApmAppRoot
116117
core={core}
@@ -120,5 +121,7 @@ export const renderApp = (
120121
/>,
121122
element
122123
);
123-
return () => ReactDOM.unmountComponentAtNode(element);
124+
return () => {
125+
ReactDOM.unmountComponentAtNode(element);
126+
};
124127
};

x-pack/plugins/apm/public/components/shared/MetadataTable/ErrorMetadata/sections.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,15 @@ import {
1616
AGENT,
1717
URL,
1818
USER,
19-
CUSTOM_ERROR
19+
CUSTOM_ERROR,
20+
TRACE,
21+
TRANSACTION
2022
} from '../sections';
2123

2224
export const ERROR_METADATA_SECTIONS: Section[] = [
2325
{ ...LABELS, required: true },
26+
TRACE,
27+
TRANSACTION,
2428
ERROR,
2529
HTTP,
2630
HOST,

x-pack/plugins/apm/public/components/shared/MetadataTable/SpanMetadata/sections.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ import {
1717

1818
export const SPAN_METADATA_SECTIONS: Section[] = [
1919
LABELS,
20-
SPAN,
21-
TRANSACTION,
2220
TRACE,
21+
TRANSACTION,
22+
SPAN,
2323
SERVICE,
2424
MESSAGE_SPAN,
2525
AGENT

x-pack/plugins/apm/public/components/shared/MetadataTable/TransactionMetadata/sections.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ import {
2020
USER,
2121
USER_AGENT,
2222
CUSTOM_TRANSACTION,
23-
MESSAGE_TRANSACTION
23+
MESSAGE_TRANSACTION,
24+
TRACE
2425
} from '../sections';
2526

2627
export const TRANSACTION_METADATA_SECTIONS: Section[] = [
2728
{ ...LABELS, required: true },
29+
TRACE,
2830
TRANSACTION,
2931
HTTP,
3032
HOST,

x-pack/plugins/apm/public/components/shared/MetadataTable/sections.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ export const TRACE: Section = {
118118
key: 'trace',
119119
label: i18n.translate('xpack.apm.metadataTable.section.traceLabel', {
120120
defaultMessage: 'Trace'
121-
})
121+
}),
122+
properties: ['id']
122123
};
123124

124125
export const ERROR: Section = {

x-pack/plugins/apm/public/utils/history.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ import { createHashHistory } from 'history';
88

99
// Make history singleton available across APM project
1010
// TODO: Explore using React context or hook instead?
11-
const history = createHashHistory();
11+
let history = createHashHistory();
12+
13+
export const resetHistory = () => {
14+
history = createHashHistory();
15+
};
1216

1317
export { history };

x-pack/plugins/apm/server/routes/services.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import * as t from 'io-ts';
88
import Boom from 'boom';
99
import { unique } from 'lodash';
10-
import { ScopedAnnotationsClient } from '../../../observability/server';
1110
import { setupRequest } from '../lib/helpers/setup_request';
1211
import { getServiceAgentName } from '../lib/services/get_service_agent_name';
1312
import { getServices } from '../lib/services/get_services';
@@ -95,13 +94,10 @@ export const serviceAnnotationsRoute = createRoute(() => ({
9594
const { serviceName } = context.params.path;
9695
const { environment } = context.params.query;
9796

98-
let annotationsClient: ScopedAnnotationsClient | undefined;
99-
100-
if (context.plugins.observability) {
101-
annotationsClient = await context.plugins.observability.getScopedAnnotationsClient(
102-
request
103-
);
104-
}
97+
const annotationsClient = await context.plugins.observability?.getScopedAnnotationsClient(
98+
context,
99+
request
100+
);
105101

106102
return getServiceAnnotations({
107103
setup,
@@ -143,6 +139,7 @@ export const serviceAnnotationsCreateRoute = createRoute(() => ({
143139
},
144140
handler: async ({ request, context }) => {
145141
const annotationsClient = await context.plugins.observability?.getScopedAnnotationsClient(
142+
context,
146143
request
147144
);
148145

x-pack/plugins/ingest_manager/common/types/models/epm.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,9 @@ export interface IndexTemplate {
276276
mappings: object;
277277
aliases: object;
278278
};
279+
data_stream: {
280+
timestamp_field: string;
281+
};
279282
}
280283

281284
export interface TemplateRef {

0 commit comments

Comments
 (0)