Skip to content

Commit

Permalink
[8.13] [Search] Adds telemetry warning rules and fixes a bunch of tel…
Browse files Browse the repository at this point in the history
…emetry issues (#181350) (#181708)

# Backport

This will backport the following commits from `main` to `8.13`:
- [[Search] Adds telemetry warning rules and fixes a bunch of telemetry
issues (#181350)](#181350)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Efe Gürkan
YALAMAN","email":"efeguerkan.yalaman@elastic.co"},"sourceCommit":{"committedDate":"2024-04-23T13:49:25Z","message":"[Search]
Adds telemetry warning rules and fixes a bunch of telemetry issues
(#181350)\n\n## Summary\r\n\r\nEnables telemetry warning eslint
rule.\r\n\r\nFixes a bunch of missing telemetry strings.\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"0a4081e1d81eb980998585144c85ac8fbd078f8c","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:EnterpriseSearch","v8.14.0","v8.15.0"],"number":181350,"url":"https://github.com/elastic/kibana/pull/181350","mergeCommit":{"message":"[Search]
Adds telemetry warning rules and fixes a bunch of telemetry issues
(#181350)\n\n## Summary\r\n\r\nEnables telemetry warning eslint
rule.\r\n\r\nFixes a bunch of missing telemetry strings.\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"0a4081e1d81eb980998585144c85ac8fbd078f8c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"8.14","label":"v8.14.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/181441","number":181441,"state":"MERGED","mergeCommit":{"sha":"3580da59f767ee6d7e291dc2b4b96db447baa9c4","message":"[8.14]
[Search] Adds telemetry warning rules and fixes a bunch of telemetry
issues (#181350) (#181441)\n\n# Backport\n\nThis will backport the
following commits from `main` to `8.14`:\n- [[Search] Adds telemetry
warning rules and fixes a bunch of telemetry\nissues
(#181350)](https://github.com/elastic/kibana/pull/181350)\n\n<!---
Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Efe
Gürkan\nYALAMAN\",\"email\":\"efeguerkan.yalaman@elastic.co\"},\"sourceCommit\":{\"committedDate\":\"2024-04-23T13:49:25Z\",\"message\":\"[Search]\nAdds
telemetry warning rules and fixes a bunch of telemetry
issues\n(#181350)\\n\\n## Summary\\r\\n\\r\\nEnables telemetry warning
eslint\nrule.\\r\\n\\r\\nFixes a bunch of missing telemetry
strings.\\r\\n\\r\\n\\r\\n###\nChecklist\\r\\n\\r\\nDelete any items
that are not applicable to this\nPR.\\r\\n\\r\\n- [ ] [Unit
or\nfunctional\\r\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\r\\nwere\nupdated
or added to match the most
common\nscenarios\",\"sha\":\"0a4081e1d81eb980998585144c85ac8fbd078f8c\",\"branchLabelMapping\":{\"^v8.15.0$\":\"main\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:skip\",\"Team:EnterpriseSearch\",\"v8.14.0\",\"v8.15.0\"],\"title\":\"[Search]\nAdds
telemetry warning rules and fixes a bunch of
telemetry\nissues\",\"number\":181350,\"url\":\"https://github.com/elastic/kibana/pull/181350\",\"mergeCommit\":{\"message\":\"[Search]\nAdds
telemetry warning rules and fixes a bunch of telemetry
issues\n(#181350)\\n\\n## Summary\\r\\n\\r\\nEnables telemetry warning
eslint\nrule.\\r\\n\\r\\nFixes a bunch of missing telemetry
strings.\\r\\n\\r\\n\\r\\n###\nChecklist\\r\\n\\r\\nDelete any items
that are not applicable to this\nPR.\\r\\n\\r\\n- [ ] [Unit
or\nfunctional\\r\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\r\\nwere\nupdated
or added to match the most
common\nscenarios\",\"sha\":\"0a4081e1d81eb980998585144c85ac8fbd078f8c\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[\"8.14\"],\"targetPullRequestStates\":[{\"branch\":\"8.14\",\"label\":\"v8.14.0\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"},{\"branch\":\"main\",\"label\":\"v8.15.0\",\"branchLabelMappingKey\":\"^v8.15.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/181350\",\"number\":181350,\"mergeCommit\":{\"message\":\"[Search]\nAdds
telemetry warning rules and fixes a bunch of telemetry
issues\n(#181350)\\n\\n## Summary\\r\\n\\r\\nEnables telemetry warning
eslint\nrule.\\r\\n\\r\\nFixes a bunch of missing telemetry
strings.\\r\\n\\r\\n\\r\\n###\nChecklist\\r\\n\\r\\nDelete any items
that are not applicable to this\nPR.\\r\\n\\r\\n- [ ] [Unit
or\nfunctional\\r\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\r\\nwere\nupdated
or added to match the most
common\nscenarios\",\"sha\":\"0a4081e1d81eb980998585144c85ac8fbd078f8c\"}}]}]\nBACKPORT-->\n\nCo-authored-by:
Efe Gürkan YALAMAN
<efeguerkan.yalaman@elastic.co>"}},{"branch":"main","label":"v8.15.0","labelRegex":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/181350","number":181350,"mergeCommit":{"message":"[Search]
Adds telemetry warning rules and fixes a bunch of telemetry issues
(#181350)\n\n## Summary\r\n\r\nEnables telemetry warning eslint
rule.\r\n\r\nFixes a bunch of missing telemetry strings.\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"0a4081e1d81eb980998585144c85ac8fbd078f8c"}}]}]
BACKPORT-->
  • Loading branch information
efegurkan authored Apr 25, 2024
1 parent c6b71de commit d5ee80d
Show file tree
Hide file tree
Showing 12 changed files with 98 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ export const AttachIndexBox: React.FC<AttachIndexBoxProps> = ({ connector }) =>
<EuiFlexGroup>
<EuiFlexItem grow={false}>
<EuiButton
data-test-subj="entSearchContent-connector-connectorDetail-saveConfigurationButton"
data-telemetry-id="entSearchContent-connector-connectorDetail-saveConfigurationButton"
onClick={() => onSave()}
disabled={!selectedIndex || selectedIndex.label === connector.index_name}
isLoading={isSaveLoading}
Expand Down Expand Up @@ -286,6 +288,8 @@ export const AttachIndexBox: React.FC<AttachIndexBoxProps> = ({ connector }) =>
<EuiFlexGroup justifyContent="center">
<EuiFlexItem grow={false}>
<EuiButton
data-telemetry-id="entSearchContent-connector-connectorDetail-createAttachIndexButton"
data-test-subj="entSearchContent-connector-connectorDetail-createAttachIndexButton"
iconType="sparkles"
color="primary"
fill
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,12 @@ export const ConnectorConfiguration: React.FC = () => {
</EuiText>
</EuiFlexItem>
<EuiFlexItem>
<EuiLink href={docLinks.connectors} target="_blank">
<EuiLink
data-test-subj="entSearchContent-connector-configuration-connectorDocumentationLink"
data-telemetry-id="entSearchContent-connector-configuration-connectorDocumentationLink"
href={docLinks.connectors}
target="_blank"
>
{i18n.translate(
'xpack.enterpriseSearch.content.connector_detail.configurationConnector.support.viewDocumentation.label',
{
Expand All @@ -375,6 +380,8 @@ export const ConnectorConfiguration: React.FC = () => {
</EuiFlexItem>
<EuiFlexItem>
<EuiLink
data-test-subj="entSearchContent-connector-configuration-readmeLink"
data-telemetry-id="entSearchContent-connector-configuration-readmeLink"
href="https://github.com/elastic/connectors-python/blob/main/README.md"
target="_blank"
>
Expand All @@ -388,7 +395,12 @@ export const ConnectorConfiguration: React.FC = () => {
</EuiFlexItem>
{docsUrl && (
<EuiFlexItem>
<EuiLink href={docsUrl} target="_blank">
<EuiLink
data-test-subj="entSearchContent-connector-configuration-deployWithDockerLink"
data-telemetry-id="entSearchContent-connector-configuration-deployWithDockerLink"
href={docsUrl}
target="_blank"
>
{i18n.translate(
'xpack.enterpriseSearch.content.connector_detail.configurationConnector.support.dockerDeploy.label',
{
Expand All @@ -400,6 +412,8 @@ export const ConnectorConfiguration: React.FC = () => {
)}
<EuiFlexItem>
<EuiLink
data-test-subj="entSearchContent-connector-configuration-deployWithoutDockerLink"
data-telemetry-id="entSearchContent-connector-configuration-deployWithoutDockerLink"
href="https://github.com/elastic/connectors-python/blob/main/docs/CONFIG.md#run-the-connector-service-for-a-custom-connector"
target="_blank"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ export const ConnectorStats: React.FC<ConnectorStatsProps> = ({ connector, index
</EuiFlexItem>
<EuiFlexItem>
<StatCard
title="Index"
title={i18n.translate('xpack.enterpriseSearch.connectors.connectorStats.indexTitle', {
defaultMessage: 'Index',
})}
content={
connector.index_name ? (
indexData ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,12 @@ export const NativeConnectorConfiguration: React.FC = () => {
}
)}
<EuiSpacer size="s" />
<EuiLink href={docLinks.documentLevelSecurity} target="_blank">
<EuiLink
data-test-subj="entSearchContent-connectorDetail-documentLevelSecurityLink"
data-telemetry-id="entSearchContent-connectorDetail-documentLevelSecurityLink"
href={docLinks.documentLevelSecurity}
target="_blank"
>
{i18n.translate(
'xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.securityReminder.securityLinkLabel',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,12 @@ export const ConnectorDetailOverview: React.FC = () => {
defaultMessage="Convert it to a {link}, to be self-managed on your own infrastructure. Native connectors are available only in your Elastic Cloud deployment."
values={{
link: (
<EuiLink href={docLinks.buildConnector} target="_blank">
<EuiLink
data-test-subj="entSearchContent-connectorDetailOverview-nativeCloudCallout-connectorClientLink"
data-telemetry-id="entSearchContent-connectorDetailOverview-nativeCloudCallout-connectorClientLink"
href={docLinks.buildConnector}
target="_blank"
>
{i18n.translate(
'xpack.enterpriseSearch.content.connectors.overview.nativeCloudCallout.connectorClient',
{ defaultMessage: 'connector client' }
Expand All @@ -161,7 +166,12 @@ export const ConnectorDetailOverview: React.FC = () => {
</p>
</EuiText>
<EuiSpacer size="s" />
<EuiButton color="warning" fill onClick={() => showModal()}>
<EuiButton
data-test-subj="entSearchContent-connectorDetailOverview-nativeCloudCallout-convertToSelfManagedClientButton"
color="warning"
fill
onClick={() => showModal()}
>
{i18n.translate(
'xpack.enterpriseSearch.content.indices.connectors.overview.convertConnector.buttonLabel',
{ defaultMessage: 'Convert connector' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ export const Connectors: React.FC<ConnectorsProps> = ({ isCrawler }) => {
<EuiFlexGroup gutterSize="xs">
<EuiFlexItem>
<EuiButton
data-test-subj="entSearchContent-connectors-newConnectorButton"
data-telemetry-id="entSearchContent-connectors-newConnectorButton"
key="newConnector"
color="primary"
iconType="plusInCircle"
Expand All @@ -128,6 +130,8 @@ export const Connectors: React.FC<ConnectorsProps> = ({ isCrawler }) => {
closePopover={() => setShowMoreOptionsPopover(false)}
button={
<EuiButtonIcon
data-test-subj="entSearchContent-connectors-newConnector-moreOptionsButton"
data-telemetry-id="entSearchContent-connectors-newConnector-moreOptionsButton"
color="primary"
display="fill"
size="m"
Expand Down Expand Up @@ -199,6 +203,8 @@ export const Connectors: React.FC<ConnectorsProps> = ({ isCrawler }) => {
]
: [
<EuiButton
data-test-subj="entSearchContent-crawlers-newCrawlerButton"
data-telemetry-id="entSearchContent-crawlers-newCrawlerButton"
disabled={Boolean(errorConnectingMessage)}
key="newCrawler"
color="primary"
Expand All @@ -216,7 +222,8 @@ export const Connectors: React.FC<ConnectorsProps> = ({ isCrawler }) => {
? [
<EuiButton
color="primary"
data-test-subj="entSearchContent-searchIndices-defaultSettings"
data-test-subj="entSearchContent-connectors-defaultSettingsPopover"
data-telemetry-id="entSearchContent-connectors-defaultSettingsPopover"
onClick={() => setShowDefaultSettingsFlyout(true)}
>
{i18n.translate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ export const CrawlerEmptyState: React.FC = () => {
}
actions={
<EuiButton
data-test-subj="entSearchContent-crawlers-emptyState-createCrawlerButton"
data-telemetry-id="entSearchContent-crawlers-emptyState-createCrawlerButton"
color="primary"
disabled={Boolean(errorConnectingMessage)}
fill
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,21 +134,19 @@ export const DeleteConnectorModal: React.FC<DeleteConnectorModalProps> = ({ isCr
</p>
<p>
{isCrawler && (
<>
<EuiText>
<FormattedMessage
id="xpack.enterpriseSearch.deleteConnectorModal.crawler.warning"
defaultMessage="Deleting this crawler will also delete its related index with all of its data and its Crawler configuration. Any associated search applications will no longer be able to access any data stored in this index. This action cannot be undone. Please type {connectorName} to confirm."
values={{
connectorName: (
<strong>
<EuiTextColor color="danger">{connectorName}</EuiTextColor>
</strong>
),
}}
/>
</EuiText>
</>
<EuiText>
<FormattedMessage
id="xpack.enterpriseSearch.deleteConnectorModal.crawler.warning"
defaultMessage="Deleting this crawler will also delete its related index with all of its data and its Crawler configuration. Any associated search applications will no longer be able to access any data stored in this index. This action cannot be undone. Please type {connectorName} to confirm."
values={{
connectorName: (
<strong>
<EuiTextColor color="danger">{connectorName}</EuiTextColor>
</strong>
),
}}
/>
</EuiText>
)}
{!isCrawler && (
<EuiText>
Expand Down Expand Up @@ -199,13 +197,13 @@ export const DeleteConnectorModal: React.FC<DeleteConnectorModalProps> = ({ isCr
}
>
<EuiFieldText
data-test-subj="entSearchContent-connectors-deleteModal-input"
data-telemetry-id="entSearchContent-connectors-deleteModal-input"
onChange={(e) => setInputConnectorName(e.target.value)}
value={inputConnectorName}
/>
</EuiFormRow>
</EuiForm>
</EuiConfirmModal>
) : (
<></>
);
) : null;
};
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ export const ConnectorCheckable: React.FC<ConnectorCheckableProps> = ({
<PlatinumLicensePopover
button={
<EuiButtonIcon
data-test-subj="entSearchContent-connectors-selectConnector-licensePopoverButton"
data-telemetry-id="entSearchContent-connectors-selectConnector-licensePopoverButton"
aria-label={i18n.translate(
'xpack.enterpriseSearch.content.newIndex.selectConnector.openPopoverLabel',
{
Expand All @@ -143,6 +145,8 @@ export const ConnectorCheckable: React.FC<ConnectorCheckableProps> = ({
<NativePopover
button={
<EuiButtonIcon
data-test-subj="entSearchContent-connectors-selectConnector-nativeInfoPopoverButton"
data-telemetry-id="entSearchContent-connectors-selectConnector-nativeInfoPopoverButton"
aria-label={i18n.translate(
'xpack.enterpriseSearch.content.newIndex.selectConnector.openNativePopoverLabel',
{
Expand All @@ -169,6 +173,8 @@ export const ConnectorCheckable: React.FC<ConnectorCheckableProps> = ({
<EuiPopover
button={
<EuiButtonIcon
data-test-subj="entSearchContent-connectors-selectConnector-nativePopoverButton"
data-telemetry-id="entSearchContent-connectors-selectConnector-nativePopoverButton"
display="base"
color="primary"
iconType="boxesHorizontal"
Expand Down Expand Up @@ -200,8 +206,7 @@ export const ConnectorCheckable: React.FC<ConnectorCheckableProps> = ({
{ defaultMessage: 'Setup a Native Connector' }
)}
</EuiContextMenuItem>,
<EuiSpacer size="s" />,

<EuiSpacer key="spacer" size="s" />,
<EuiContextMenuItem
key="client"
onClick={(e) => {
Expand Down Expand Up @@ -263,7 +268,12 @@ export const ConnectorCheckable: React.FC<ConnectorCheckableProps> = ({
{documentationUrl && (
<EuiFlexItem grow={false}>
<EuiText size="xs">
<EuiLink target="_blank" href={documentationUrl}>
<EuiLink
data-test-subj="entSearchContent-connectors-selectConnector-documentationLink"
data-telemetry-id="entSearchContent-connectors-selectConnector-documentationLink"
target="_blank"
href={documentationUrl}
>
{i18n.translate(
'xpack.enterpriseSearch.content.indices.selectConnector.connectorCheckable.documentationLinkLabel',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ export const NativePopover: React.FC<NativePopoverProps> = ({
<EuiFlexGroup justifyContent="spaceBetween" alignItems="center">
<EuiFlexItem grow={false}>
<EuiButton
data-test-subj="entSearchContent-connectors-nativePopover-trialButton"
data-telemetry-id="entSearchContent-connectors-nativePopover-trialButton"
iconType="popout"
target="_blank"
href="https://www.elastic.co/cloud/cloud-trial-overview"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ export const SelectConnector: React.FC = () => {
</EuiFlexItem>
<EuiFlexItem>
<EuiFieldSearch
data-test-subj="entSearchContent-connectors-selectConnector-searchInput"
data-telemetry-id="entSearchContent-connectors-selectConnector-searchInput"
aria-label={i18n.translate(
'xpack.enterpriseSearch.content.indices.selectConnector.search.ariaLabel',
{ defaultMessage: 'Search through connectors' }
Expand Down Expand Up @@ -368,6 +370,8 @@ export const SelectConnector: React.FC = () => {
/>
</p>
<EuiButton
data-test-subj="entSearchContent-connectors-selectConnector-cloudCallout-trialButton"
data-telemetry-id="entSearchContent-connectors-selectConnector-cloudCallout-trialButton"
color="primary"
fill
href="https://www.elastic.co/cloud/cloud-trial-overview"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@ export const DefaultSettingsFlyout: React.FC<DefaultSettingsFlyoutProps> = ({ cl
defaultMessage="These settings apply to all new Elasticsearch indices created by Search ingestion mechanisms. For API ingest-based indices, remember to include the pipeline when you ingest documents. These features are powered by {link}"
values={{
link: (
<EuiLink href={docLinks.ingestPipelines} target="_blank">
<EuiLink
data-test-subj="entSearchContent-defaultSettingsFlyout-ingestPipelinesLink"
data-telemetry-id="entSearchContent-defaultSettingsFlyout-ingestPipelinesLink"
href={docLinks.ingestPipelines}
target="_blank"
>
{i18n.translate(
'xpack.enterpriseSearch.defaultSettingsFlyout.body.description.ingestPipelinesLink.link',
{
Expand Down Expand Up @@ -154,7 +159,12 @@ export const DefaultSettingsFlyout: React.FC<DefaultSettingsFlyoutProps> = ({ cl
defaultMessage: 'ML Inference',
})}
link={
<EuiLink href={docLinks.mlDocumentEnrichment} target="_blank">
<EuiLink
data-test-subj="entSearchContent-defaultSettingsFlyout-mlInferenceLink"
data-telemetry-id="entSearchContent-defaultSettingsFlyout-mlInferenceLink"
href={docLinks.mlDocumentEnrichment}
target="_blank"
>
{i18n.translate('xpack.enterpriseSearch.content.settings.mlInference.link', {
defaultMessage: 'Learn more about document enrichment with ML',
})}
Expand Down

0 comments on commit d5ee80d

Please sign in to comment.