Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* 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; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

export const CLOUDFORWARDER_CLOUDFORMATION_TEMPLATE_URL =
'https://edot-cloud-forwarder.s3.amazonaws.com/v1/latest/cloudformation/s3_logs-cloudformation.yaml';

/**
* CloudFormation stack configurations for different AWS log types.
*/
export const CLOUDFORMATION_STACK_CONFIGS = {
vpcflow: {
stackName: 'edot-cloud-forwarder-vpcflow',
logType: 'vpcflow',
},
elbaccess: {
stackName: 'edot-cloud-forwarder-elbaccess',
logType: 'elbaccess',
},
cloudtrail: {
stackName: 'edot-cloud-forwarder-cloudtrail',
logType: 'cloudtrail',
},
} as const;

export type LogType = keyof typeof CLOUDFORMATION_STACK_CONFIGS;
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,19 @@ interface OnboardingAutoDetectEventContext {
title: string;
}

interface OnboardingCloudForwarderEventContext {
selectedLogType?: string;
cloudServiceProvider?: string;
}

/**
* Additional flow-specific context that might
* be attached to telemetry events.
*/
export interface OnboardingFlowEventContext {
autoDetect?: OnboardingAutoDetectEventContext;
firehose?: OnboardingFirehoseFlowEventContext;
cloudforwarder?: OnboardingCloudForwarderEventContext;
}

const flowContextSchema: SchemaValue<OnboardingFlowEventContext | undefined> = {
Expand Down Expand Up @@ -210,6 +216,29 @@ const flowContextSchema: SchemaValue<OnboardingFlowEventContext | undefined> = {
optional: true,
},
},
cloudforwarder: {
properties: {
selectedLogType: {
type: 'keyword',
_meta: {
description:
'Which log type is selected in the UI (e.g. vpcflow, elbaccess, cloudtrail). Serves as a good indication of the type of logs the user chose to forward.',
optional: true,
},
},
cloudServiceProvider: {
type: 'keyword',
_meta: {
description:
"The cloud service provider where the cloud forwarder is deployed. Can be 'aws', 'gcp' or 'azure'",
optional: true,
},
},
},
_meta: {
optional: true,
},
},
},
_meta: {
optional: true,
Expand Down Expand Up @@ -241,7 +270,7 @@ export const OBSERVABILITY_ONBOARDING_FLOW_PROGRESS_TELEMETRY_EVENT: EventTypeOp
type: 'keyword',
_meta: {
description:
'The current step in the onboarding flow. Possible values: "in_progress", "awaiting_data", "data_received"',
'The current step in the onboarding flow. Possible values: "in_progress", "awaiting_data", "data_received", "aws_launch_stack"',
},
},
context: flowContextSchema,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export class OnboardingHomePage {
private readonly otelHostCard: Locator;
readonly awsCollectionCard: Locator;
readonly firehoseQuickstartCard: Locator;
readonly cloudforwarderQuickstartCard: Locator;

constructor(page: Page) {
this.page = page;
Expand All @@ -46,6 +47,9 @@ export class OnboardingHomePage {
this.otelHostCard = this.page.getByTestId('integration-card:otel-logs');
this.awsCollectionCard = this.page.getByTestId('integration-card:aws-logs-virtual');
this.firehoseQuickstartCard = this.page.getByTestId('integration-card:firehose-quick-start');
this.cloudforwarderQuickstartCard = this.page.getByTestId(
'integration-card:cloudforwarder-quick-start'
);
}

public async selectHostUseCase() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
OtelKubernetesPage,
FirehosePage,
OtelApmPage,
CloudForwarderPage,
} from './pages';
import type { ObservabilityOnboardingAppServices } from '..';
import { useFlowBreadcrumb } from './shared/use_flow_breadcrumbs';
Expand All @@ -29,7 +30,7 @@ export function ObservabilityOnboardingFlow() {
const { pathname } = useLocation();
const {
services: {
context: { isDev, isCloud },
context: { isDev, isCloud, isServerless },
},
} = useKibana<ObservabilityOnboardingAppServices>();

Expand Down Expand Up @@ -66,6 +67,11 @@ export function ObservabilityOnboardingFlow() {
<OtelApmPage />
</Route>
)}
{(isServerless || isDev) && (
<Route path="/cloudforwarder">
<CloudForwarderPage />
</Route>
)}
<Route>
<LandingPage />
</Route>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function useCustomCards(
services: {
application,
http,
context: { isServerless, isCloud },
context: { isServerless, isCloud, isDev },
share,
},
} = useKibana<ObservabilityOnboardingAppServices>();
Expand All @@ -51,6 +51,10 @@ export function useCustomCards(
history,
`/otel-apm/${location.search}`
);
const { href: cloudforwarderUrl } = reactRouterNavigate(
history,
`/cloudforwarder/${location.search}`
);

const apmUrl = `${getUrlForApp?.('apm')}/${isServerless ? 'onboarding' : 'tutorial'}`;
const otelApmUrl = isManagedOtlpServiceAvailable ? otelApmQuickstartUrl : apmUrl;
Expand Down Expand Up @@ -86,6 +90,33 @@ export function useCustomCards(
isQuickstart: true,
};

const cloudforwarderQuickstartCard: IntegrationCardItem = {
id: 'cloudforwarder-quick-start',
name: 'cloudforwarder-quick-start',
type: 'virtual',
title: i18n.translate('xpack.observability_onboarding.packageList.cloudforwarderTitle', {
defaultMessage: 'EDOT Cloud Forwarder',
}),
description: i18n.translate(
'xpack.observability_onboarding.packageList.cloudforwarderDescription',
{
defaultMessage:
'Forward logs from AWS S3 to Elastic using the EDOT Cloud Forwarder, running as a Lambda function.',
}
),
categories: ['observability'],
icons: [
{
type: 'svg',
src: http?.staticAssets.getPluginAssetHref('opentelemetry.svg') ?? '',
},
],
url: cloudforwarderUrl,
version: '',
integration: '',
isQuickstart: true,
};

return [
{
id: 'auto-detect-logs',
Expand Down Expand Up @@ -462,8 +493,15 @@ export function useCustomCards(
* The new Firehose card should only be visible on Cloud
* as Firehose integration requires additional proxy,
* which is not available for on-prem customers.
* Also visible in dev mode for local development.
*/
...(isCloud || isDev ? [firehoseQuickstartCard] : []),
/**
* The EDOT Cloud Forwarder card should only be visible on Serverless
* as it requires Elastic Cloud infrastructure.
* Also visible in dev mode for local development.
*/
...(isCloud ? [firehoseQuickstartCard] : []),
...(isServerless || isDev ? [cloudforwarderQuickstartCard] : []),
];
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* 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; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { i18n } from '@kbn/i18n';
import React from 'react';
import { CloudForwarderPanel } from '../quickstart_flows/cloudforwarder';
import { PageTemplate } from './template';
import { CustomHeader } from '../header';

export const CloudForwarderPage = () => (
<PageTemplate
customHeader={
<CustomHeader
logo="opentelemetry"
headlineCopy={i18n.translate(
'xpack.observability_onboarding.experimentalOnboardingFlow.customHeader.cloudforwarder.text',
{
defaultMessage: 'Set up EDOT Cloud Forwarder for AWS',
}
)}
captionCopy={i18n.translate(
'xpack.observability_onboarding.experimentalOnboardingFlow.customHeader.cloudforwarder.caption.description',
{
defaultMessage:
'Deploy the EDOT Cloud Forwarder as a Lambda function to forward logs from AWS S3 to Elastic.',
}
)}
/>
}
>
<CloudForwarderPanel />
</PageTemplate>
);
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ export { LandingPage } from './landing';
export { OtelLogsPage } from './otel_logs';
export { FirehosePage } from './firehose';
export { OtelApmPage } from './otel_apm';
export { CloudForwarderPage } from './cloudforwarder';
Loading
Loading