From 8586270d1307b1185ba745c1b385f7103d2bf081 Mon Sep 17 00:00:00 2001 From: Joseph Crail Date: Thu, 22 Sep 2022 02:29:24 -0700 Subject: [PATCH 01/33] Remove unused or outdated docs (#141342) --- x-pack/plugins/profiling/INTERNALS.md | 97 --------------------------- 1 file changed, 97 deletions(-) delete mode 100644 x-pack/plugins/profiling/INTERNALS.md diff --git a/x-pack/plugins/profiling/INTERNALS.md b/x-pack/plugins/profiling/INTERNALS.md deleted file mode 100644 index 9612a64380efd..0000000000000 --- a/x-pack/plugins/profiling/INTERNALS.md +++ /dev/null @@ -1,97 +0,0 @@ -This plugin is divided into two components: the UI and the server. - -The UI is responsible for rendering the charts and flamegraphs. It will make -API calls to the server component depending on the user interactions with the -UI. You will find most of the source code in the `public` directory. - -The server is responsible for retrieving data from the necessary sources and -sending it in the expected format to the UI in response to the UI's API calls. -You will find most of the source code in the `server` directory. - -## Server API - -Depending on how the plugin is configured, there are two different sets of API -calls. - -If the server uses local fixtures as a data source, then the following API is -served by the server and called by the UI: - -* /api/prodfiler/v1/topn/containers -* /api/prodfiler/v1/topn/deployments -* /api/prodfiler/v1/topn/hosts -* /api/prodfiler/v1/topn/threads -* /api/prodfiler/v1/topn/traces -* /api/prodfiler/v1/flamechart/elastic - -If the server uses an Elasticsearch cluster as a data source, then the following -API is served by the server and called by the UI: - -* /api/prodfiler/v2/topn/containers -* /api/prodfiler/v2/topn/deployments -* /api/prodfiler/v2/topn/hosts -* /api/prodfiler/v2/topn/threads -* /api/prodfiler/v2/topn/traces -* /api/prodfiler/v2/flamechart/elastic - -By default, the plugin is configured to use the second API set. See README.md to -configure the plugin to use the first API set (aka local fixtures as a data -source). - -Both API sets are expected to return the same response format. - -The design to have separate API sets for local vs Elasticsearch was partly -because the UI and server components were originally developed separately and -later merged. However, it also allows the server methods to have a single -responsibility, making it easier to test and verify that the server returns -the expected responses for the given data sources. - -## Server API Responses - -### /api/prodfiler/*/flamechart/elastic - -The response returned from this API is used by the Elastic flamegraph. - -The following example is the expected response: - -```json -{ - leaves: [ - { - id: 'pf-collection-agent: runtime.releaseSudog() in runtime2.go#282', - value: 1, - depth: 19, - pathFromRoot: { - '0': 'root', - '1': 'pf-collection-agent: runtime.goexit() in asm_amd64.s#1581', - '2': 'pf-collection-agent: github.com/optimyze/prodfiler/pf-storage-backend/storagebackend/storagebackendv1.(*ScyllaExecutor).Start.func1 in scyllaexecutor.go#102', - '3': 'pf-collection-agent: github.com/optimyze/prodfiler/pf-storage-backend/storagebackend/storagebackendv1.(*ScyllaExecutor).executeQueryAndReadResults in scyllaexecutor.go#158', - '4': 'pf-collection-agent: github.com/gocql/gocql.(*Query).Iter in session.go#1246', - '5': 'pf-collection-agent: github.com/gocql/gocql.(*Session).executeQuery in session.go#463', - '6': 'pf-collection-agent: github.com/gocql/gocql.(*queryExecutor).executeQuery in query_executor.go#66', - '7': 'pf-collection-agent: github.com/gocql/gocql.(*queryExecutor).do in query_executor.go#127', - '8': 'pf-collection-agent: github.com/gocql/gocql.(*queryExecutor).attemptQuery in query_executor.go#32', - '9': 'pf-collection-agent: github.com/gocql/gocql.(*Query).execute in session.go#1044', - '10': 'pf-collection-agent: github.com/gocql/gocql.(*Conn).executeQuery in conn.go#1129', - '11': 'pf-collection-agent: github.com/gocql/gocql.(*Conn).exec in conn.go#916', - '12': 'pf-collection-agent: github.com/gocql/gocql.(*writeExecuteFrame).writeFrame in frame.go#1618', - '13': 'pf-collection-agent: github.com/gocql/gocql.(*framer).writeExecuteFrame in frame.go#1643', - '14': 'pf-collection-agent: github.com/gocql/gocql.(*framer).finishWrite in frame.go#788', - '15': 'pf-collection-agent: github.com/gocql/gocql.(*Conn).Write in conn.go#319', - '16': 'pf-collection-agent: github.com/gocql/gocql.(*writeCoalescer).Write in conn.go#829', - '17': 'pf-collection-agent: sync.(*Cond).Wait in cond.go#83', - '18': 'pf-collection-agent: sync.runtime_notifyListWait() in sema.go#498', - '19': 'pf-collection-agent: runtime.releaseSudog() in runtime2.go#282', - }, - }, - ... - ] -} -``` - -Here is a basic description of the response format: - -* Each object in the `leaves` list represents a leaf node in the flamegraph -* `id` represents the name of the flamegraph node -* `value` represents the number of samples for that node -* `depth` represents the depth of the node in the flamegraph, starting from zero -* `pathFromRoot` represents the full path from the flamegraph root to the given node From cea17e3dbe29931da6f665aa4c5a15c360c9692b Mon Sep 17 00:00:00 2001 From: Joseph Crail Date: Thu, 22 Sep 2022 02:44:10 -0700 Subject: [PATCH 02/33] Replace log execution latency (#141341) --- .../routes/get_executables_and_stacktraces.ts | 17 +-- .../profiling/server/routes/stacktrace.ts | 137 +++++++++--------- 2 files changed, 76 insertions(+), 78 deletions(-) diff --git a/x-pack/plugins/profiling/server/routes/get_executables_and_stacktraces.ts b/x-pack/plugins/profiling/server/routes/get_executables_and_stacktraces.ts index 9e5773ad9aa91..6ef023f07a478 100644 --- a/x-pack/plugins/profiling/server/routes/get_executables_and_stacktraces.ts +++ b/x-pack/plugins/profiling/server/routes/get_executables_and_stacktraces.ts @@ -10,7 +10,6 @@ import { INDEX_EVENTS } from '../../common'; import { ProfilingESClient } from '../utils/create_profiling_es_client'; import { withProfilingSpan } from '../utils/with_profiling_span'; import { downsampleEventsRandomly, findDownsampledIndex } from './downsampling'; -import { logExecutionLatency } from './logger'; import { ProjectTimeQuery } from './query'; import { mgetExecutables, @@ -51,14 +50,14 @@ export async function getExecutablesAndStackTraces({ if (totalCount > sampleSize * 1.1) { p = sampleSize / totalCount; logger.info('downsampling events with p=' + p); - await logExecutionLatency(logger, 'downsampling events', async () => { - const downsampledTotalCount = downsampleEventsRandomly( - stackTraceEvents, - p, - filter.toString() - ); - logger.info('downsampled total count: ' + downsampledTotalCount); - }); + const t0 = new Date().getTime(); + const downsampledTotalCount = downsampleEventsRandomly( + stackTraceEvents, + p, + filter.toString() + ); + logger.info(`downsampling events took ${new Date().getTime() - t0} ms`); + logger.info('downsampled total count: ' + downsampledTotalCount); logger.info('unique downsampled stacktraces: ' + stackTraceEvents.size); } diff --git a/x-pack/plugins/profiling/server/routes/stacktrace.ts b/x-pack/plugins/profiling/server/routes/stacktrace.ts index ecf51313695fa..b98bcfc196318 100644 --- a/x-pack/plugins/profiling/server/routes/stacktrace.ts +++ b/x-pack/plugins/profiling/server/routes/stacktrace.ts @@ -28,7 +28,6 @@ import { import { ProfilingESClient } from '../utils/create_profiling_es_client'; import { withProfilingSpan } from '../utils/with_profiling_span'; import { DownsampledEventsIndex } from './downsampling'; -import { logExecutionLatency } from './logger'; import { ProjectTimeQuery } from './query'; const traceLRU = new LRUCache({ max: 20000 }); @@ -270,36 +269,36 @@ export async function mgetStackTraces({ const stackFrameDocIDs = new Set(); const executableDocIDs = new Set(); - await logExecutionLatency(logger, 'processing data', async () => { - // flatMap() is significantly slower than an explicit for loop - for (const res of stackResponses) { - for (const trace of res.docs) { - if ('error' in trace) { - continue; + const t0 = new Date().getTime(); + // flatMap() is significantly slower than an explicit for loop + for (const res of stackResponses) { + for (const trace of res.docs) { + if ('error' in trace) { + continue; + } + // Sometimes we don't find the trace. + // This is due to ES delays writing (data is not immediately seen after write). + // Also, ES doesn't know about transactions. + if (trace.found) { + const traceid = trace._id as StackTraceID; + let stackTrace = traceLRU.get(traceid) as StackTrace; + if (!stackTrace) { + stackTrace = decodeStackTrace(trace._source as EncodedStackTrace); + traceLRU.set(traceid, stackTrace); + } + + totalFrames += stackTrace.FrameIDs.length; + stackTraces.set(traceid, stackTrace); + for (const frameID of stackTrace.FrameIDs) { + stackFrameDocIDs.add(frameID); } - // Sometimes we don't find the trace. - // This is due to ES delays writing (data is not immediately seen after write). - // Also, ES doesn't know about transactions. - if (trace.found) { - const traceid = trace._id as StackTraceID; - let stackTrace = traceLRU.get(traceid) as StackTrace; - if (!stackTrace) { - stackTrace = decodeStackTrace(trace._source as EncodedStackTrace); - traceLRU.set(traceid, stackTrace); - } - - totalFrames += stackTrace.FrameIDs.length; - stackTraces.set(traceid, stackTrace); - for (const frameID of stackTrace.FrameIDs) { - stackFrameDocIDs.add(frameID); - } - for (const fileID of stackTrace.FileIDs) { - executableDocIDs.add(fileID); - } + for (const fileID of stackTrace.FileIDs) { + executableDocIDs.add(fileID); } } } - }); + } + logger.info(`processing data took ${new Date().getTime() - t0} ms`); if (stackTraces.size !== 0) { logger.info('Average size of stacktrace: ' + totalFrames / stackTraces.size); @@ -337,32 +336,32 @@ export async function mgetStackFrames({ // Create a lookup map StackFrameID -> StackFrame. let framesFound = 0; - await logExecutionLatency(logger, 'processing data', async () => { - const docs = resStackFrames.docs; - for (const frame of docs) { - if ('error' in frame) { - continue; - } - if (frame.found) { - stackFrames.set(frame._id, { - FileName: frame._source!.Stackframe.file?.name, - FunctionName: frame._source!.Stackframe.function?.name, - FunctionOffset: frame._source!.Stackframe.function?.offset, - LineNumber: frame._source!.Stackframe.line?.number, - SourceType: frame._source!.Stackframe.source?.type, - }); - framesFound++; - } else { - stackFrames.set(frame._id, { - FileName: '', - FunctionName: '', - FunctionOffset: 0, - LineNumber: 0, - SourceType: 0, - }); - } + const t0 = new Date().getTime(); + const docs = resStackFrames.docs; + for (const frame of docs) { + if ('error' in frame) { + continue; } - }); + if (frame.found) { + stackFrames.set(frame._id, { + FileName: frame._source!.Stackframe.file?.name, + FunctionName: frame._source!.Stackframe.function?.name, + FunctionOffset: frame._source!.Stackframe.function?.offset, + LineNumber: frame._source!.Stackframe.line?.number, + SourceType: frame._source!.Stackframe.source?.type, + }); + framesFound++; + } else { + stackFrames.set(frame._id, { + FileName: '', + FunctionName: '', + FunctionOffset: 0, + LineNumber: 0, + SourceType: 0, + }); + } + } + logger.info(`processing data took ${new Date().getTime() - t0} ms`); logger.info('found ' + framesFound + ' / ' + stackFrameIDs.size + ' frames'); @@ -392,24 +391,24 @@ export async function mgetExecutables({ // Create a lookup map StackFrameID -> StackFrame. let exeFound = 0; - await logExecutionLatency(logger, 'processing data', async () => { - const docs = resExecutables.docs; - for (const exe of docs) { - if ('error' in exe) { - continue; - } - if (exe.found) { - executables.set(exe._id, { - FileName: exe._source!.Executable.file.name, - }); - exeFound++; - } else { - executables.set(exe._id, { - FileName: '', - }); - } + const t0 = new Date().getTime(); + const docs = resExecutables.docs; + for (const exe of docs) { + if ('error' in exe) { + continue; } - }); + if (exe.found) { + executables.set(exe._id, { + FileName: exe._source!.Executable.file.name, + }); + exeFound++; + } else { + executables.set(exe._id, { + FileName: '', + }); + } + } + logger.info(`processing data took ${new Date().getTime() - t0} ms`); logger.info('found ' + exeFound + ' / ' + executableIDs.size + ' executables'); From 03b360a6b8db3a4129289a4249132363cd30b25c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Thu, 22 Sep 2022 11:45:20 +0200 Subject: [PATCH 03/33] [Profiling] Aggregate ELF frames by exeFilename, not fileID (#141139) * [Profiling] Aggregate ELF frames by exeFilename, not fileID * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../plugins/profiling/common/frame_group.test.ts | 7 ++++--- x-pack/plugins/profiling/common/frame_group.ts | 14 ++++++++++---- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/x-pack/plugins/profiling/common/frame_group.test.ts b/x-pack/plugins/profiling/common/frame_group.test.ts index 57ed29001ccdf..2cdc4fd6f466e 100644 --- a/x-pack/plugins/profiling/common/frame_group.test.ts +++ b/x-pack/plugins/profiling/common/frame_group.test.ts @@ -33,18 +33,21 @@ const elfSymbolizedFrameGroups = [ createFrameGroup( createStackFrameMetadata({ FileID: '0x0123456789ABCDEF', + ExeFileName: 'libc', FunctionName: 'strlen()', }) ), createFrameGroup( createStackFrameMetadata({ FileID: '0xFEDCBA9876543210', + ExeFileName: 'libc', FunctionName: 'strtok()', }) ), createFrameGroup( createStackFrameMetadata({ FileID: '0xFEDCBA9876543210', + ExeFileName: 'myapp', FunctionName: 'main()', }) ), @@ -165,9 +168,7 @@ describe('Frame group operations', () => { }); test('non-symbolized ELF frame', () => { - expect(createFrameGroupID(elfSymbolizedFrameGroups[0])).toEqual( - 'elf;0x0123456789ABCDEF;strlen()' - ); + expect(createFrameGroupID(elfSymbolizedFrameGroups[0])).toEqual('elf;libc;strlen()'); }); test('symbolized frame', () => { diff --git a/x-pack/plugins/profiling/common/frame_group.ts b/x-pack/plugins/profiling/common/frame_group.ts index 776eccaa2e79c..985bf2c1f0cee 100644 --- a/x-pack/plugins/profiling/common/frame_group.ts +++ b/x-pack/plugins/profiling/common/frame_group.ts @@ -28,6 +28,7 @@ interface EmptyFrameGroup extends BaseFrameGroup { interface ElfFrameGroup extends BaseFrameGroup { readonly name: FrameGroupName.ELF; readonly fileID: StackFrameMetadata['FileID']; + readonly exeFilename: StackFrameMetadata['ExeFileName']; readonly functionName: StackFrameMetadata['FunctionName']; } @@ -43,7 +44,7 @@ export type FrameGroup = EmptyFrameGroup | ElfFrameGroup | FullFrameGroup; // createFrameGroup is the "standard" way of grouping frames, by commonly // shared group identifiers. // -// For ELF-symbolized frames, group by FunctionName and FileID. +// For ELF-symbolized frames, group by FunctionName, ExeFileName and FileID. // For non-symbolized frames, group by FileID and AddressOrLine. // otherwise group by ExeFileName, SourceFilename and FunctionName. export function createFrameGroup(frame: StackFrameMetadata): FrameGroup { @@ -59,6 +60,7 @@ export function createFrameGroup(frame: StackFrameMetadata): FrameGroup { return { name: FrameGroupName.ELF, fileID: frame.FileID, + exeFilename: frame.ExeFileName, functionName: frame.FunctionName, } as ElfFrameGroup; } @@ -123,12 +125,14 @@ export function compareFrameGroup(a: FrameGroup, b: FrameGroup): number { if (b.name === FrameGroupName.ELF) { if (a.functionName < b.functionName) return -1; if (a.functionName > b.functionName) return 1; - if (a.fileID < b.fileID) return -1; - if (a.fileID > b.fileID) return 1; + if (a.exeFilename < b.exeFilename) return -1; + if (a.exeFilename > b.exeFilename) return 1; return 0; } if (a.functionName < b.functionName) return -1; if (a.functionName > b.functionName) return 1; + if (a.exeFilename < b.exeFilename) return -1; + if (a.exeFilename > b.exeFilename) return 1; return -1; } @@ -144,6 +148,8 @@ export function compareFrameGroup(a: FrameGroup, b: FrameGroup): number { if (b.name === FrameGroupName.ELF) { if (a.functionName < b.functionName) return -1; if (a.functionName > b.functionName) return 1; + if (a.exeFilename < b.exeFilename) return -1; + if (a.exeFilename > b.exeFilename) return 1; } return 1; } @@ -154,7 +160,7 @@ export function createFrameGroupID(frameGroup: FrameGroup): FrameGroupID { return `${frameGroup.name};${frameGroup.fileID};${frameGroup.addressOrLine}`; break; case FrameGroupName.ELF: - return `${frameGroup.name};${frameGroup.fileID};${frameGroup.functionName}`; + return `${frameGroup.name};${frameGroup.exeFilename};${frameGroup.functionName}`; break; case FrameGroupName.FULL: return `${frameGroup.name};${frameGroup.exeFilename};${frameGroup.functionName};${frameGroup.sourceFilename}`; From ed1f06a35d1449df8e02c1832d11d2ce99400a44 Mon Sep 17 00:00:00 2001 From: Boris Kirov Date: Thu, 22 Sep 2022 12:24:16 +0200 Subject: [PATCH 04/33] [APM] Beta badge and translations (#141105) * beta/beaker badges and feedback links * translation fixes and badge update * translations and an icon for beta badge * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' * translation title comments and rename the feedback link * using the BetaBadge and added a tech preview to Trace explorer * fix i18n * delete file added by mistake Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Miriam <31922082+MiriamAparicio@users.noreply.github.com> Co-authored-by: miriam.aparicio --- .../components/app/trace_overview/index.tsx | 4 +- .../templates/apm_service_template/index.tsx | 4 +- .../shared/apm_header_action_menu/index.tsx | 37 +++++++++------ .../labs/labs_flyout.tsx | 13 ++++- .../public/components/shared/beta_badge.tsx | 3 ++ .../observability/server/ui_settings.ts | 47 +++++++++++++++---- .../translations/translations/fr-FR.json | 4 -- .../translations/translations/ja-JP.json | 4 -- .../translations/translations/zh-CN.json | 4 -- 9 files changed, 81 insertions(+), 39 deletions(-) diff --git a/x-pack/plugins/apm/public/components/app/trace_overview/index.tsx b/x-pack/plugins/apm/public/components/app/trace_overview/index.tsx index c586b782fc6e2..1093a74f6bc2f 100644 --- a/x-pack/plugins/apm/public/components/app/trace_overview/index.tsx +++ b/x-pack/plugins/apm/public/components/app/trace_overview/index.tsx @@ -13,6 +13,7 @@ import { useApmRoutePath } from '../../../hooks/use_apm_route_path'; import { TraceSearchType } from '../../../../common/trace_explorer'; import { TransactionTab } from '../transaction_details/waterfall_with_summary/transaction_tabs'; import { useTraceExplorerEnabledSetting } from '../../../hooks/use_trace_explorer_enabled_setting'; +import { TechnicalPreviewBadge } from '../../shared/technical_preview_badge'; export function TraceOverview({ children }: { children: React.ReactElement }) { const isTraceExplorerEnabled = useTraceExplorerEnabledSetting(); @@ -62,7 +63,7 @@ export function TraceOverview({ children }: { children: React.ReactElement }) { return ( - + {i18n.translate('xpack.apm.traceOverview.topTracesTab', { defaultMessage: 'Top traces', @@ -70,6 +71,7 @@ export function TraceOverview({ children }: { children: React.ReactElement }) { } isSelected={routePath === '/traces/explorer'} > {i18n.translate('xpack.apm.traceOverview.traceExplorerTab', { diff --git a/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.tsx b/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.tsx index 3f84a4bdb1347..0a0b17a4e273b 100644 --- a/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.tsx +++ b/x-pack/plugins/apm/public/components/routing/templates/apm_service_template/index.tsx @@ -31,9 +31,9 @@ import { useApmParams } from '../../../../hooks/use_apm_params'; import { useApmRouter } from '../../../../hooks/use_apm_router'; import { useTimeRange } from '../../../../hooks/use_time_range'; import { getAlertingCapabilities } from '../../../alerting/get_alerting_capabilities'; -import { BetaBadge } from '../../../shared/beta_badge'; import { SearchBar } from '../../../shared/search_bar'; import { ServiceIcons } from '../../../shared/service_icons'; +import { BetaBadge } from '../../../shared/beta_badge'; import { TechnicalPreviewBadge } from '../../../shared/technical_preview_badge'; import { ApmMainTemplate } from '../apm_main_template'; import { AnalyzeDataButton } from './analyze_data_button'; @@ -293,7 +293,7 @@ function useTabs({ selectedTab }: { selectedTab: Tab['key'] }) { path: { serviceName }, query, }), - append: , + append: , label: i18n.translate('xpack.apm.home.infraTabLabel', { defaultMessage: 'Infrastructure', }), diff --git a/x-pack/plugins/apm/public/components/shared/apm_header_action_menu/index.tsx b/x-pack/plugins/apm/public/components/shared/apm_header_action_menu/index.tsx index 77bdf01aea6e6..7a27a68ccd558 100644 --- a/x-pack/plugins/apm/public/components/shared/apm_header_action_menu/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/apm_header_action_menu/index.tsx @@ -5,7 +5,12 @@ * 2.0. */ -import { EuiHeaderLink, EuiHeaderLinks } from '@elastic/eui'; +import { + EuiFlexGroup, + EuiFlexItem, + EuiHeaderLink, + EuiHeaderLinks, +} from '@elastic/eui'; import { apmLabsButton } from '@kbn/observability-plugin/common'; import { i18n } from '@kbn/i18n'; import React from 'react'; @@ -53,21 +58,15 @@ export function ApmHeaderActionMenu() { - {i18n.translate('xpack.apm.storageExplorerLinkLabel', { - defaultMessage: 'Storage Explorer', - })} - - - {i18n.translate('xpack.apm.settingsLinkLabel', { - defaultMessage: 'Settings', - })} + + + {i18n.translate('xpack.apm.storageExplorerLinkLabel', { + defaultMessage: 'Storage Explorer', + })} + + {canAccessML && } {isAlertingAvailable && ( @@ -89,6 +88,16 @@ export function ApmHeaderActionMenu() { defaultMessage: 'Add data', })} + + + {i18n.translate('xpack.apm.settingsLinkLabel', { + defaultMessage: 'Settings', + })} + ); diff --git a/x-pack/plugins/apm/public/components/shared/apm_header_action_menu/labs/labs_flyout.tsx b/x-pack/plugins/apm/public/components/shared/apm_header_action_menu/labs/labs_flyout.tsx index 408070ab88900..160cf23cc7714 100644 --- a/x-pack/plugins/apm/public/components/shared/apm_header_action_menu/labs/labs_flyout.tsx +++ b/x-pack/plugins/apm/public/components/shared/apm_header_action_menu/labs/labs_flyout.tsx @@ -17,6 +17,8 @@ import { EuiHorizontalRule, EuiIcon, EuiLoadingContent, + EuiSpacer, + EuiText, EuiTitle, } from '@elastic/eui'; import { LazyField } from '@kbn/advanced-settings-plugin/public'; @@ -83,9 +85,9 @@ export function LabsFlyout({ onClose }: Props) { return ( - + - + @@ -97,6 +99,13 @@ export function LabsFlyout({ onClose }: Props) { + + + {i18n.translate('xpack.apm.labs.description', { + defaultMessage: + 'Try out the APM features that are under technical preview and in progress.', + })} + {isLoading ? ( diff --git a/x-pack/plugins/apm/public/components/shared/beta_badge.tsx b/x-pack/plugins/apm/public/components/shared/beta_badge.tsx index 0ec90f9d34467..c6b3c72575fce 100644 --- a/x-pack/plugins/apm/public/components/shared/beta_badge.tsx +++ b/x-pack/plugins/apm/public/components/shared/beta_badge.tsx @@ -19,6 +19,9 @@ export function BetaBadge({ icon }: Props) { label={i18n.translate('xpack.apm.betaBadgeLabel', { defaultMessage: 'Beta', })} + title={i18n.translate('xpack.apm.betaBadgeLabel', { + defaultMessage: 'Beta', + })} tooltipContent={i18n.translate('xpack.apm.betaBadgeDescription', { defaultMessage: 'This feature is currently in beta. If you encounter any bugs or have feedback, please open an issue or visit our discussion forum.', diff --git a/x-pack/plugins/observability/server/ui_settings.ts b/x-pack/plugins/observability/server/ui_settings.ts index 2d79e3b0e5e0a..13e47c6628399 100644 --- a/x-pack/plugins/observability/server/ui_settings.ts +++ b/x-pack/plugins/observability/server/ui_settings.ts @@ -162,8 +162,15 @@ export const uiSettings: Record = { }), value: false, description: i18n.translate('xpack.observability.enableServiceGroupsDescription', { - defaultMessage: '{technicalPreviewLabel} Enable the Service groups feature on APM UI', - values: { technicalPreviewLabel: `[${technicalPreviewLabel}]` }, + defaultMessage: 'Enable the Service groups feature on APM UI. {feedbackLink}.', + values: { + feedbackLink: + '' + + i18n.translate('xpack.observability.enableServiceGroups.feedbackLinkText', { + defaultMessage: 'Give feedback', + }) + + '', + }, }), schema: schema.boolean(), requiresPageReload: true, @@ -193,8 +200,18 @@ export const uiSettings: Record = { 'xpack.observability.apmServiceInventoryOptimizedSortingDescription', { defaultMessage: - '{technicalPreviewLabel} Default APM Service Inventory page sort (for Services without Machine Learning applied) to sort by Service Name', - values: { technicalPreviewLabel: `[${technicalPreviewLabel}]` }, + 'Default APM Service Inventory page sort (for Services without Machine Learning applied) to sort by Service Name. {feedbackLink}.', + values: { + feedbackLink: + '' + + i18n.translate( + 'xpack.observability.apmServiceInventoryOptimizedSorting.feedbackLinkText', + { + defaultMessage: 'Give feedback', + } + ) + + '', + }, } ), schema: schema.boolean(), @@ -221,8 +238,15 @@ export const uiSettings: Record = { }), description: i18n.translate('xpack.observability.apmTraceExplorerTabDescription', { defaultMessage: - '{technicalPreviewLabel} Enable the APM Trace Explorer feature, that allows you to search and inspect traces with KQL or EQL', - values: { technicalPreviewLabel: `[${technicalPreviewLabel}]` }, + 'Enable the APM Trace Explorer feature, that allows you to search and inspect traces with KQL or EQL. {feedbackLink}.', + values: { + feedbackLink: + '' + + i18n.translate('xpack.observability.apmTraceExplorerTabDescription.feedbackLinkText', { + defaultMessage: 'Give feedback', + }) + + '', + }, }), schema: schema.boolean(), value: false, @@ -237,8 +261,15 @@ export const uiSettings: Record = { }), description: i18n.translate('xpack.observability.apmOperationsBreakdownDescription', { defaultMessage: - '{technicalPreviewLabel} Enable the APM Operations Breakdown feature, that displays aggregates for backend operations', - values: { technicalPreviewLabel: `[${technicalPreviewLabel}]` }, + 'Enable the APM Operations Breakdown feature, that displays aggregates for backend operations. {feedbackLink}.', + values: { + feedbackLink: + '' + + i18n.translate('xpack.observability.apmOperationsBreakdownDescription.feedbackLinkText', { + defaultMessage: 'Give feedback', + }) + + '', + }, }), schema: schema.boolean(), value: false, diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 70333f960f0ff..19dc46cd83a85 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -23022,11 +23022,7 @@ "xpack.monitoring.updateLicenseTitle": "Mettre à jour votre licence", "xpack.monitoring.useAvailableLicenseDescription": "Si vous avez déjà une nouvelle licence, chargez-la maintenant.", "xpack.observability.alertsTable.showingAlertsTitle": "{totalAlerts, plural, =1 {alerte} other {alertes}}", - "xpack.observability.apmOperationsBreakdownDescription": "{technicalPreviewLabel} Active la fonctionnalité APM Operations Breakdown, qui affiche les agrégats pour les opérations backend", "xpack.observability.apmProgressiveLoadingDescription": "{technicalPreviewLabel} S'il faut charger les données de façon progressive pour les vues APM. Les données peuvent être demandées d'abord avec un taux d'échantillonnage inférieur, avec une précision plus faible mais des temps de réponse plus rapides, pendant que les données non échantillonnées se chargent en arrière-plan", - "xpack.observability.apmServiceInventoryOptimizedSortingDescription": "{technicalPreviewLabel} Tri par défaut de la page d'inventaire des services APM (pour les services hors Machine Learning) en fonction du nom de service", - "xpack.observability.apmTraceExplorerTabDescription": "{technicalPreviewLabel} Activer la fonctionnalité Explorateur de traces APM qui vous permet de rechercher et d'inspecter les traces avec KQL ou EQL", - "xpack.observability.enableServiceGroupsDescription": "{technicalPreviewLabel} Activer la fonctionnalité de groupes de services sur l’interface utilisateur APM", "xpack.observability.expView.columns.label": "{percentileValue} centile de {sourceField}", "xpack.observability.expView.columns.operation.label": "{operationType} de {sourceField}", "xpack.observability.expView.filterValueButton.negate": "Pas {value}", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 066d96ec83797..c82ae2e5e6bc0 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -23001,11 +23001,7 @@ "xpack.monitoring.updateLicenseTitle": "ライセンスの更新", "xpack.monitoring.useAvailableLicenseDescription": "すでに新しいライセンスがある場合は、今すぐアップロードしてください。", "xpack.observability.alertsTable.showingAlertsTitle": "{totalAlerts, plural, other {アラート}}", - "xpack.observability.apmOperationsBreakdownDescription": "{technicalPreviewLabel} バックエンド処理のアグリゲーションを表示する、APM Operations Breakdown機能を有効にします", "xpack.observability.apmProgressiveLoadingDescription": "{technicalPreviewLabel} APMビューでデータのプログレッシブ読み込みを行うかどうか。サンプリングされていないデータをバックグラウンドで読み込みながら、最初は低いサンプリングレート、低い精度、高速の応答時間でデータを要求できます", - "xpack.observability.apmServiceInventoryOptimizedSortingDescription": "{technicalPreviewLabel} サービス名によるデフォルトAPMサービスインベントリページの並べ替え(機械学習が適用されていないサービス)", - "xpack.observability.apmTraceExplorerTabDescription": "{technicalPreviewLabel} APMトレースエクスプローラー機能を有効にし、KQLまたはEQLでトレースを検索、検査できます", - "xpack.observability.enableServiceGroupsDescription": "{technicalPreviewLabel} APM UIでサービスグループ機能を有効にする", "xpack.observability.expView.columns.label": "{sourceField}の{percentileValue}パーセンタイル", "xpack.observability.expView.columns.operation.label": "{sourceField}の{operationType}", "xpack.observability.expView.filterValueButton.negate": "{value}ではない", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index d44b85a0ff1a3..a9c5f2be47229 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -23030,11 +23030,7 @@ "xpack.monitoring.updateLicenseTitle": "更新您的许可证", "xpack.monitoring.useAvailableLicenseDescription": "如果您已经持有新的许可证,请立即上传。", "xpack.observability.alertsTable.showingAlertsTitle": "{totalAlerts, plural, other {告警}}", - "xpack.observability.apmOperationsBreakdownDescription": "{technicalPreviewLabel} 启用 APM Operations Breakdown 功能,它将显示后端操作的聚合", "xpack.observability.apmProgressiveLoadingDescription": "{technicalPreviewLabel} 是否以渐进方式为 APM 视图加载数据。可以先以较低的采样速率请求数据,这样的准确性较低,但响应时间更快,同时在后台加载未采样数据", - "xpack.observability.apmServiceInventoryOptimizedSortingDescription": "{technicalPreviewLabel} 默认 APM 服务库存页面排序(对于未应用 Machine Learning 的服务)将按服务名称排序", - "xpack.observability.apmTraceExplorerTabDescription": "{technicalPreviewLabel} 启用 APM Trace Explorer 功能,它允许您通过 KQL 或 EQL 搜索和检查跟踪", - "xpack.observability.enableServiceGroupsDescription": "{technicalPreviewLabel} 在 APM UI 上启用服务组功能", "xpack.observability.expView.columns.label": "{sourceField} 的第 {percentileValue} 百分位", "xpack.observability.expView.columns.operation.label": "{sourceField} 的 {operationType}", "xpack.observability.expView.filterValueButton.negate": "不是 {value}", From aae100f7098d522a4a2f4ec869b8099012e6c24d Mon Sep 17 00:00:00 2001 From: Jean-Louis Leysens Date: Thu, 22 Sep 2022 12:31:18 +0200 Subject: [PATCH 05/33] added track adoption annotations (#140690) --- x-pack/plugins/files/public/plugin.ts | 2 ++ x-pack/plugins/files/server/types.ts | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/x-pack/plugins/files/public/plugin.ts b/x-pack/plugins/files/public/plugin.ts index 688ce0ecbb6a5..8ebbd71cdbe1f 100644 --- a/x-pack/plugins/files/public/plugin.ts +++ b/x-pack/plugins/files/public/plugin.ts @@ -22,6 +22,8 @@ export interface FilesSetup { /** * A factory for creating an {@link FilesClient} instance. This requires a * registered {@link FileKind}. + * + * @track-adoption */ filesClientFactory: FilesClientFactory; diff --git a/x-pack/plugins/files/server/types.ts b/x-pack/plugins/files/server/types.ts index 901de230bcc34..85fc6a0f60ed6 100644 --- a/x-pack/plugins/files/server/types.ts +++ b/x-pack/plugins/files/server/types.ts @@ -18,6 +18,8 @@ export interface FilesSetup { * that will be uploaded. * * @param {FileKind} fileKind - the file kind to register + * + * @track-adoption */ registerFileKind(fileKind: FileKind): void; } @@ -33,6 +35,8 @@ export interface FilesPluginSetupDependencies { export interface FilesStart { /** * Create an instance of {@link FileServiceStart}. + * + * @track-adoption */ fileServiceFactory: FileServiceFactory; } From 797b351b1a6c1eed644b5fd6f1ecc0103fd103d3 Mon Sep 17 00:00:00 2001 From: Julia Rechkunova Date: Thu, 22 Sep 2022 13:03:38 +0200 Subject: [PATCH 06/33] [Graph] Fix drilldown url templates for sample data (#141079) * [Graph] Fix drilldown url templates for sample data * [Graph] Add tests * Revert "[Graph] Add tests" This reverts commit 08d5c7d86456cb210ed259b3844f261070dce867. * Revert "[Graph] Fix drilldown url templates for sample data" This reverts commit 0fc575ef0936ee8e9972661cf39b3702209b9b1b. * [Graph] Fix issue with opening sample graph ws in any Kibana spaces * [Graph] Add tests Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../components/control_panel/drill_downs.tsx | 4 ++- .../state_management/url_templates.test.ts | 25 +++++++++++++++++-- .../public/state_management/url_templates.ts | 14 ++++++++++- 3 files changed, 39 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/graph/public/components/control_panel/drill_downs.tsx b/x-pack/plugins/graph/public/components/control_panel/drill_downs.tsx index 9d0dfdc7ba705..34ba157d16e88 100644 --- a/x-pack/plugins/graph/public/components/control_panel/drill_downs.tsx +++ b/x-pack/plugins/graph/public/components/control_panel/drill_downs.tsx @@ -40,7 +40,9 @@ export const DrillDowns = ({ urlTemplates, openUrlTemplate }: DrillDownsProps) = return (
  • {urlTemplate.icon && ( - {urlTemplate.icon?.code} + <> + {urlTemplate.icon?.code}{' '} + )}