Skip to content
  • There are no suggestions because the search field is empty.

Auditing product changes

Audit product changes

This refers to using AuditService.logProductEvent() method that writes to Cassandra to track changes to a marketplace product, aka listing, aka uploaded product.

A product that can be updated via an api for single products has 3 or 4 modes:

  1. regular upload of the whole product
  2. update of just the quantity (how about price?)
  3. zero out quantity - maybe as a result of a validation error
  4. end marketplace listing

The above can happen in:

1. Background job that uploads products

2. Product page an user clicks a button

3. A button for admins only in the product page

4. Background job that does the purge workflow

5. Buttons in the marketplace listings page

It would be useful if an Admin user can see what has happened to a given product using the Omnivore gui mostly.

For this, using the logProductEvent() should happen:


  1. in the controller method, ie at the entry point of the process. Nice to have: log the name of the button that was clicked.
  2. very close to where it actually happens, ie in the service or client, log the errors if any, or a generic success message.

For marketplaces that support only batch updates, ie multiple products in a file that is uploaded:

todo