-
Notifications
You must be signed in to change notification settings - Fork 31
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
datastream: add basic OS logging #82
base: master
Are you sure you want to change the base?
datastream: add basic OS logging #82
Conversation
76b7514
to
38e403e
Compare
* Introduced `LogManager` to handle structured logging via registered builders. * Added `SearchBackend` to store logs in a search engine (OpenSearch/Elasticsearch). * Implemented `LogEvent` for structured log representation. * Enabled dynamic log builder registration via entry points. * Integrated Celery task (`log_event_task`) to handle asynchronous log ingestion. * Ensured template validation in the search engine before indexing logs. * Configurable log types to support audit, job and others. * closes CERNDocumentServer/cds-rdm#361 Co-authored-by: Saksham Arora <[email protected]>
38e403e
to
dd5b5a3
Compare
aa36d2b
to
8f0e0e0
Compare
invenio_logging/datastreams/templates/os-v1/datastream-log-v1.0.0.json
Outdated
Show resolved
Hide resolved
Add the resource for the logs, to be checked |
@@ -35,3 +35,9 @@ def search(cls, query): | |||
"""Search logs.""" | |||
results = cls.backend_cls().search(query) | |||
return cls.schema.dump(results, many=True) | |||
|
|||
@classmethod | |||
def list(cls): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how is list different from search?
@@ -89,7 +89,7 @@ def search(self, query=None, size=10): | |||
"operator": "and", | |||
} | |||
}, | |||
"sort": [{"timestamp": {"order": "desc"}}], | |||
"sort": [{"@timestamp": {"order": "desc"}}], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this whole method should be in a log dedicated service class
this should probably not be in this module.
could work as a prototype now, but it should be moved in the next iteration to a service - also because we are missing the permissions completely here.
Probably even before finalising the frontend, otherwise you will end up patching a lot of things.
closes: CERNDocumentServer/cds-rdm#361