-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
APM Experiments settings #81554
APM Experiments settings #81554
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
export const enableCorrelations = 'apm:enableCorrelations'; | ||
export const enableServiceOverview = 'apm:enableServiceOverview'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ import { EuiTabs } from '@elastic/eui'; | |
import { i18n } from '@kbn/i18n'; | ||
import React from 'react'; | ||
import { isJavaAgentName, isRumAgentName } from '../../../../common/agent_name'; | ||
import { enableServiceOverview } from '../../../../common/ui_settings_keys'; | ||
import { useAgentName } from '../../../hooks/useAgentName'; | ||
import { useApmPluginContext } from '../../../hooks/useApmPluginContext'; | ||
import { EuiTabLink } from '../../shared/EuiTabLink'; | ||
|
@@ -29,7 +30,19 @@ interface Props { | |
|
||
export function ServiceDetailTabs({ serviceName, tab }: Props) { | ||
const { agentName } = useAgentName(); | ||
const { serviceMapEnabled } = useApmPluginContext().config; | ||
const { uiSettings } = useApmPluginContext().core; | ||
|
||
const overviewTab = { | ||
link: ( | ||
<a title="UNDER CONSTRUCTION" href="#"> | ||
{i18n.translate('xpack.apm.serviceDetails.overviewTabLabel', { | ||
defaultMessage: 'Overview', | ||
})} | ||
</a> | ||
), | ||
render: () => <></>, | ||
name: 'overview', | ||
}; | ||
|
||
const transactionsTab = { | ||
link: ( | ||
|
@@ -57,7 +70,23 @@ export function ServiceDetailTabs({ serviceName, tab }: Props) { | |
name: 'errors', | ||
}; | ||
|
||
const tabs = [transactionsTab, errorsTab]; | ||
const serviceMapTab = { | ||
link: ( | ||
<ServiceMapLink serviceName={serviceName}> | ||
{i18n.translate('xpack.apm.home.serviceMapTabLabel', { | ||
defaultMessage: 'Service Map', | ||
})} | ||
</ServiceMapLink> | ||
), | ||
render: () => <ServiceMap serviceName={serviceName} />, | ||
name: 'service-map', | ||
}; | ||
|
||
const tabs = [transactionsTab, errorsTab, serviceMapTab]; | ||
|
||
if (uiSettings.get(enableServiceOverview)) { | ||
tabs.unshift(overviewTab); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we're initializing const tabs = uiSettings.get(enableServiceOverview) ?
[overviewTab, transactionsTab, errorsTab, serviceMapTab] :
[transactionsTab, errorsTab, serviceMapTab]; There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I left the mutation since we're |
||
|
||
if (isJavaAgentName(agentName)) { | ||
const nodesListTab = { | ||
|
@@ -89,22 +118,6 @@ export function ServiceDetailTabs({ serviceName, tab }: Props) { | |
tabs.push(metricsTab); | ||
} | ||
|
||
const serviceMapTab = { | ||
link: ( | ||
<ServiceMapLink serviceName={serviceName}> | ||
{i18n.translate('xpack.apm.home.serviceMapTabLabel', { | ||
defaultMessage: 'Service Map', | ||
})} | ||
</ServiceMapLink> | ||
), | ||
render: () => <ServiceMap serviceName={serviceName} />, | ||
name: 'service-map', | ||
}; | ||
|
||
if (serviceMapEnabled) { | ||
tabs.push(serviceMapTab); | ||
} | ||
|
||
const selectedTab = tabs.find((serviceTab) => serviceTab.name === tab); | ||
|
||
return ( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is
UNDER CONSTRUCTION
intentional because it's an experiment?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. It's just a placeholder and behind the flag and will be replaced in #81718.