Is it possible to add a meta field to each log_record event? I have tried adding this to should_enqueue_log_record:
-- Generate and store a uuid v7 value as metadata
msg:set_meta('log_event_uuid', uuid.hyphenated)```
But the meta field is not visible/added, any ideas?
Thanks!
Thanks Tom, yeah we run inside k8s so any config change triggers restart. Odd though, should_enqueue_log_record does appear to have access to the message object, yet our meta uuid is not present in the log message. Is there a neat way to debug with print statements or similar, I tried with kumo.log_info but that does not seem to fire?
if you’re using should_enqueue_log_record you may be doing things in the most difficult way. Please consider using Publishing Log Events Via Webhooks - KumoMTA Docs instead, as it is much easier to use and reason about.
Thanks Wez, yes we do use this already, so maybe the two functions are conflicting in some way. We do have meta values which are coming from the message itself but when we try to generate them as part of the log event that seems to silently fail, I will have another look at just using log_hook