keep tracking of EDIT method
Hello, before publishing my application, I am looking for a method to track data changes (CRUD EDIT). For example, a user changed their name or phone number in a table but I want to keep track of what they changed. Which method is correct and economical?
Best Answer
-
Hi, we developed a function to track all we need into a logs table. its ok now.
Answers
-
I would create a custom function to wrap the edit record for that particular table. That function would have the job of tracking what changes were being made and log them (often to an audit table) along with updating the record in question.
-
Thanks Ray for this, but this will produce a large amount of data…. but is there any tutorial around about this with xano?
-
You could store it in a Xano table for audit record keeping (a common practice I've found) or use a TP logging system like datadog or sentry. The right answer depends on what you mean to use the data for!
-
yes que question was: HOW TO ?
I looked on https://docs.xano.com/metadata-api, maybe I could use the request history linked to another service to store with cron changes along the time… my question is "is there a tutorial for a less effort method to do that ?" I don't want to use these data really, just to look on if/when a customer did bad things from his account... -
@Ray Deck How would you go about integrating Xano and Sentry?
-
I'd probably implement outbound logging requests to Sentry using external API request wrapped into a custom function to improve the ergonomics. I would also set up a background task monitoring the request history via the metadata API, and when it sees new errors, remit those to Sentry.
A lot of sentry's pitch is in the tight integration and error introspection. As a warming, you won't get as much of that from an integration with Xano because the connection will be on the surface, not embedded into the error handling subsystem.
-
Thanks for the warning, I was considering Sentry because:
- It helps centralizing all errors
- It acts as a hub for notification into other systems (Slack, etc.) without having to code everything
- It offers a lot of features regarding what should generate alert and what should be kept silenced
But I agree that most of the magic will have to be done by hand, it won't automatically detect which Xano user made the request and such, those will need to be configured specifically for Xano.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback