Event logger

Setting

EVENT_LOGGER_APP_URL (non-secret), EVENT_LOGGER_API_KEY (secret)

Client

eventlogger.client.EventLoggerClient (EventLoggerPySDK, tag 1.0.0) for writes; plain HTTP for reads

Code

tasks/services.py (send_events_and_notifications), activity/services.py (ChangelogService)

Writes

When a logged-in user updates a task, the Worker writes two events with instance_id=8001 and EVENT_LOGGER_API_KEY:

  • target task.uuid, type CRM_TASK — the task’s own history;

  • target task.target_uuid, type SUPPLIER — so the change appears in the supplier’s activity.

Both are EventTypes.TASK with message "<login_id> edited task #<item_number>" and the diff in data.changes.

Reads

GET {EVENT_LOGGER_APP_URL}/es-changelog with the caller’s X-Session-Token, Authorization, X-Eventlogger-Instanceid and X-EventLogger-TargetUUID. Used by GET /tasks/<uuid>/events/ and GET /activity/. A non-200 raises and fails the request.