Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
42be2cd
Add onNodeClick prop to ApmTraceWaterfallEmbeddable for enhanced inte…
iblancof May 21, 2025
faa07d7
Add SPAN_ID_FIELD to useRootTransaction hook
iblancof May 21, 2025
03353ef
Create useSpan hook
iblancof May 22, 2025
67dd7cb
Add showWaterfall to TransactionOverview
iblancof May 22, 2025
36bfe84
Add RootTransactionProvider and showWaterfall to SpanOverview
iblancof May 22, 2025
6ec5a9b
Use showWaterfall in Trace
iblancof May 22, 2025
634734f
Change SpanOverview and TransactionOverview props to omit dataView
iblancof May 22, 2025
740d507
Add showActions prop to FieldWithActions, SpanSummaryField, and Trans…
iblancof May 22, 2025
4c08b7e
Add showActions prop to SpanOverview and TransactionOverview components
iblancof May 22, 2025
db85098
Merge branch 'main' into 217068-discoverapm-poc-to-expand-trace-water…
iblancof May 23, 2025
12761b7
Create base SpanFlyout
iblancof May 26, 2025
123cfb4
Create base FullScreenWaterfall
iblancof May 26, 2025
4dafcf1
Add FullScreenWaterfall to Trace
iblancof May 26, 2025
c79ce6b
Merge branch 'main' into 217068-discoverapm-poc-to-expand-trace-water…
iblancof May 26, 2025
4e32b0a
Add dataView prop to Trace, SpanOverview, and TransactionOverview com…
iblancof May 27, 2025
71e107d
Update useSpan to include docId
iblancof May 27, 2025
6e587da
Add dataView prop to FullScreenWaterfall component
iblancof May 27, 2025
f43966e
Add tracesIndexPattern prop to FullScreenWaterfall, Trace, and Transa…
iblancof May 27, 2025
024c3d7
Add tabs to SpanFlyout
iblancof May 27, 2025
63e5171
Rename transactionIndexPattern to tracesIndexPattern in Doc Viewer co…
iblancof May 27, 2025
a5ecb78
Fix prop name in SpanOverview component to use tracesIndexPattern
iblancof May 27, 2025
8fdab6d
Add showActions prop to SpanSummaryTitle component for conditional re…
iblancof May 28, 2025
25c47a1
Removed unused container in SpanSummaryTitle
iblancof May 28, 2025
fa4e0d3
Add showActions prop to TransactionSummaryTitle component for conditi…
iblancof May 28, 2025
c4e4eb5
Merge branch 'main' into 217068-discoverapm-poc-to-expand-trace-water…
iblancof May 28, 2025
024baaf
Add showActions prop to Trace component for conditional rendering
iblancof May 28, 2025
2f83732
Add aria-label to EuiIconTip for improved accessibility
iblancof May 28, 2025
4225827
Add metadata short description in FieldWithActions
iblancof May 29, 2025
1256f2d
Merge branch 'main' into 217068-discoverapm-poc-to-expand-trace-water…
iblancof May 29, 2025
8e5b983
Add short description for span.destination.service.resource field
iblancof May 29, 2025
882a26b
Merge branch 'main' into 217068-discoverapm-poc-to-expand-trace-water…
iblancof May 29, 2025
a925ed6
Merge branch 'main' into 217068-discoverapm-poc-to-expand-trace-water…
iblancof May 30, 2025
5ddbb17
Merge branch 'main' into 217068-discoverapm-poc-to-expand-trace-water…
iblancof May 30, 2025
a53250f
Add transaction id in useRootTransaction
iblancof May 30, 2025
fe8466e
Enhance FullScreenWaterfall to include transaction ID in entryTransac…
iblancof May 30, 2025
047a3f4
Update aria-label for field metadata and change span destination serv…
iblancof May 30, 2025
e5fafc6
Add service name field to root transaction and update tests
iblancof May 30, 2025
9ea8f97
Add service name to serialized state in FullScreenWaterfall
iblancof May 30, 2025
e99df5e
Render error markers in waterfall timeline only if !isEmbeddable
iblancof Jun 2, 2025
22202f5
Merge branch 'main' into 217068-discoverapm-poc-to-expand-trace-water…
iblancof Jun 2, 2025
0742031
Change errorMarks condition
iblancof Jun 2, 2025
9bf7581
Update document title to reflect span or transaction type
iblancof Jun 2, 2025
930776a
Add loading state for title in SpanFlyout
iblancof Jun 3, 2025
4dae2b2
Merge branch 'main' into 217068-discoverapm-poc-to-expand-trace-water…
iblancof Jun 4, 2025
bb5f4ba
Adjust sticky positioning based on embeddable state in Waterfall comp…
iblancof Jun 4, 2025
897bed5
Fix duplicated key warning
iblancof Jun 4, 2025
755d926
Add scrollElement prop to AccordionWaterfall to handle virtual rendering
iblancof Jun 4, 2025
0000a03
Add scrollElement prop to TraceWaterfallEmbeddable
iblancof Jun 4, 2025
f1f9909
Add scrollElement prop to Waterfall
iblancof Jun 4, 2025
e220694
Add scrollElement ref to FullScreenWaterfall
iblancof Jun 4, 2025
f7f89da
Update aria-label for full screen button in Trace component
iblancof Jun 4, 2025
8477d76
Removed unused test attributes
iblancof Jun 4, 2025
eb9e56f
Update onRefresh in SpanFlyout
iblancof Jun 5, 2025
1ba76bc
[CI] Auto-commit changed files from 'node scripts/yarn_deduplicate'
kibanamachine Jun 5, 2025
c526c6d
Update duplicated tanslation key
iblancof Jun 5, 2025
48e84b4
Merge branch 'main' into 217068-discoverapm-poc-to-expand-trace-water…
iblancof Jun 5, 2025
caecb7d
Merge branch '217068-discoverapm-poc-to-expand-trace-waterfall-to-ful…
iblancof Jun 5, 2025
76ac47b
Merge branch 'main' into 217068-discoverapm-poc-to-expand-trace-water…
iblancof Jun 5, 2025
aabc1a8
Merge branch 'main' into 217068-discoverapm-poc-to-expand-trace-water…
iblancof Jun 6, 2025
6a9772c
Add missing translations
iblancof Jun 6, 2025
ade9c3e
Improved tabs content rendering readability
iblancof Jun 6, 2025
7ef726a
Add missing showActions prop to Trace section in span and transaction…
iblancof Jun 6, 2025
5e1a9a8
Use EuiFlexGroup for better structure in span and transaction overview
iblancof Jun 6, 2025
1e2a97e
Improve style conditionals readability
iblancof Jun 6, 2025
c065b84
Use only id in onNodeClick
iblancof Jun 6, 2025
087a769
Use tab.id as key instead of index
iblancof Jun 6, 2025
a93a661
Set useMemo return type instead of variable
iblancof Jun 6, 2025
da091cf
Update aria-label for exit full screen
iblancof Jun 6, 2025
3a0b650
Fix wrong css string
iblancof Jun 6, 2025
052730c
Remove unused scroll element ref state
iblancof Jun 6, 2025
9a82ff5
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Jun 6, 2025
7bc4c30
Change rendering mode for flyout, from var to inline
iblancof Jun 6, 2025
0369c7d
Update src/platform/plugins/shared/unified_doc_viewer/public/componen…
iblancof Jun 6, 2025
6bfedea
Merge branch '217068-discoverapm-poc-to-expand-trace-waterfall-to-ful…
iblancof Jun 6, 2025
0ea2538
Update src/platform/plugins/shared/unified_doc_viewer/public/componen…
iblancof Jun 6, 2025
3de3656
Use shorthand prop for hidePanelChrome
iblancof Jun 6, 2025
b95d578
Update src/platform/plugins/shared/unified_doc_viewer/public/componen…
iblancof Jun 6, 2025
3ef9729
Update src/platform/plugins/shared/unified_doc_viewer/public/componen…
iblancof Jun 6, 2025
a2aeb25
Merge branch 'main' into 217068-discoverapm-poc-to-expand-trace-water…
iblancof Jun 10, 2025
3573446
Extract span flyout body
iblancof Jun 10, 2025
9b2a441
Merge branch 'main' into 217068-discoverapm-poc-to-expand-trace-water…
iblancof Jun 10, 2025
39d0a8a
Add onErrorClick event in embeddable waterfall
iblancof Jun 10, 2025
1b36ca4
Create ApmErrorsContextService
iblancof Jun 11, 2025
70594ad
Add apmErrorsContextService to ProfileProviderServices
iblancof Jun 11, 2025
97d939a
Add apmErrorsIndexPattern to traces document profile providers
iblancof Jun 11, 2025
989c940
Add DataSourcesProvider to span and transaction overviews
iblancof Jun 11, 2025
ce07a86
Change indexes structure
iblancof Jun 11, 2025
304f52f
Change onErrorClick in favor of getRelatedErrorsHref
iblancof Jun 12, 2025
284751f
Changed getRelatedErrorsHref to use only one docId from the waterfall
iblancof Jun 12, 2025
75a2cc1
Add getRelatedErrorsHref logic in FullScreenWaterfall
iblancof Jun 12, 2025
47e2dbe
Add missing traces indexes to DataSources
iblancof Jun 12, 2025
483573d
Update indexes
iblancof Jun 12, 2025
05c4f82
Merge branch 'main' into 222591-discoverapm-add-link-to-related-error…
iblancof Jun 12, 2025
91d61c6
Merge branch 'main' into 222591-discoverapm-add-link-to-related-error…
iblancof Jun 13, 2025
db725f1
Merge branch 'main' into 222591-discoverapm-add-link-to-related-error…
iblancof Jun 13, 2025
9d3d349
Cast href in EmbeddableRelatedErrors component to prevent TS error
iblancof Jun 16, 2025
e4b0339
Create ExitFullScreenButton
iblancof Jun 16, 2025
2ecb602
Use ExitFullScreenButton in FullScreenWaterfall
iblancof Jun 16, 2025
d809216
Rename onCloseFullScreen to onExitFullScreen
iblancof Jun 16, 2025
7142e5a
Merge branch 'main' into 222591-discoverapm-add-link-to-related-error…
iblancof Jun 16, 2025
6412b5c
[CI] Auto-commit changed files from 'node scripts/yarn_deduplicate'
kibanamachine Jun 16, 2025
03a9c2c
Remove discover locator type to prevent circular dependency
iblancof Jun 16, 2025
161b467
Add missing type import
iblancof Jun 16, 2025
019f28f
Merge branch 'main' into 222591-discoverapm-add-link-to-related-error…
iblancof Jun 16, 2025
161d12a
Create and use missing createApmErrorsContextServiceMock
iblancof Jun 16, 2025
9c39fe2
Merge branch 'main' into 222591-discoverapm-add-link-to-related-error…
miloszmarcinkowski Jun 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/platform/packages/shared/kbn-discover-utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export {
convertValueToString,
createLogsContextService,
createTracesContextService,
createApmErrorsContextService,
createDegradedDocsControl,
createStacktraceControl,
fieldConstants,
Expand Down Expand Up @@ -61,7 +62,7 @@ export {
LogLevelBadge,
} from './src';

export type { LogsContextService, TracesContextService } from './src';
export type { LogsContextService, TracesContextService, ApmErrorsContextService } from './src';

export * from './src/types';

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* 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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { getApmErrorsContextService } from '../data_types';

export const createApmErrorsContextServiceMock = () => getApmErrorsContextService('errors-*');
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ export * from './es_hits';
export * from './additional_field_groups';
export * from './logs_context_service';
export * from './traces_context_service';
export * from './apm_errors_context_service';
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* 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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import type { ApmSourceAccessPluginStart } from '@kbn/apm-sources-access-plugin/public';

export interface ApmErrorsContextService {
getErrorsIndexPattern(): string;
}

export interface ApmErrorsContextServiceDeps {
apmSourcesAccess?: ApmSourceAccessPluginStart;
}

// should we have defaults here?
export const DEFAULT_ALLOWED_APM_ERRORS_BASE_PATTERNS = [];

export const createApmErrorsContextService = async ({
apmSourcesAccess,
}: ApmErrorsContextServiceDeps): Promise<ApmErrorsContextService> => {
if (!apmSourcesAccess) {
return defaultApmErrorsContextService;
}

try {
const indices = await apmSourcesAccess.getApmIndices();

if (!indices) {
return defaultApmErrorsContextService;
}

const { error } = indices;
return getApmErrorsContextService(error);
} catch (error) {
return defaultApmErrorsContextService;
}
};

export const getApmErrorsContextService = (error: string) => ({
getErrorsIndexPattern: () => error,
});

const defaultApmErrorsContextService = getApmErrorsContextService(
DEFAULT_ALLOWED_APM_ERRORS_BASE_PATTERNS.join()
);
Original file line number Diff line number Diff line change
@@ -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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
*/

export * from './errors/errors_context_service';
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@

export * from './logs';
export * from './traces';
export * from './apm';
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import type { ProfileProviderServices } from '../profile_providers/profile_provi
import { ProfilesManager } from '../profiles_manager';
import { DiscoverEBTManager } from '../../plugin_imports/discover_ebt_manager';
import {
createApmErrorsContextServiceMock,
createLogsContextServiceMock,
createTracesContextServiceMock,
} from '@kbn/discover-utils/src/__mocks__';
Expand Down Expand Up @@ -198,6 +199,7 @@ const createProfileProviderServicesMock = () => {
logsContextService: createLogsContextServiceMock(),
discoverShared: discoverSharedPluginMock.createStartContract(),
tracesContextService: createTracesContextServiceMock(),
apmErrorsContextService: createApmErrorsContextServiceMock(),
core: {
pricing: pricingServiceMock.createStartContract() as ReturnType<
typeof pricingServiceMock.createStartContract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ import type { DocumentProfileProvider } from '../../../../../profiles';
import type { DocViewerExtensionParams, DocViewerExtension } from '../../../../../types';

export const createGetDocViewer =
(tracesIndexPattern: string): DocumentProfileProvider['profile']['getDocViewer'] =>
(indexes: {
apm: { errors: string; traces: string };
logs: string;
}): DocumentProfileProvider['profile']['getDocViewer'] =>
(prev: (params: DocViewerExtensionParams) => DocViewerExtension) =>
(params: DocViewerExtensionParams) => {
const prevDocViewer = prev(params);
Expand All @@ -30,12 +33,7 @@ export const createGetDocViewer =
}),
order: 0,
component: (props) => {
return (
<UnifiedDocViewerObservabilityTracesSpanOverview
{...props}
tracesIndexPattern={tracesIndexPattern}
/>
);
return <UnifiedDocViewerObservabilityTracesSpanOverview {...props} indexes={indexes} />;
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,20 @@ const OBSERVABILITY_TRACES_SPAN_DOCUMENT_PROFILE_ID = 'observability-traces-span

export const createObservabilityTracesSpanDocumentProfileProvider = ({
tracesContextService,
apmErrorsContextService,
logsContextService,
}: ProfileProviderServices): DocumentProfileProvider => ({
isExperimental: true,
profileId: OBSERVABILITY_TRACES_SPAN_DOCUMENT_PROFILE_ID,
restrictedToProductFeature: TRACES_PRODUCT_FEATURE_ID,
profile: {
getDocViewer: createGetDocViewer(tracesContextService.getAllTracesIndexPattern()),
getDocViewer: createGetDocViewer({
apm: {
errors: apmErrorsContextService.getErrorsIndexPattern(),
traces: tracesContextService.getAllTracesIndexPattern(),
},
logs: logsContextService.getAllLogsIndexPattern() ?? '',
}),
},
resolve: ({ record, rootContext }) => {
const isObservabilitySolutionView = rootContext.solutionType === SolutionType.Observability;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ import type { DocumentProfileProvider } from '../../../../..';
import type { DocViewerExtensionParams, DocViewerExtension } from '../../../../../types';

export const createGetDocViewer =
(tracesIndexPattern: string): DocumentProfileProvider['profile']['getDocViewer'] =>
(indexes: {
apm: { errors: string; traces: string };
logs: string;
}): DocumentProfileProvider['profile']['getDocViewer'] =>
(prev: (params: DocViewerExtensionParams) => DocViewerExtension) =>
(params: DocViewerExtensionParams) => {
const prevDocViewer = prev(params);
Expand All @@ -36,7 +39,7 @@ export const createGetDocViewer =
return (
<UnifiedDocViewerObservabilityTracesTransactionOverview
{...props}
tracesIndexPattern={tracesIndexPattern}
indexes={indexes}
/>
);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,20 @@ const OBSERVABILITY_TRACES_TRANSACTION_DOCUMENT_PROFILE_ID =

export const createObservabilityTracesTransactionDocumentProfileProvider = ({
tracesContextService,
apmErrorsContextService,
logsContextService,
}: ProfileProviderServices): DocumentProfileProvider => ({
isExperimental: true,
profileId: OBSERVABILITY_TRACES_TRANSACTION_DOCUMENT_PROFILE_ID,
restrictedToProductFeature: TRACES_PRODUCT_FEATURE_ID,
profile: {
getDocViewer: createGetDocViewer(tracesContextService.getAllTracesIndexPattern() || ''),
getDocViewer: createGetDocViewer({
apm: {
errors: apmErrorsContextService.getErrorsIndexPattern(),
traces: tracesContextService.getAllTracesIndexPattern(),
},
logs: logsContextService.getAllLogsIndexPattern() ?? '',
}),
},
resolve: ({ record, rootContext }) => {
const isObservabilitySolutionView = rootContext.solutionType === SolutionType.Observability;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import {
type LogsContextService,
createTracesContextService,
type TracesContextService,
createApmErrorsContextService,
type ApmErrorsContextService,
} from '@kbn/discover-utils';

import type { LogsDataAccessPluginStart } from '@kbn/logs-data-access-plugin/public';
Expand All @@ -35,6 +37,7 @@ export interface ProfileProviderServices extends DiscoverServices {
*/
logsContextService: LogsContextService;
tracesContextService: TracesContextService;
apmErrorsContextService: ApmErrorsContextService;
}

/**
Expand All @@ -53,5 +56,8 @@ export const createProfileProviderServices = async (
tracesContextService: await createTracesContextService({
apmSourcesAccess: discoverServices.apmSourcesAccess,
}),
apmErrorsContextService: await createApmErrorsContextService({
apmSourcesAccess: discoverServices.apmSourcesAccess,
}),
};
};
Original file line number Diff line number Diff line change
@@ -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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import React, { useCallback } from 'react';
import { EuiButtonIcon, EuiWindowEvent } from '@elastic/eui';
export interface ExitFullScreenButtonProps {
ariaLabel: string;
dataTestSubj: string;
onExitFullScreen: () => void;
}

export const ExitFullScreenButton = ({
ariaLabel,
dataTestSubj,
onExitFullScreen,
}: ExitFullScreenButtonProps) => {
const onKeyDown = useCallback(
(event: KeyboardEvent) => {
if (event.key === 'Escape') {
event.preventDefault();

onExitFullScreen();
}
},
[onExitFullScreen]
);
return (
<>
<EuiWindowEvent event="keydown" handler={onKeyDown} />
<EuiButtonIcon
data-test-subj={dataTestSubj}
display="base"
iconSize="m"
iconType="fullScreenExit"
aria-label={ariaLabel}
onClick={onExitFullScreen}
/>
</>
);
};
Loading