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

[Logs+] Enforce dataset names #163830

Closed
Kerry350 opened this issue Aug 14, 2023 · 1 comment · Fixed by #166654
Closed

[Logs+] Enforce dataset names #163830

Kerry350 opened this issue Aug 14, 2023 · 1 comment · Fixed by #166654
Assignees
Labels
Feature:Logs Onboarding Logs Onboarding feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v8.11.0

Comments

@Kerry350
Copy link
Contributor

Kerry350 commented Aug 14, 2023

Summary

With the introduction of #160777 we are able to create basic custom integrations.

Currently the dataset name is always prefixed with the integration name. We want to adjust this logic so that the dataset name always adheres to some rules.

Ideally #163788 should be implemented first, so that all of this logic is hidden away in the package.

ACs

  • Generating the entries no longer hardcodes the integration name prefix
  • The custom integrations API has server side validation for the dataset name that allows two options:
    • A dataset name that is exactly the same as the integration name (e.g. given an integration name of server_logs, the dataset name could be server_logs).
    • A dataset name that is the integration name and a period plus a custom dataset suffix (e.g. given an integration name of server_logs and a dataset suffix of errors, server_logs.errors would be valid).
  • When a custom suffix is not supplied we default automatically to matching the integration name exactly (as in, callers of the API will default to this).
  • Locations that call the API (currently only the Observability Onboarding plugin) ensure that the user is always aware of what the "final" dataset will be. E.g. in the UI we will tell the user that the integration name will be used automatically, or that their suffix will be prefixed with the integration name. There should be no surprises with the prefix.
  • Should also be backed by client side validation to save a trip to the server.
@Kerry350 Kerry350 added Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v8.11.0 labels Aug 14, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI)

@Kerry350 Kerry350 changed the title [Logs+] Enforce prefixed dataset names [Logs+] Enforce dataset names Aug 14, 2023
@Kerry350 Kerry350 self-assigned this Sep 13, 2023
Kerry350 added a commit that referenced this issue Sep 21, 2023
## Summary

Closes #163830

This adds server side validation to enforce dataset name format rules
for custom integrations. It then enhances the custom integrations Kibana
package to handle this seamlessly in the create form.

There is no client side validation for the rules per se because as long
as the dataset name passes other validations (length etc) then it is
always valid - it just comes down to whether it's prefixed or not.

## Other notes

- Added a "fields pipeline" to improve the readability of the context
update.

## UI / UX changes

- Users are informed when a prefix will be added.

<img width="886" alt="Screenshot 2023-09-20 at 13 19 49"
src="https://github.com/elastic/kibana/assets/471693/764d2bd0-03ef-40ce-8dae-107079c15feb">

- If the integration name has been touched, and the dataset name is
untouched, the dataset name will automatically match the integration
name.


![matching](https://github.com/elastic/kibana/assets/471693/b72604c0-23f9-4ff1-8db7-9b6c523b36c6)

---------

Co-authored-by: Kibana Machine <[email protected]>
@gbamparop gbamparop added Feature:Logs Onboarding Logs Onboarding feature and removed Feature:Logs UI Logs UI feature labels Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Logs Onboarding Logs Onboarding feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v8.11.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants