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 importing data from ELK #256

Merged
merged 8 commits into from
Aug 19, 2024
Merged

Add support for importing data from ELK #256

merged 8 commits into from
Aug 19, 2024

Conversation

tfiedor
Copy link
Collaborator

@tfiedor tfiedor commented Aug 16, 2024

This PR adds support of reading profiles from ELK, which saves the queries in form of {'queries': [{...}...]}".

Also adds support for metadata key.

Copy link

codecov bot commented Aug 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.08%. Comparing base (b85dd49) to head (7bd9bc5).
Report is 9 commits behind head on devel.

Additional details and impacted files
@@           Coverage Diff           @@
##            devel     #256   +/-   ##
=======================================
  Coverage   99.07%   99.08%           
=======================================
  Files         150      150           
  Lines       10402    10470   +68     
=======================================
+ Hits        10306    10374   +68     
  Misses         96       96           
Flag Coverage Δ
coverage-3.10 99.07% <100.00%> (+<0.01%) ⬆️
coverage-3.11 99.08% <100.00%> (+<0.01%) ⬆️
coverage-3.12 99.07% <100.00%> (+<0.01%) ⬆️
coverage-3.9 99.07% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tfiedor tfiedor requested a review from JiriPavela August 17, 2024 10:02
Comment on lines +48 to +50
TODO: the import-dir could be removed by extracting this functionality to command-line callback and massage
the paths during the CLI parsing; hence assuming that the paths are correct when importing. I think the parameter
only complicates the code.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just a note: this wouldn't really work, as the import-dir path prefix is also applied to paths that can be found in CSV file(s). Although we could technically parse the files in the callback, it doesn't seem like the proper place to parse files with a bit more complicated format and error checking.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Would extracting this to config hierarchy work? Have lookup.path, e.g. that would be gathered recursively through runtime, local and shared config and helper function that would resolve the path wrt to this set path? Then --import-dir would simply add to the runtime(), one could add it to local or shared to not have to use import-dir at all.

@tfiedor
Copy link
Collaborator Author

tfiedor commented Aug 19, 2024

I will merge this, even though I will rework the import to the ELK (not happy with the flattening), but I wish the metadata to be merged already.

@tfiedor tfiedor merged commit 02b625f into devel Aug 19, 2024
19 checks passed
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.

2 participants