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

[Uptime][Synthetics Integration] add browser callout #108935

Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,11 @@ describe('<CustomFields />', () => {
getAllByLabelText('Zip URL').forEach((node) => {
expect(node).toBeInTheDocument();
});
expect(
getByText(
/Browser monitoring requires using the \"complete\" variant of the elastic–agent docker container./
)
).toBeInTheDocument();

// ensure at least one browser advanced option is present
advancedOptionsButton = getByText('Advanced Browser options');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import {
EuiSpacer,
EuiDescribedFormGroup,
EuiCheckbox,
EuiCallOut,
EuiLink,
} from '@elastic/eui';
import { ConfigKeys, DataStream, Validation } from './types';
import { useMonitorTypeContext } from './contexts';
Expand Down Expand Up @@ -122,6 +124,32 @@ export const CustomFields = memo<Props>(
/>
</EuiFormRow>
)}
<EuiSpacer size="s" />
{isBrowser && (
Copy link
Contributor

Choose a reason for hiding this comment

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

does it make sense to show this everytime user is adding a browser moniotor, is there a way to detect if they already have a working browser monitor, in that case i think user is probaly already educated and doesn;t need this additional context.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That makes sense. There isn't a way to do this easily. We'd have to make a call to a fleet api to collect the users policies and check from there. Alternatively, we could do a query against the datastream to see if it has any documents with monitor.type of browser.

It may be worth it to keep the call out though, since the user still need to make sure they are assigning the integration policy to the correct agent policy and they make have to change the selection at the bottom. Could be a good reminder.

<EuiCallOut
title={
<FormattedMessage
id="xpack.uptime.createPackagePolicy.stepConfigure.monitorIntegrationSettingsSection.monitorType.browser.warning.description"
defaultMessage={
'Browser monitoring requires using the "complete" variant of the elastic–agent docker container. Other distributions of elastic that agent will not work correctly with it because they lack the required browser and other binaries. For more information see our {link}'
}
values={{
link: (
<EuiLink target="_blank" href="" external>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This link still needs to be provided.

Copy link
Contributor

Choose a reason for hiding this comment

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

For now I'd say https://www.elastic.co/guide/en/observability/current/synthetic-monitoring.html is fine. I've opened elastic/observability-docs#989 to track adding more docs

<FormattedMessage
id="xpack.uptime.createPackagePolicy.stepConfigure.monitorIntegrationSettingsSection.monitorType.browser.warning.link"
defaultMessage="docs"
/>
</EuiLink>
),
}}
/>
}
iconType="help"
size="s"
/>
)}
<EuiSpacer size="s" />
{renderSimpleFields(monitorType)}
</EuiFlexItem>
</EuiFlexGroup>
Expand Down