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

MG-1965 - Process Event Logs #2057

Merged
merged 22 commits into from
Jun 27, 2024
Merged

MG-1965 - Process Event Logs #2057

merged 22 commits into from
Jun 27, 2024

Conversation

rodneyosodo
Copy link
Member

@rodneyosodo rodneyosodo commented Jan 12, 2024

What type of PR is this?

This is a feature PR because it adds eventlogs service to store history of events

What does this do?

Adds event logs service

Which issue(s) does this PR fix/relate to?

  • Related Issue #
  • Resolves absmach/magistrala-ui-new#164 absmach/magistrala#1957

Have you included tests for your changes?

Yes, I have included tests for my changes.

Did you document any new/modified feature?

Yes, I have updated the documentation for the new feature.

Notes

api/openapi/event-logs.yml Outdated Show resolved Hide resolved
eventlogs/postgres/events.go Outdated Show resolved Hide resolved
@rodneyosodo rodneyosodo force-pushed the events-svc branch 3 times, most recently from b877d43 to 26ef76a Compare February 12, 2024 20:46
@rodneyosodo rodneyosodo force-pushed the events-svc branch 6 times, most recently from ec76941 to 35c5eb1 Compare February 26, 2024 16:54
@rodneyosodo rodneyosodo marked this pull request as ready for review February 26, 2024 16:58
@rodneyosodo rodneyosodo force-pushed the events-svc branch 2 times, most recently from 449f7ac to a817162 Compare March 8, 2024 07:59
@rodneyosodo rodneyosodo force-pushed the events-svc branch 6 times, most recently from 74d1aa5 to c993b35 Compare March 18, 2024 09:02
@rodneyosodo rodneyosodo force-pushed the events-svc branch 3 times, most recently from 7c42d98 to 3ac623d Compare March 22, 2024 15:36
@rodneyosodo rodneyosodo force-pushed the events-svc branch 5 times, most recently from 3283210 to 1cab6c0 Compare April 4, 2024 09:04
rodneyosodo and others added 20 commits June 27, 2024 00:50
Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
- Added attributes and metadata as seperate values of activity. Metadata is normal metadata for an entity while attributes are the other entities from the event for example id, updated_at e.t.c
- add entityType which can either be empty or user, group, thing or channel
- add query method which generates SQL query depending on the entity type for example is the entity is user we retrieve entities that have id as the entity id and have operation that is prefixed with user. OR events that have user_id as an attribute correcsponding to that entity
- update emission and consumption of events. Emit native types for example string slice for tags rather than formating it and also metadata as it is rather than marshalling it first into bytes

This contains breaking changes on how events are consumed

Signed-off-by: Rodney Osodo <[email protected]>
A normal user can be able to list invitations but they will get only the operation and time it occurred unless you are the platform admin where you can view anything

Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
…e, events and middleware package in journal service

Signed-off-by: Rodney Osodo <[email protected]>
arvindh123
arvindh123 previously approved these changes Jun 27, 2024
journal/service.go Show resolved Hide resolved
Move ID generation from database to service layer

Signed-off-by: Rodney Osodo <[email protected]>
@dborovcanin dborovcanin merged commit 0794363 into absmach:main Jun 27, 2024
6 checks passed
andychao217 pushed a commit to andychao217/magistrala that referenced this pull request Sep 23, 2024
MG-2142 - Consume Things connect/disconnect event in Bootstrap (absmach#2192)
NOISSUE - add CreatedAt and UpdatedAt fields for mgclients.Client (absmach#2306)
NOISSUE - Fix failed log message (absmach#2307)
MF-2299 - Update influxdb2 volumes path (absmach#2300)
NOISSUE - Remove redundant relation check (absmach#2197)
NOISSUE - Add domain events for Auth service (absmach#2313)
NOISSUE - Update CI tools (absmach#2314)
MG-888 - Update consumers SDK tests (absmach#2271)
MG-888 - Add bootstrap SDK tests (absmach#2261)
MG-2026 - Fix JSON page response key from groups to channels (absmach#2298)
MG-1965 - Process Event Logs (absmach#2057)
MG-1529 - User Removal (absmach#2122)
@rodneyosodo rodneyosodo deleted the events-svc branch October 22, 2024 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

5 participants