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

[Dataset quality] Support failure store #199806

Closed

Conversation

yngrdyn
Copy link
Contributor

@yngrdyn yngrdyn commented Nov 12, 2024

Closes https://github.com/elastic/logs-dev/issues/183 and https://github.com/elastic/logs-dev/issues/184

Summary

This PR aims to show to the user failed docs % in dataset quality table. The following acceptance criteria items were resolved

Dataset quality page

  • A column for Failed docs is included in the table
  • A tooltip is placed in the title of the column
  • A % of documents inside Failure store is calculated for every dataStream
  • If % is lesser than 0.0001 but greater than 0 we should show ⚠ symbol next to the ~0 value (as we do with degraded docs)
  • Failed docs percentages greater than 0 should link to discover

Dataset details page

  • A metric, Failed docs, is included in the Overview panel under Data set quality. This metric includes the number of documents inside the failure store for the specific dataStream.
  • A tooltip is placed in the title of the Failed docs metric with message: The percentage of docs sent to failure store due to an issue during ingestion.
  • Degraded docs graph section is transformed to Document trends allowing the users to switch between Degraded docs and Failed docs trends over time.
  • A new chart for failed documents is created with links to discover/Logs explorer using the right dataView

🎥 Demo

Screen.Recording.2024-11-12.at.11.53.02.mov

Specific cases

  • Failed documents less than 0.001%
image
  • Quality column is shown after degraded docs and failed docs is loaded (Quality is now calculated using both values)
Screen.Recording.2024-11-18.at.15.55.05.mov
Screen.Recording.2024-11-18.at.16.01.03.mov
  • Users can still see Quality even when they don't have access to stats or something went wrong with that endpoint
Screen.Recording.2024-11-18.at.16.02.47.mov
  • The selected chart is kept in the URL
Screen.Recording.2024-11-19.at.16.57.54.mov

Missing

The following acceptance criteria are missing

  • Failed docs percentages greater than 0 should link to discover
  • A new chart for failed documents is created with links to discover/Logs explorer using the right dataView

because es changes are not finalised

@elasticmachine
Copy link
Contributor

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!

@yngrdyn yngrdyn self-assigned this Nov 12, 2024
@yngrdyn
Copy link
Contributor Author

yngrdyn commented Nov 12, 2024

/ci

@@ -26,7 +26,7 @@ export const NONE = 'none';
export const DEFAULT_TIME_RANGE = { from: 'now-24h', to: 'now' };
export const DEFAULT_DATEPICKER_REFRESH = { value: 60000, pause: false };

export const DEFAULT_DEGRADED_DOCS = {
export const DEFAULT_QUALITY_DOC_STATS = {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note

This is now reused by degradedDocs and failedDocs.

};

return new DataStreamStat(dataStreamStatProps);
}

public static fromDegradedDocStat({
public static fromQualityStats({
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note

We can extend this method with more qualityStats and construct a Dataset from them

@@ -40,7 +40,7 @@ export const indexNameToDataStreamParts = (dataStreamName: string) => {
};

export const extractIndexNameFromBackingIndex = (indexString: string): string => {
const pattern = /.ds-(.*?)-[0-9]{4}\.[0-9]{2}\.[0-9]{2}-[0-9]{6}/;
const pattern = /.(?:ds|fs)-(.*?)-[0-9]{4}\.[0-9]{2}\.[0-9]{2}-[0-9]{6}/;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Important

Failure store is at the moment a backing index that starts with .fs

@yngrdyn
Copy link
Contributor Author

yngrdyn commented Nov 12, 2024

@mdbirnstiehl I need some help from your side

  1. The tooltip for the quality column should now tell the users that quality is calculated by degradedDocs and failedDocs percentages. I came up with
image
  1. How can we explain users what is a Failed doc? I came up with
image
  1. In the summary we should also reference the new calculation of quality (DegradedDocs and failedDocs)
image

const datasetsQuality = {
percentages: filteredItems.map((item) => item.degradedDocs.percentage),
};
const datasetsQuality = countBy(filteredItems.map((item) => item.quality)) as Record<
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Quality is now part of the dataset, so we don't need this calculation anymore. Instead I just created a map that will hold how many datasets fall into a quality status. e.g.

{
  'poor': 1,
  'degraded': 2,
  'good': 1,
}

@yngrdyn
Copy link
Contributor Author

yngrdyn commented Nov 12, 2024

/ci

@mdbirnstiehl
Copy link
Contributor

mdbirnstiehl commented Nov 12, 2024

@mdbirnstiehl I need some help from your side

  1. The tooltip for the quality column should now tell the users that quality is calculated by degradedDocs and failedDocs percentages.

This one looks good.

  1. How can we explain users what is a Failed doc? I came up with

I'm not sure if this is exactly how it works, but is there some way we could be more specific here? Like, "Percentage of docs sent to failure store due to an issue during ingestion."

I'm not sure "failure store" itself will be meaningful for users.

  1. In the summary we should also reference the new calculation of quality (DegradedDocs and failedDocs)

This tool tip can probably match the tool tip for the data set quality column in the table.

A side note, maybe this would need to be a different issue, but this heading:
image

Should probably be Data Set Quality, not sets. It also looks like the table column headers are in title case, and should be in sentence case to be consistent with the other pages in Stack Management. For example, "Failed docs" instead of "Failed Docs"

@yngrdyn
Copy link
Contributor Author

yngrdyn commented Nov 12, 2024

I'm not sure if this is exactly how it works, but is there some way we could be more specific here? Like, "Percentage of docs sent to failure store due to an issue during ingestion."

That's exactly how it works 👍🏼

Should probably be Data Set Quality, not sets. It also looks like the table column headers are in title case, and should be in sentence case to be consistent with the other pages in Stack Management. For example, "Failed docs" instead of "Failed Docs"

I'll address those in this PR as well. This is how everything looks now

Screen.Recording.2024-11-12.at.16.42.32.mov

@yngrdyn
Copy link
Contributor Author

yngrdyn commented Nov 12, 2024

/ci

@yngrdyn
Copy link
Contributor Author

yngrdyn commented Nov 13, 2024

/ci

@mohamedhamed-ahmed
Copy link
Contributor

mohamedhamed-ahmed commented Nov 14, 2024

I started testing quickly and got 2 issues:

  1. When I make the failed_docs request fail from the network tab, I still get the results somehow not sure whats happening there but need to take a further look.
Screen.Recording.2024-11-14.at.12.38.24.mov
  1. When I open any dataset I get an error as the mapPercentageToQuality is expecting an array but gets a single value in this case
Screen.Recording.2024-11-14.at.12.39.03.mov

When I make the failed_docs request fail from the network tab, I still get the results somehow not sure whats happening there but need to take a further look.

This works fine you can ignore it, tried it and seems good. Only the other problem is existing

@yngrdyn yngrdyn force-pushed the dataset-quality-support-for-failure-store branch from 41e4f61 to 41d249a Compare November 14, 2024 13:17
Copy link
Contributor

@mohamedhamed-ahmed mohamedhamed-ahmed left a comment

Choose a reason for hiding this comment

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

Did first round of code review and got some small comments

export async function getFailedDocsPaginated(options: {
esClient: ElasticsearchClient;
types: DataStreamType[];
datasetQuery?: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: maybe renam datasetQuery to just datasetNames as its a bit confusing since its not really a query

Copy link
Contributor Author

@yngrdyn yngrdyn Nov 19, 2024

Choose a reason for hiding this comment

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

what do you think about renaming it to indexPattern? or maybe just datasetPattern?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good to me 👍

@yngrdyn yngrdyn force-pushed the dataset-quality-support-for-failure-store branch from 0bb1ac6 to 076cb6c Compare November 26, 2024 16:04
@yngrdyn
Copy link
Contributor Author

yngrdyn commented Nov 26, 2024

/ci

@yngrdyn
Copy link
Contributor Author

yngrdyn commented Nov 26, 2024

/ci

@yngrdyn
Copy link
Contributor Author

yngrdyn commented Nov 26, 2024

/ci

@yngrdyn yngrdyn force-pushed the dataset-quality-support-for-failure-store branch from a33ca8f to f10abac Compare November 26, 2024 19:55
@yngrdyn
Copy link
Contributor Author

yngrdyn commented Nov 26, 2024

/ci

@yngrdyn yngrdyn force-pushed the dataset-quality-support-for-failure-store branch from 45e0213 to 895110f Compare November 27, 2024 13:11
@yngrdyn
Copy link
Contributor Author

yngrdyn commented Nov 27, 2024

/ci

@elasticmachine
Copy link
Contributor

💔 Build Failed

Failed CI Steps

History

cc @yngrdyn

@yngrdyn yngrdyn closed this Jan 15, 2025
yngrdyn added a commit that referenced this pull request Jan 23, 2025
Closes elastic/logs-dev#183,
elastic/logs-dev#184 and
elastic/logs-dev#185.

## Summary
This PR aims to support failure store in dataset quality page. The
following acceptance criteria items were resolved

### Dataset quality page
- [x] A column for Failed docs is included in the table
- [x] A tooltip is placed in the title of the column
- [x] A % of documents inside Failure store is calculated for every
dataStream
- [x] If % is lesser than 0.0001 but greater than 0 we should show ⚠
symbol next to the ~0 value (as we do with degraded docs)
- [x] Failed docs percentages greater than 0 should link to discover

 🎥 Demo 


https://github.com/user-attachments/assets/6d9e3f4c-02d9-43ab-88cb-ae70716b05d9

### Dataset details page
- [x] A metric, Failed docs, is included in the Overview panel under
Data set quality. This metric includes the number of documents inside
the failure store for the specific dataStream.
- [x] A tooltip is placed in the title of the Failed docs metric with
message: `The percentage of docs sent to failure store due to an issue
during ingestion.`
- [x] Degraded docs graph section is transformed to Document trends
allowing the users to switch between Degraded docs and Failed docs
trends over time.
- [x] A new chart for failed documents is created with links to
discover/Logs explorer using the right dataView

 🎥 Demo 


https://github.com/user-attachments/assets/6a3a1f09-2668-4e83-938e-ecdda798c199

### Failed docs ingestion issue flyout

- [x] Whenever documents are found in failure store we should list
Document indexing failed in Quality issues table
- [x] User should be able to expand Document indexing failed and see
more information in the flyout
- [x] The flyout will show Docs count, an aggregation of the number of
documents inside failure store for the selected timeframe
- [x] The flyout will show Last ocurrence, the datetime registered for
the most recent document in the failure store.
- [x] The flyout will contain a section called Error messages where a
list of unique error messages should be shown, exposing Content (error
message) and Type (Error Type).
- [x] Type should contain a tooltip where message (`Error message
category`) explain users how we are categorising the errors.
- [x] Other issues inside Quality issues table will be appended by field
ignored and the field will be shown in bold.


https://github.com/user-attachments/assets/94dc81f0-9720-4596-b256-c9d289cefd94

Note: This PR was reconstructed from
#199806 which it supersedes.

## How to test

1. Execute `failed_logs` synthtrace scenario
2. Open dataset quality page

## Follow ups
- Enable in serverless
- Deployment agnostic tests cannot be added until we enable this in
serverless
- FTR tests will be added as part of
elastic/logs-dev#182

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
yngrdyn added a commit to yngrdyn/kibana that referenced this pull request Jan 23, 2025
Closes elastic/logs-dev#183,
elastic/logs-dev#184 and
elastic/logs-dev#185.

## Summary
This PR aims to support failure store in dataset quality page. The
following acceptance criteria items were resolved

### Dataset quality page
- [x] A column for Failed docs is included in the table
- [x] A tooltip is placed in the title of the column
- [x] A % of documents inside Failure store is calculated for every
dataStream
- [x] If % is lesser than 0.0001 but greater than 0 we should show ⚠
symbol next to the ~0 value (as we do with degraded docs)
- [x] Failed docs percentages greater than 0 should link to discover

 🎥 Demo

https://github.com/user-attachments/assets/6d9e3f4c-02d9-43ab-88cb-ae70716b05d9

### Dataset details page
- [x] A metric, Failed docs, is included in the Overview panel under
Data set quality. This metric includes the number of documents inside
the failure store for the specific dataStream.
- [x] A tooltip is placed in the title of the Failed docs metric with
message: `The percentage of docs sent to failure store due to an issue
during ingestion.`
- [x] Degraded docs graph section is transformed to Document trends
allowing the users to switch between Degraded docs and Failed docs
trends over time.
- [x] A new chart for failed documents is created with links to
discover/Logs explorer using the right dataView

 🎥 Demo

https://github.com/user-attachments/assets/6a3a1f09-2668-4e83-938e-ecdda798c199

### Failed docs ingestion issue flyout

- [x] Whenever documents are found in failure store we should list
Document indexing failed in Quality issues table
- [x] User should be able to expand Document indexing failed and see
more information in the flyout
- [x] The flyout will show Docs count, an aggregation of the number of
documents inside failure store for the selected timeframe
- [x] The flyout will show Last ocurrence, the datetime registered for
the most recent document in the failure store.
- [x] The flyout will contain a section called Error messages where a
list of unique error messages should be shown, exposing Content (error
message) and Type (Error Type).
- [x] Type should contain a tooltip where message (`Error message
category`) explain users how we are categorising the errors.
- [x] Other issues inside Quality issues table will be appended by field
ignored and the field will be shown in bold.

https://github.com/user-attachments/assets/94dc81f0-9720-4596-b256-c9d289cefd94

Note: This PR was reconstructed from
elastic#199806 which it supersedes.

## How to test

1. Execute `failed_logs` synthtrace scenario
2. Open dataset quality page

## Follow ups
- Enable in serverless
- Deployment agnostic tests cannot be added until we enable this in
serverless
- FTR tests will be added as part of
elastic/logs-dev#182

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 511f77c)

# Conflicts:
#	x-pack/platform/plugins/shared/dataset_quality/public/components/dataset_quality_details/overview/document_trends/degraded_docs/index.tsx
#	x-pack/platform/plugins/shared/dataset_quality/public/components/dataset_quality_details/overview/summary/panel.tsx
#	x-pack/platform/plugins/shared/dataset_quality/public/components/dataset_quality_details/quality_issue_flyout/degraded_field/field_info.tsx
#	x-pack/platform/plugins/shared/dataset_quality/public/components/dataset_quality_details/quality_issue_flyout/index.tsx
#	x-pack/platform/plugins/shared/dataset_quality/public/hooks/use_redirect_link.ts
yngrdyn added a commit that referenced this pull request Jan 23, 2025
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Dataset quality] Failure store support
(#206758)](#206758)

<!--- Backport version: 9.6.4 -->

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

<!--BACKPORT [{"author":{"name":"Yngrid
Coello","email":"yngrid.coello@elastic.co"},"sourceCommit":{"committedDate":"2025-01-23T08:13:28Z","message":"[Dataset
quality] Failure store support (#206758)\n\nCloses
https://github.com/elastic/logs-dev/issues/183,\nhttps://github.com/elastic/logs-dev/issues/184
and\nhttps://github.com/elastic/logs-dev/issues/185.\n\n## Summary\nThis
PR aims to support failure store in dataset quality page. The\nfollowing
acceptance criteria items were resolved\n\n### Dataset quality page\n-
[x] A column for Failed docs is included in the table\n- [x] A tooltip
is placed in the title of the column\n- [x] A % of documents inside
Failure store is calculated for every\ndataStream\n- [x] If % is lesser
than 0.0001 but greater than 0 we should show ⚠\nsymbol next to the ~0
value (as we do with degraded docs)\n- [x] Failed docs percentages
greater than 0 should link to discover\n\n 🎥 Demo
\n\n\nhttps://github.com/user-attachments/assets/6d9e3f4c-02d9-43ab-88cb-ae70716b05d9\n\n###
Dataset details page\n- [x] A metric, Failed docs, is included in the
Overview panel under\nData set quality. This metric includes the number
of documents inside\nthe failure store for the specific dataStream.\n-
[x] A tooltip is placed in the title of the Failed docs metric
with\nmessage: `The percentage of docs sent to failure store due to an
issue\nduring ingestion.`\n- [x] Degraded docs graph section is
transformed to Document trends\nallowing the users to switch between
Degraded docs and Failed docs\ntrends over time.\n- [x] A new chart for
failed documents is created with links to\ndiscover/Logs explorer using
the right dataView\n\n 🎥 Demo
\n\n\nhttps://github.com/user-attachments/assets/6a3a1f09-2668-4e83-938e-ecdda798c199\n\n###
Failed docs ingestion issue flyout\n\n- [x] Whenever documents are found
in failure store we should list\nDocument indexing failed in Quality
issues table\n- [x] User should be able to expand Document indexing
failed and see\nmore information in the flyout\n- [x] The flyout will
show Docs count, an aggregation of the number of\ndocuments inside
failure store for the selected timeframe\n- [x] The flyout will show
Last ocurrence, the datetime registered for\nthe most recent document in
the failure store.\n- [x] The flyout will contain a section called Error
messages where a\nlist of unique error messages should be shown,
exposing Content (error\nmessage) and Type (Error Type).\n- [x] Type
should contain a tooltip where message (`Error message\ncategory`)
explain users how we are categorising the errors.\n- [x] Other issues
inside Quality issues table will be appended by field\nignored and the
field will be shown in
bold.\n\n\nhttps://github.com/user-attachments/assets/94dc81f0-9720-4596-b256-c9d289cefd94\n\nNote:
This PR was reconstructed
from\nhttps://github.com//pull/199806 which it
supersedes.\n\n## How to test\n\n1. Execute `failed_logs` synthtrace
scenario\n2. Open dataset quality page\n\n## Follow ups\n- Enable in
serverless\n- Deployment agnostic tests cannot be added until we enable
this in\nserverless\n- FTR tests will be added as part
of\nhttps://github.com/elastic/logs-dev/issues/182\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"511f77c231b1d0639bd1ebf0987d93317d389d5a","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-infra_services","Feature:Dataset
Health"],"title":"[Dataset quality] Failure store
support","number":206758,"url":"https://github.com/elastic/kibana/pull/206758","mergeCommit":{"message":"[Dataset
quality] Failure store support (#206758)\n\nCloses
https://github.com/elastic/logs-dev/issues/183,\nhttps://github.com/elastic/logs-dev/issues/184
and\nhttps://github.com/elastic/logs-dev/issues/185.\n\n## Summary\nThis
PR aims to support failure store in dataset quality page. The\nfollowing
acceptance criteria items were resolved\n\n### Dataset quality page\n-
[x] A column for Failed docs is included in the table\n- [x] A tooltip
is placed in the title of the column\n- [x] A % of documents inside
Failure store is calculated for every\ndataStream\n- [x] If % is lesser
than 0.0001 but greater than 0 we should show ⚠\nsymbol next to the ~0
value (as we do with degraded docs)\n- [x] Failed docs percentages
greater than 0 should link to discover\n\n 🎥 Demo
\n\n\nhttps://github.com/user-attachments/assets/6d9e3f4c-02d9-43ab-88cb-ae70716b05d9\n\n###
Dataset details page\n- [x] A metric, Failed docs, is included in the
Overview panel under\nData set quality. This metric includes the number
of documents inside\nthe failure store for the specific dataStream.\n-
[x] A tooltip is placed in the title of the Failed docs metric
with\nmessage: `The percentage of docs sent to failure store due to an
issue\nduring ingestion.`\n- [x] Degraded docs graph section is
transformed to Document trends\nallowing the users to switch between
Degraded docs and Failed docs\ntrends over time.\n- [x] A new chart for
failed documents is created with links to\ndiscover/Logs explorer using
the right dataView\n\n 🎥 Demo
\n\n\nhttps://github.com/user-attachments/assets/6a3a1f09-2668-4e83-938e-ecdda798c199\n\n###
Failed docs ingestion issue flyout\n\n- [x] Whenever documents are found
in failure store we should list\nDocument indexing failed in Quality
issues table\n- [x] User should be able to expand Document indexing
failed and see\nmore information in the flyout\n- [x] The flyout will
show Docs count, an aggregation of the number of\ndocuments inside
failure store for the selected timeframe\n- [x] The flyout will show
Last ocurrence, the datetime registered for\nthe most recent document in
the failure store.\n- [x] The flyout will contain a section called Error
messages where a\nlist of unique error messages should be shown,
exposing Content (error\nmessage) and Type (Error Type).\n- [x] Type
should contain a tooltip where message (`Error message\ncategory`)
explain users how we are categorising the errors.\n- [x] Other issues
inside Quality issues table will be appended by field\nignored and the
field will be shown in
bold.\n\n\nhttps://github.com/user-attachments/assets/94dc81f0-9720-4596-b256-c9d289cefd94\n\nNote:
This PR was reconstructed
from\nhttps://github.com//pull/199806 which it
supersedes.\n\n## How to test\n\n1. Execute `failed_logs` synthtrace
scenario\n2. Open dataset quality page\n\n## Follow ups\n- Enable in
serverless\n- Deployment agnostic tests cannot be added until we enable
this in\nserverless\n- FTR tests will be added as part
of\nhttps://github.com/elastic/logs-dev/issues/182\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"511f77c231b1d0639bd1ebf0987d93317d389d5a"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/206758","number":206758,"mergeCommit":{"message":"[Dataset
quality] Failure store support (#206758)\n\nCloses
https://github.com/elastic/logs-dev/issues/183,\nhttps://github.com/elastic/logs-dev/issues/184
and\nhttps://github.com/elastic/logs-dev/issues/185.\n\n## Summary\nThis
PR aims to support failure store in dataset quality page. The\nfollowing
acceptance criteria items were resolved\n\n### Dataset quality page\n-
[x] A column for Failed docs is included in the table\n- [x] A tooltip
is placed in the title of the column\n- [x] A % of documents inside
Failure store is calculated for every\ndataStream\n- [x] If % is lesser
than 0.0001 but greater than 0 we should show ⚠\nsymbol next to the ~0
value (as we do with degraded docs)\n- [x] Failed docs percentages
greater than 0 should link to discover\n\n 🎥 Demo
\n\n\nhttps://github.com/user-attachments/assets/6d9e3f4c-02d9-43ab-88cb-ae70716b05d9\n\n###
Dataset details page\n- [x] A metric, Failed docs, is included in the
Overview panel under\nData set quality. This metric includes the number
of documents inside\nthe failure store for the specific dataStream.\n-
[x] A tooltip is placed in the title of the Failed docs metric
with\nmessage: `The percentage of docs sent to failure store due to an
issue\nduring ingestion.`\n- [x] Degraded docs graph section is
transformed to Document trends\nallowing the users to switch between
Degraded docs and Failed docs\ntrends over time.\n- [x] A new chart for
failed documents is created with links to\ndiscover/Logs explorer using
the right dataView\n\n 🎥 Demo
\n\n\nhttps://github.com/user-attachments/assets/6a3a1f09-2668-4e83-938e-ecdda798c199\n\n###
Failed docs ingestion issue flyout\n\n- [x] Whenever documents are found
in failure store we should list\nDocument indexing failed in Quality
issues table\n- [x] User should be able to expand Document indexing
failed and see\nmore information in the flyout\n- [x] The flyout will
show Docs count, an aggregation of the number of\ndocuments inside
failure store for the selected timeframe\n- [x] The flyout will show
Last ocurrence, the datetime registered for\nthe most recent document in
the failure store.\n- [x] The flyout will contain a section called Error
messages where a\nlist of unique error messages should be shown,
exposing Content (error\nmessage) and Type (Error Type).\n- [x] Type
should contain a tooltip where message (`Error message\ncategory`)
explain users how we are categorising the errors.\n- [x] Other issues
inside Quality issues table will be appended by field\nignored and the
field will be shown in
bold.\n\n\nhttps://github.com/user-attachments/assets/94dc81f0-9720-4596-b256-c9d289cefd94\n\nNote:
This PR was reconstructed
from\nhttps://github.com//pull/199806 which it
supersedes.\n\n## How to test\n\n1. Execute `failed_logs` synthtrace
scenario\n2. Open dataset quality page\n\n## Follow ups\n- Enable in
serverless\n- Deployment agnostic tests cannot be added until we enable
this in\nserverless\n- FTR tests will be added as part
of\nhttps://github.com/elastic/logs-dev/issues/182\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"511f77c231b1d0639bd1ebf0987d93317d389d5a"}}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
viduni94 pushed a commit to viduni94/kibana that referenced this pull request Jan 23, 2025
Closes elastic/logs-dev#183,
elastic/logs-dev#184 and
elastic/logs-dev#185.

## Summary
This PR aims to support failure store in dataset quality page. The
following acceptance criteria items were resolved

### Dataset quality page
- [x] A column for Failed docs is included in the table
- [x] A tooltip is placed in the title of the column
- [x] A % of documents inside Failure store is calculated for every
dataStream
- [x] If % is lesser than 0.0001 but greater than 0 we should show ⚠
symbol next to the ~0 value (as we do with degraded docs)
- [x] Failed docs percentages greater than 0 should link to discover

 🎥 Demo 


https://github.com/user-attachments/assets/6d9e3f4c-02d9-43ab-88cb-ae70716b05d9

### Dataset details page
- [x] A metric, Failed docs, is included in the Overview panel under
Data set quality. This metric includes the number of documents inside
the failure store for the specific dataStream.
- [x] A tooltip is placed in the title of the Failed docs metric with
message: `The percentage of docs sent to failure store due to an issue
during ingestion.`
- [x] Degraded docs graph section is transformed to Document trends
allowing the users to switch between Degraded docs and Failed docs
trends over time.
- [x] A new chart for failed documents is created with links to
discover/Logs explorer using the right dataView

 🎥 Demo 


https://github.com/user-attachments/assets/6a3a1f09-2668-4e83-938e-ecdda798c199

### Failed docs ingestion issue flyout

- [x] Whenever documents are found in failure store we should list
Document indexing failed in Quality issues table
- [x] User should be able to expand Document indexing failed and see
more information in the flyout
- [x] The flyout will show Docs count, an aggregation of the number of
documents inside failure store for the selected timeframe
- [x] The flyout will show Last ocurrence, the datetime registered for
the most recent document in the failure store.
- [x] The flyout will contain a section called Error messages where a
list of unique error messages should be shown, exposing Content (error
message) and Type (Error Type).
- [x] Type should contain a tooltip where message (`Error message
category`) explain users how we are categorising the errors.
- [x] Other issues inside Quality issues table will be appended by field
ignored and the field will be shown in bold.


https://github.com/user-attachments/assets/94dc81f0-9720-4596-b256-c9d289cefd94

Note: This PR was reconstructed from
elastic#199806 which it supersedes.

## How to test

1. Execute `failed_logs` synthtrace scenario
2. Open dataset quality page

## Follow ups
- Enable in serverless
- Deployment agnostic tests cannot be added until we enable this in
serverless
- FTR tests will be added as part of
elastic/logs-dev#182

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants