Skip to content
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

[Onboarding] Additional auto-detect flow telemetry #207726

Merged
Merged
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
@@ -7,46 +7,53 @@

import type { EventTypeOpts, SchemaValue } from '@elastic/ebt/client';

interface ObservabilityOnboardingIntegrationTelemetryFields {
installSource: string;
pkgName: string;
pkgVersion: string;
title: string;
}

interface FlowEventFields {
flow?: string;
step?: string;
step_status?: string;
flow_type: string;
flow_id: string;
step: string;
step_status: string;
step_message?: string;
uses_legacy_onboarding_page: boolean;
payload?: {
integrations?: Array<{
installSource: string;
pkgName: string;
pkgVersion: string;
title: string;
}>;
agentId?: string;
os?: string;
arch?: string;
};
}

type ObservabilityOnboardingTelemetryEvent = EventTypeOpts<FlowEventFields>;

export const OBSERVABILITY_ONBOARDING_TELEMETRY_EVENT: ObservabilityOnboardingTelemetryEvent = {
eventType: 'observability_onboarding',
schema: {
flow: {
flow_type: {
type: 'keyword',
_meta: {
description:
"The current onboarding flow user is going through (e.g. 'system_logs', 'nginx'). If not present, user is on the landing screen.",
optional: true,
"The current onboarding flow type user is going through (e.g. 'autoDetect', 'logFiles', 'kubernetes'). If not present, user is on the landing screen.",
},
},
flow_id: {
type: 'keyword',
_meta: {
description: 'Unique identifier of the current onboarding session',
},
},
step: {
type: 'keyword',
_meta: {
description: 'The current step in the onboarding flow.',
optional: true,
},
},
step_status: {
type: 'keyword',
_meta: {
description: 'The status of the step in the onboarding flow.',
optional: true,
},
},
step_message: {
@@ -56,10 +63,62 @@ export const OBSERVABILITY_ONBOARDING_TELEMETRY_EVENT: ObservabilityOnboardingTe
optional: true,
},
},
uses_legacy_onboarding_page: {
type: 'boolean',
payload: {
properties: {
integrations: {
type: 'array',
items: {
properties: {
installSource: {
type: 'keyword',
_meta: {
description:
'The source of the package used to create the integration. Usually "registry" or "custom".',
},
},
pkgName: {
type: 'keyword',
_meta: {
description: 'The name of the package used to create the integration.',
},
},
pkgVersion: {
type: 'keyword',
_meta: {
description: 'The version of the package used to create the integration.',
},
},
title: { type: 'keyword', _meta: { description: 'The visual name of the package.' } },
},
},
_meta: {
optional: true,
},
},
agentId: {
type: 'keyword',
_meta: {
description: 'The ID of the Elastic Agent installed on the host.',
optional: true,
},
},
os: {
type: 'keyword',
_meta: {
description: 'OS used by the host.',
optional: true,
},
},
arch: {
type: 'keyword',
_meta: {
description: 'Architecture used by the host.',
optional: true,
},
},
},
_meta: {
description: 'Whether the user is using the legacy onboarding page or the new one',
optional: true,
},
},
},
@@ -87,48 +146,6 @@ export const OBSERVABILITY_ONBOARDING_FEEDBACK_TELEMETRY_EVENT: EventTypeOpts<{
},
};

type ObservabilityOnboardingAutodetectTelemetryEvent = EventTypeOpts<
FlowEventFields & {
integrations?: ObservabilityOnboardingIntegrationTelemetryFields[];
}
>;

export const OBSERVABILITY_ONBOARDING_AUTODETECT_TELEMETRY_EVENT: ObservabilityOnboardingAutodetectTelemetryEvent =
{
eventType: 'observability_onboarding_autodetect',
schema: {
...OBSERVABILITY_ONBOARDING_TELEMETRY_EVENT.schema,
integrations: {
type: 'array',
items: {
properties: {
installSource: {
type: 'keyword',
_meta: {
description:
'The source of the package used to create the integration. Usually "registry" or "custom".',
},
},
pkgName: {
type: 'keyword',
_meta: {
description: 'The name of the package used to create the integration.',
},
},
pkgVersion: {
type: 'keyword',
_meta: { description: 'The version of the package used to create the integration.' },
},
title: { type: 'keyword', _meta: { description: 'The visual name of the package.' } },
},
},
_meta: {
optional: true,
},
},
},
};

interface OnboardingFirehoseFlowEventContext {
selectedCreateStackOption?: string;
cloudServiceProvider?: string;
Original file line number Diff line number Diff line change
@@ -15,7 +15,6 @@ import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app';
import { Router } from '@kbn/shared-ux-router';
import React from 'react';
import ReactDOM from 'react-dom';
import { OBSERVABILITY_ONBOARDING_TELEMETRY_EVENT } from '../../common/telemetry_events';
import { AppContext, ConfigSchema, ObservabilityOnboardingAppServices } from '..';
import { ObservabilityOnboardingHeaderActionMenu } from './shared/header_action_menu';
import {
@@ -53,10 +52,6 @@ export function ObservabilityOnboardingAppRoot({
context,
};

core.analytics.reportEvent(OBSERVABILITY_ONBOARDING_TELEMETRY_EVENT.eventType, {
uses_legacy_onboarding_page: false,
});
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleting this one as legacy onboarding page is not a thing anymore. Also deleted uses_legacy_onboarding_page property from the even schema.


return (
<KibanaRenderContextProvider {...core}>
<div className={APP_WRAPPER_CLASS}>
Original file line number Diff line number Diff line change
@@ -32,7 +32,6 @@ import { GetStartedPanel } from '../shared/get_started_panel';
import { isSupportedLogo, LogoIcon } from '../../shared/logo_icon';
import { FeedbackButtons } from '../shared/feedback_buttons';
import { ObservabilityOnboardingContextValue } from '../../../plugin';
import { useAutoDetectTelemetry } from './use_auto_detect_telemetry';
import { SupportedIntegrationsList } from './supported_integrations_list';

export const AutoDetectPanel: FunctionComponent = () => {
@@ -43,16 +42,6 @@ export const AutoDetectPanel: FunctionComponent = () => {
services: { share },
} = useKibana<ObservabilityOnboardingContextValue>();

useAutoDetectTelemetry(
status,
installedIntegrations.map(({ title, pkgName, pkgVersion, installSource }) => ({
title,
pkgName,
pkgVersion,
installSource,
}))
);

if (error) {
return <EmptyPrompt onboardingFlowType="auto-detect" error={error} onRetryClick={refetch} />;
}

This file was deleted.

This file was deleted.

Loading