This commit is contained in:
2018-08-23 18:57:14 +00:00
parent cad59a7aa9
commit eeb0b1496c
4 changed files with 63 additions and 36 deletions

View File

@@ -1,29 +1,47 @@
Business history log
FROM CASE 79
A central event log used to track changes to business objects and events of significance in AyaNova.
Auto prunes (can be set)
Has some sort of checksum or verification so we can tell it wasn't fucked with
??Has some sort of checksum or verification so we can tell it wasn't fucked with
Consumed by various widgets for record history purposes
Each object defines it's own set of event id's of significance (int enum) in addition to some events common to all objects:
Default feature, no need to turn on or off keeps logs for 45 days, users who want more can
Items are only removed from log when source object is deleted (and replaced with a deleted entry and textual description of deleted item)
1=created
2=modified
3=deleted
EVENT_TYPES
-----------
A master enum of all event types in RAVEN.
Co-used by this log feature, but also used by notification system
Also used by localized text feature to fetch text about event for display in log and notification etc
May be used for other things in future.
Common event types that apply to any object and then specific event types that apply to particular types of objects but all in teh same master enum
EventType
ALL OBJECTS
1 = created
2 = retrieved (keep just in case, but perhaps not to be used unless high level of logging required?)
3 = modified
4 = deleted
SPECIFIC OBJECT EXAMPLE
Workorder:
4=Closed
5=Servicecompleted
6=all parts set to used in Service
7 = accepted from csr
etc
EVENT LOG DB SCHEMA
------------------------------------
AYTYPE (object type int),
AYID (object id),
AYEVENT (event of interest type int defined in object),
AYEVENT (event of interest type int defined in central master enum of all events),
TIMESTAMP (unix epoch),
USERID,
TEXTRA (text field to identify stuff that can't be retrieved from source object, i.e. deleted record name)
TODO:
1) Implement this log and routes to interact with it
2) Implement an auto-prune job

View File

@@ -15,6 +15,10 @@ https://www.influxdata.com/blog/how-to-use-grafana-with-influxdb-to-monitor-time
5) Skim below and see if I have covered it all.
Need to revise my metrics to bring in mvccore instead of mvc?:
- https://github.com/AppMetrics/AppMetrics/issues/261#issuecomment-404051808
Might be time to order all this to the best effectiveness if it isn't already.