18
Add hook "context" information
Source: directus/directus#22495 · opened by @WoLfulus
Summary It's been hard to correlate hook calls (in my case filters and actions) without using hacky stuff and/or modifying the Directus core. It would be nice to have some kind of "ID" to identify which context a hook is running. Think of it like a "request id" that you can filter in logs to debug something and/or trace its path. Basic Example Motivation I'm developing tools to improve DX regarding debugging, tracing and history, and being able to correlate those hooks makes it possible to group things together for better visualization and aggregation. It also enables grouping of related operations, for example when batch creating items or relational ones. For example, I wanted to quickly identify calls to fields.create that were raised by a collections.create, but the only (unreliable) way to correlate them right now is by timestamp, but when running as a script (making requests), things gets really mixed up. Detailed Design It …
No pledges yet. Be the first to back this.
No comments yet.