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] Change logic to identify integrations #198692

Conversation

achyutjhunjhunwala
Copy link
Contributor

@achyutjhunjhunwala achyutjhunjhunwala commented Nov 1, 2024

Summary

What has changed ?

Previously

  1. The state machine would load Dataset Settings. This is done by calling the Settings Endpoint which would get the Integration Name from the _meta tag present in ES DataStream Endpoint.
  2. Then with this Integration Name, parallel call to load both Integration and Integration Dashboards will be done.

This process of getting Integration Name from _meta tag was not reliable hence required change

Currently

  1. Introduced a new top level state which would call the integration/check endpoint. What this endpoint does is
  • Call the datastream endpoint to check for 3 things and all 3 must be true - GET _data_stream/logs-apm.app.adservice-default
    • _meta.managed:true Check if the DS is managed or not.
    • extract the template value and check if to have type and dataset set as part of DSNS naming convention
    • check the template value to starts with the DS name
  • If the above evaluates to true, use the index template to query the Index Template endpoint - GET _index_template/logs-apm.app@template
  • if the above checks result in true, get all integrations and filter the integration by dataset name derived from the datastream name originally passed and return the that particular integration.
  1. The above API still checks for meta field for Integration name, if its finds that, it simply returns the Integrations. Else the api would check based on the logic above and then load integration. If its integration, load it and then call the function to load integration dashboards.

  2. APM App is not an integration. Its a special package with all assets

What's pending ?

  • A new API was added, hence a new Deployment Agnostic Test
  • FTR Stateful test
  • FTR Serverless test

Any Screenshots ?

The logs-apm.app.*-* data stream now shows Fix It Flow with option to increase field limit for Users with proper rights

image

Want to run this locally?

Synthtrace CLI is a bit problematic to generate data for this scenario - #199280

  1. Start the FTR Server, (stateful or serverless)
  2. Go to degraded_field_flyout.ts file,
  3. comment out the after block at the end
  4. replace any of the it with it.only in the last describe block of this page.
  5. Once the test execution has completed, you will have an environment running at port 5620

@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Nov 19, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@weltenwort
Copy link
Member

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#7429

[✅] x-pack/test_serverless/functional/test_suites/observability/config.ts: 25/25 tests passed.

see run history

Copy link
Contributor

@tonyghiani tonyghiani left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for applying the suggestions I left, in particular the work to optimize the integration retrieval 👏

@weltenwort
Copy link
Member

@elasticmachine merge upstream

@elasticmachine elasticmachine requested a review from a team as a code owner November 22, 2024 10:21
@weltenwort
Copy link
Member

@elasticmachine merge upstream

Copy link
Contributor

@cauemarcondes cauemarcondes left a comment

Choose a reason for hiding this comment

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

LGTM

@elasticmachine
Copy link
Contributor

elasticmachine commented Dec 2, 2024

💚 Build Succeeded

  • Buildkite Build
  • Commit: cd42ce6
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-198692-cd42ce665bd7

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
fleet 1306 1309 +3

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
dataQuality 28.4KB 28.4KB +50.0B
datasetQuality 250.7KB 252.0KB +1.3KB
total +1.4KB
Unknown metric groups

API count

id before after diff
fleet 1432 1435 +3

History

cc @weltenwort @achyutjhunjhunwala

@weltenwort weltenwort merged commit 86a0444 into elastic:main Dec 2, 2024
8 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12125764819

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 2, 2024
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Felix Stürmer <felix.stuermer@elastic.co>
(cherry picked from commit 86a0444)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Dec 2, 2024
… (#202565)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Dataset Quality] Change logic to identify integrations
(#198692)](#198692)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Achyut
Jhunjhunwala","email":"achyut.jhunjhunwala@elastic.co"},"sourceCommit":{"committedDate":"2024-12-02T18:37:31Z","message":"[Dataset
Quality] Change logic to identify integrations
(#198692)\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\r\nCo-authored-by: Felix
Stürmer
<felix.stuermer@elastic.co>","sha":"86a044484d75595ac0d86feb8cd597d3e0e4fee1","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-logs","Feature:Dataset
Health"],"title":"[Dataset Quality] Change logic to identify
integrations","number":198692,"url":"https://github.com/elastic/kibana/pull/198692","mergeCommit":{"message":"[Dataset
Quality] Change logic to identify integrations
(#198692)\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\r\nCo-authored-by: Felix
Stürmer
<felix.stuermer@elastic.co>","sha":"86a044484d75595ac0d86feb8cd597d3e0e4fee1"}},"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/198692","number":198692,"mergeCommit":{"message":"[Dataset
Quality] Change logic to identify integrations
(#198692)\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\r\nCo-authored-by: Felix
Stürmer
<felix.stuermer@elastic.co>","sha":"86a044484d75595ac0d86feb8cd597d3e0e4fee1"}}]}]
BACKPORT-->

Co-authored-by: Achyut Jhunjhunwala <achyut.jhunjhunwala@elastic.co>
hop-dev pushed a commit to hop-dev/kibana that referenced this pull request Dec 5, 2024
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Felix Stürmer <felix.stuermer@elastic.co>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 9, 2024
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Felix Stürmer <felix.stuermer@elastic.co>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Felix Stürmer <felix.stuermer@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) ci:project-deploy-observability Create an Observability project Feature:Dataset Health release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team Team:obs-ux-logs Observability Logs User Experience Team v8.18.0 v9.0.0
Projects
None yet
8 participants