Skip to content

Commit

Permalink
Merge branch 'main' into 156534-add-alertDetailsUrl-for-infra-rules
Browse files Browse the repository at this point in the history
  • Loading branch information
maryam-saeidi authored May 24, 2023
2 parents 1eabdf8 + 668968b commit 86ba4b4
Show file tree
Hide file tree
Showing 149 changed files with 2,233 additions and 679 deletions.
14 changes: 1 addition & 13 deletions .github/workflows/deploy-my-kibana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
##
## This the automation to let Observability team members to deploy a Kibana instance
## using the Observability test environments.
## It will deploy a new instance for those who add a comment /oblt-deploy or /oblt-deploy-serverless
## It will deploy a new instance for those who add a comment /oblt-deploy
## only supported for Elasticians.
##
## Owner: @elastic/observablt-robots
Expand All @@ -28,15 +28,3 @@ jobs:
vaultUrl: ${{ secrets.OBLT_VAULT_ADDR }}
vaultRoleId: ${{ secrets.OBLT_VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.OBLT_VAULT_SECRET_ID }}
serverless: false

deploy-my-kibana-serverless:
if: ${{ github.event.issue.pull_request && github.event.comment.body == '/oblt-deploy-serverless'}}
runs-on: ubuntu-latest
steps:
- uses: elastic/apm-pipeline-library/.github/actions/deploy-my-kibana@current
with:
vaultUrl: ${{ secrets.OBLT_VAULT_ADDR }}
vaultRoleId: ${{ secrets.OBLT_VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.OBLT_VAULT_SECRET_ID }}
serverless: true
1 change: 0 additions & 1 deletion .github/workflows/oblt-github-commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ jobs:
Just comment with:
- \`/oblt-deploy\` : Deploy a Kibana instance using the Observability test environments.
- \`/oblt-deploy-serverless\` : Deploy a Kibana instance using the Observability `serverless` test environment [only for main].
- \`run\` \`elasticsearch-ci/docs\` : Re-trigger the docs validation. (use unformatted text in the comment!)
</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[[maintenance-windows]]
== Maintenance windows
:description: Maintenance windows enable you to suppress rule notifications.
:tags-products: [kibana, alerting]
:tags-content-type: [overview]
:tags-user-goals: [manage]

:frontmatter-description: Maintenance windows enable you to suppress rule notifications.
:frontmatter-tags-products: [kibana, alerting]
:frontmatter-tags-content-type: [overview]
:frontmatter-tags-user-goals: [manage]

preview::[]

Expand Down
5 changes: 3 additions & 2 deletions docs/management/manage-data-views.asciidoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[[managing-data-views]]
== Manage data views
:keywords: administrator, data view, data views, management, runtime fields, runtime fields in Kibana, scripted fields, field formatters, data fields, index pattern, index patterns
:description: Conceptual and step-by-step procedures for using runtime fields, scripted fields, and field formatters.

:frontmatter-description: Conceptual and step-by-step procedures for using runtime fields, scripted fields, and field formatters.
:frontmatter-tags-products: [kibana]

To customize the data fields in your data view,
you can add runtime fields to the existing documents,
Expand Down
8 changes: 4 additions & 4 deletions docs/settings/alert-action-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<titleabbrev>Alerting and action settings</titleabbrev>
++++

:description: Learn about the settings that affect {kib} {alert-features}.
:tags-products: [kibana, alerting]
:tags-content-type: [reference]
:tags-user-goals: [configure]
:frontmatter-description: Learn about the settings that affect {kib} {alert-features}.
:frontmatter-tags-products: [kibana, alerting]
:frontmatter-tags-content-type: [reference]
:frontmatter-tags-user-goals: [configure]

Alerting and actions are enabled by default in {kib}, but require you to configure the following:

Expand Down
7 changes: 5 additions & 2 deletions docs/settings/reporting-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
++++
<titleabbrev>Reporting settings</titleabbrev>
++++
:keywords: administrator, reference, setup, reporting
:description: A reference of the reporting settings administrators configure in kibana.yml.

:frontmatter-description: A reference of the reporting settings administrators configure in kibana.yml.
:frontmatter-tags-products: [kibana]
:frontmatter-tags-content-type: [reference]
:frontmatter-tags-user-goals: [configure]

You can configure `xpack.reporting` settings in your `kibana.yml` to:

Expand Down
8 changes: 4 additions & 4 deletions docs/user/dashboard/make-dashboards-interactive.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
[[drilldowns]]
== Make dashboards interactive

:keywords: administrator, analyst, concept, task, analyze, dashboard, controls, range slider, options list, author, drilldowns
:description: Add interactive capabilities to your dashboard, such as controls that allow \
you to apply dashboard-level filters, and drilldowns that allow you to navigate to other \
dashboards and external websites.
:frontmatter-description: Add interactive filter and navigation capabilities to your dashboard.
:frontmatter-tags-products: [kibana]
:frontmatter-tags-content-type: [how-to]
:frontmatter-tags-user-goals: [analyze, visualize]

Add interactive capabilities to your dashboard, such as interactive filter controls, and drilldowns that allow you to navigate to *Discover*, other dashboards, and external websites.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
++++
<titleabbrev>Reporting</titleabbrev>
++++
:keywords: administrator, analyst, concept, setup, reporting
:description: Consider the production components that are used to generate reports.

:frontmatter-description: Consider the production components that are used to generate reports.
:frontmatter-tags-products: [kibana]

To generate reports, {kib} uses the Chromium web browser, which runs on the server in headless mode. Chromium is an open-source project not related to Elastic, and is embedded into {kib}. Chromium may require additional OS dependencies to run properly.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
++++
<titleabbrev>Security</titleabbrev>
++++
:keywords: administrator, analyst, concept, setup, security
:description: Consider the production components for {kib} security.

:frontmatter-description: Consider the production components for {kib} security.
:frontmatter-tags-products: [kibana]

To secure your {kib} installation in production, consider these high-priority topics to ensure
that only authorized users can access {kib}.
Expand Down
6 changes: 2 additions & 4 deletions docs/user/reporting/index.asciidoc
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
[role="xpack"]
[[reporting-getting-started]]
= Reporting and sharing

[partintro]

--

:keywords: analyst, concept, task, reporting
:description: {kib} provides you with several options to share *Discover* saved searches, dashboards, *Visualize Library* visualizations, and *Canvas* workpads with others, or on a website.
:frontmatter-description: {kib} provides you with several options to share *Discover* saved searches, dashboards, *Visualize Library* visualizations, and *Canvas* workpads with others, or on a website.
:frontmatter-tags-products: [kibana]

{kib} provides you with several options to share *Discover* saved searches, dashboards, *Visualize Library* visualizations, and *Canvas* workpads.

Expand Down
6 changes: 3 additions & 3 deletions docs/user/security/authentication/index.asciidoc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[role="xpack"]
[[kibana-authentication]]
=== Authentication in {kib}
++++
<titleabbrev>Authentication</titleabbrev>
++++
:keywords: administrator, concept, security, authentication
:description: A list of the supported authentication mechanisms in {kib}.

:frontmatter-description: A list of the supported authentication mechanisms in {kib}.
:frontmatter-tags-products: [kibana]

{kib} supports the following authentication mechanisms:

Expand Down
10 changes: 10 additions & 0 deletions x-pack/plugins/apm/common/apm_feature_flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export enum ApmFeatureFlagName {
MigrationToFleetAvailable = 'migrationToFleetAvailable',
SourcemapApiAvailable = 'sourcemapApiAvailable',
SpacesAvailable = 'spacesAvailable',
SchemaAvailable = 'schemaAvailable',
StorageExplorerAvailable = 'storageExplorerAvailable',
}

const apmFeatureFlagMap = {
Expand Down Expand Up @@ -47,6 +49,14 @@ const apmFeatureFlagMap = {
default: true,
type: t.boolean,
},
[ApmFeatureFlagName.SchemaAvailable]: {
default: true,
type: t.boolean,
},
[ApmFeatureFlagName.StorageExplorerAvailable]: {
default: true,
type: t.boolean,
},
};

type ApmFeatureFlagMap = typeof apmFeatureFlagMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import { AnomalyDetectionSetupLink } from './anomaly_detection_setup_link';
import { useServiceName } from '../../../../hooks/use_service_name';
import { InspectorHeaderLink } from './inspector_header_link';
import { Labs } from './labs';
import { useApmFeatureFlag } from '../../../../hooks/use_apm_feature_flag';
import { ApmFeatureFlagName } from '../../../../../common/apm_feature_flags';

export function ApmHeaderActionMenu() {
const { core, plugins } = useApmPluginContext();
Expand All @@ -35,6 +37,9 @@ export function ApmHeaderActionMenu() {
const { isAlertingAvailable, canReadAlerts, canSaveAlerts } =
getAlertingCapabilities(plugins, capabilities);
const canSaveApmAlerts = capabilities.apm.save && canSaveAlerts;
const isStorageExplorerAvailable = useApmFeatureFlag(
ApmFeatureFlagName.StorageExplorerAvailable
);

function apmHref(path: string) {
return getLegacyApmHref({ basePath, path, search });
Expand All @@ -52,19 +57,22 @@ export function ApmHeaderActionMenu() {
return (
<EuiHeaderLinks gutterSize="xs">
{isLabsButtonEnabled && <Labs />}
<EuiHeaderLink
color="text"
href={apmHref('/storage-explorer')}
data-test-subj="apmStorageExplorerHeaderLink"
>
<EuiFlexGroup gutterSize="s" alignItems="center">
<EuiFlexItem grow={false}>
{i18n.translate('xpack.apm.storageExplorerLinkLabel', {
defaultMessage: 'Storage Explorer',
})}
</EuiFlexItem>
</EuiFlexGroup>
</EuiHeaderLink>
{isStorageExplorerAvailable && (
<EuiHeaderLink
color="text"
href={apmHref('/storage-explorer')}
data-test-subj="apmStorageExplorerHeaderLink"
>
<EuiFlexGroup gutterSize="s" alignItems="center">
<EuiFlexItem grow={false}>
{i18n.translate('xpack.apm.storageExplorerLinkLabel', {
defaultMessage: 'Storage Explorer',
})}
</EuiFlexItem>
</EuiFlexGroup>
</EuiHeaderLink>
)}

{canCreateMlJobs && <AnomalyDetectionSetupLink />}
{isAlertingAvailable && (
<AlertingPopoverAndFlyout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,19 @@ describe('APM service template', () => {
describe('isInfraTabHidden', () => {
describe('hides infra tab', () => {
[
{ agentName: undefined },
{ agentName: 'js-base' },
{ agentName: 'rum-js' },
{ agentName: 'opentelemetry/webjs' },
{ serverlessType: ServerlessType.AWS_LAMBDA },
{ serverlessType: ServerlessType.AZURE_FUNCTIONS },
{ agentName: undefined, isInfraTabAvailable: true },
{ agentName: 'js-base', isInfraTabAvailable: true },
{ agentName: 'rum-js', isInfraTabAvailable: true },
{ agentName: 'opentelemetry/webjs', isInfraTabAvailable: true },
{
serverlessType: ServerlessType.AWS_LAMBDA,
isInfraTabAvailable: true,
},
{
serverlessType: ServerlessType.AZURE_FUNCTIONS,
isInfraTabAvailable: true,
},
{ agentName: 'nodejs', isInfraTabAvailable: false },
].map((input) => {
it(`when input ${JSON.stringify(input)}`, () => {
expect(isInfraTabHidden(input)).toBeTruthy();
Expand All @@ -59,16 +66,16 @@ describe('APM service template', () => {
});
describe('shows infra tab', () => {
[
{ agentName: 'ruby', runtimeName: 'ruby' },
{ agentName: 'ruby', runtimeName: 'jruby' },
{ agentName: 'ruby' },
{ agentName: 'dotnet' },
{ agentName: 'go' },
{ agentName: 'nodejs' },
{ agentName: 'php' },
{ agentName: 'python' },
{ agentName: 'java' },
{ agentName: 'opentelemetry/java' },
{ agentName: 'ruby', runtimeName: 'ruby', isInfraTabAvailable: true },
{ agentName: 'ruby', runtimeName: 'jruby', isInfraTabAvailable: true },
{ agentName: 'ruby', isInfraTabAvailable: true },
{ agentName: 'dotnet', isInfraTabAvailable: true },
{ agentName: 'go', isInfraTabAvailable: true },
{ agentName: 'nodejs', isInfraTabAvailable: true },
{ agentName: 'php', isInfraTabAvailable: true },
{ agentName: 'python', isInfraTabAvailable: true },
{ agentName: 'java', isInfraTabAvailable: true },
{ agentName: 'opentelemetry/java', isInfraTabAvailable: true },
].map((input) => {
it(`when input ${JSON.stringify(input)}`, () => {
expect(isInfraTabHidden(input)).toBeFalsy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ import { TechnicalPreviewBadge } from '../../../shared/technical_preview_badge';
import { ApmMainTemplate } from '../apm_main_template';
import { AnalyzeDataButton } from './analyze_data_button';
import { ServerlessType } from '../../../../../common/serverless';
import { useApmFeatureFlag } from '../../../../hooks/use_apm_feature_flag';
import { ApmFeatureFlagName } from '../../../../../common/apm_feature_flags';

type Tab = NonNullable<EuiPageHeaderProps['tabs']>[0] & {
key:
Expand Down Expand Up @@ -191,12 +193,17 @@ export function isMetricsTabHidden({
export function isInfraTabHidden({
agentName,
serverlessType,
isInfraTabAvailable,
}: {
agentName?: string;
serverlessType?: ServerlessType;
isInfraTabAvailable: boolean;
}) {
return (
!agentName || isRumAgentName(agentName) || isServerlessAgent(serverlessType)
!agentName ||
isRumAgentName(agentName) ||
isServerlessAgent(serverlessType) ||
!isInfraTabAvailable
);
}

Expand All @@ -211,6 +218,10 @@ function useTabs({ selectedTab }: { selectedTab: Tab['key'] }) {

const router = useApmRouter();

const isInfraTabAvailable = useApmFeatureFlag(
ApmFeatureFlagName.InfrastructureTabAvailable
);

const isAwsLambdaEnabled = core.uiSettings.get<boolean>(
enableAwsLambdaMetrics,
true
Expand Down Expand Up @@ -323,7 +334,11 @@ function useTabs({ selectedTab }: { selectedTab: Tab['key'] }) {
label: i18n.translate('xpack.apm.home.infraTabLabel', {
defaultMessage: 'Infrastructure',
}),
hidden: isInfraTabHidden({ agentName, serverlessType }),
hidden: isInfraTabHidden({
agentName,
serverlessType,
isInfraTabAvailable,
}),
},
{
key: 'service-map',
Expand Down
Loading

0 comments on commit 86ba4b4

Please sign in to comment.