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

Add support for dimension fields #236

Merged
merged 7 commits into from
Nov 2, 2021
Merged

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Oct 19, 2021

What does this PR do?

  • Add a new dimension parameter to fields, so they can be defined as dimensions for time series data. Dimensions are used to identify time series. For a data stream, events with the same set of dimensions are considered the same time serie. Only keywords, ips and numeric values can be defined as dimensions, this is enforced by the spec.
  • Errors returned by the spec semantic validator for fields include now the file containing the invalid field. This was needed to leverage the current tests (here) but is helpful in any case.

Why is it important?

There is an effort in Elasticsearch to improve the support of time series data (see elastic/elasticsearch#74014, elastic/elasticsearch#74450, elastic/elasticsearch#74660). As part of this, dimensions are going to be first-class citizens, what will have advantages when storing and consuming time series data. To leverage these features in integrations, their dimensions should be properly defined.

Checklist

Related issues

@jsoriano jsoriano self-assigned this Oct 19, 2021
@elasticmachine
Copy link

elasticmachine commented Oct 19, 2021

💚 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: 2021-10-25T13:04:43.388+0000

  • Duration: 3 min 52 sec

  • Commit: c041025

🤖 GitHub comments

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

  • /test : Re-trigger the build.

@@ -31,18 +33,18 @@ type field struct {
func ValidateFieldGroups(pkgRoot string) ve.ValidationErrors {
Copy link
Contributor

Choose a reason for hiding this comment

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

Originally this function (and whole file) was designed to check field group properties. See comment.

Does validation logic of dimensions apply to ordinary, single fields? Maybe it's worth extracting it to a separate .go file?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, good point, yes, I will separate it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Split in 26292de, this would be ready for another review.

@jsoriano jsoriano requested a review from mtojek October 20, 2021 16:19
mtojek
mtojek previously approved these changes Oct 25, 2021
Copy link
Contributor

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -4,6 +4,9 @@
##
- version: 1.2.1-next
changes:
- description: Add support for dimension fields.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: new changes go to the bottom :)

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.

Add support for dimension fields
3 participants