Class: Audiences::Integrations::ObserverBase
- Inherits:
-
AetherObservatory::ObserverBase
- Object
- AetherObservatory::ObserverBase
- Audiences::Integrations::ObserverBase
- Defined in:
- lib/audiences/integrations/observer_base.rb
Direct Known Subclasses
DeleteGroupsObserver, DeleteUsersObserver, UpsertGroupsObserver, UpsertUsersObserver
Instance Method Summary collapse
-
#log_sync_operation(action:, resource_type:, scim_id:, correlation_id: event_payload.correlation_id) { ... } ⇒ Object
Logs the start and completion of a sync operation Automatically logs “start” before yielding and “complete” in ensure block.
Instance Method Details
#log_sync_operation(action:, resource_type:, scim_id:, correlation_id: event_payload.correlation_id) { ... } ⇒ Object
Logs the start and completion of a sync operation Automatically logs “start” before yielding and “complete” in ensure block
14 15 16 17 18 19 20 21 |
# File 'lib/audiences/integrations/observer_base.rb', line 14 def log_sync_operation(action:, resource_type:, scim_id:, correlation_id: event_payload.correlation_id) log_data = build_log_data(action: action, resource_type: resource_type, scim_id: scim_id, correlation_id: correlation_id) Audiences.logger.info({ **log_data, stage: "start" }.to_json) yield ensure Audiences.logger.info({ **log_data, stage: "complete" }.to_json) end |