From 69c9339ffffae965573554dc659423a472dbbaac Mon Sep 17 00:00:00 2001 From: Jose Andres Tejerina Date: Thu, 30 Oct 2025 16:46:32 -0300 Subject: [PATCH] fix: check empty description before to save in otlp --- app/Audit/AuditLogOtlpStrategy.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Audit/AuditLogOtlpStrategy.php b/app/Audit/AuditLogOtlpStrategy.php index 6b3b5038d..bd2e209b9 100644 --- a/app/Audit/AuditLogOtlpStrategy.php +++ b/app/Audit/AuditLogOtlpStrategy.php @@ -112,10 +112,10 @@ public function audit($subject, array $change_set, string $event_type): void $auditData = $this->buildAuditLogData($entity, $subject, $change_set, $event_type, $user_id, $user_email, $user_first_name, $user_last_name); if (!empty($description)) { $auditData['audit.description'] = $description; + Log::debug("AuditLogOtlpStrategy::audit sending entry to OTEL", ["user_id" => $user_id, "user_email" => $user_email]); + EmitAuditLogJob::dispatch($this->getLogMessage($event_type), $auditData); + Log::debug("AuditLogOtlpStrategy::audit entry sent to OTEL", ["user_id" => $user_id, "user_email" => $user_email]); } - Log::debug("AuditLogOtlpStrategy::audit sending entry to OTEL", ["user_id" => $user_id, "user_email" => $user_email]); - EmitAuditLogJob::dispatch($this->getLogMessage($event_type), $auditData); - Log::debug("AuditLogOtlpStrategy::audit entry sent to OTEL", ["user_id" => $user_id, "user_email" => $user_email]); } catch (\Exception $ex) { Log::error('OTEL audit logging error: ' . $ex->getMessage(), [