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

[O11y][SpringBoot] Add custom field for _id and update dashboard #5935

Conversation

rajvi-patel-22
Copy link
Contributor

@rajvi-patel-22 rajvi-patel-22 commented Apr 20, 2023

  • Enhancement

What does this PR do?

  • Create one custom field spring_boot.audit_events.document_id and copy the value of _id field into spring_boot.audit_events.document_id .
  • Replace _id field with spring_boot.audit_events.document_id in d.ashboard.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

Screenshots

3892080395-image

Related Issues

Note When user will upgrade to the newer version, spring_boot.audit_events.document_id field will be added only to the new incoming documents. The data that is already present in indices will not get updated. Hence, the Audit Events [Logs Spring Boot] visualization will show documents which have spring_boot.audit_events.document_id field present (documents that have been ingested after upgrading to the latest version).

By default, the Include empty row property is disabled till 8.1.0. But in later version of Kibana the empty rows are displayed if this property is not configured and because of that the visualization shows multiple empty rows. To avoid this and to keep the panel functionality intact we have migrated to 8.2.0.

Behavior of panel in 8.2.0 and later version without configuration:
image

Behavior of panel in 8.2.0 and later version with configuration:
image

@rajvi-patel-22 rajvi-patel-22 requested a review from a team as a code owner April 20, 2023 05:11
@elasticmachine
Copy link

elasticmachine commented Apr 20, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-04-25T06:54:11.053+0000

  • Duration: 18 min 10 sec

Test stats 🧪

Test Results
Failed 0
Passed 33
Skipped 0
Total 33

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link

elasticmachine commented Apr 20, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (2/2) 💚
Files 100.0% (2/2) 💚
Classes 100.0% (2/2) 💚
Methods 100.0% (27/27) 💚 27.778
Lines 93.464% (143/153) 👍 15.686
Conditionals 100.0% (0/0) 💚

@kush-elastic kush-elastic requested a review from agithomas April 24, 2023 11:00

1. Stop the data stream by going to `Integrations -> Spring Boot -> Integration policies` open the configuration of Spring Boot and disable the `Spring Boot Audit Events metrics` toggle to reindex ``audit_events`` data stream and save the integration.

2. Perform the following steps in the Dev tools.
Copy link
Contributor

Choose a reason for hiding this comment

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

For steps 2 , 4, 7 mention what is the goal of the step before the phrase - Perform the following steps in Dev Tools..

@agithomas agithomas requested a review from a team April 24, 2023 11:48
Copy link
Contributor

@agithomas agithomas left a comment

Choose a reason for hiding this comment

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

LGTM!

Approving based on the discussion with the product team that - it is Ok not to show _id field values for old records , reindexing can be recommended in case the user wish to see the old information following the change (adoption of document_id) as the new field to store the values presently stored under _id.

@rajvi-elastic , please complete the peer review additionally

cc @SubhrataK

@rajvi-patel-22
Copy link
Contributor Author

@agithomas, We have created issue (elastic/kibana#155344) to add support for meta fields. Should we wait for the Kibana team response or should we merge this PR?

@agithomas
Copy link
Contributor

@agithomas, We have created issue (elastic/kibana#155344) to add support for meta fields. Should we wait for the Kibana team response or should we merge this PR?

@lalit-satapathy , the above mentioned issue is created based on your request. Should this be a blocker ?

@elasticmachine
Copy link

Package spring_boot - 0.9.0 containing this change is available at https://epr.elastic.co/search?package=spring_boot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants