Skip to content

Fix missing log entry on Duo Chat v2 endpoint

What does this MR do and why?

It was observed that the Received an event from v2/chat/agent was missing from the logs when the user had expanded_ai_logging enabled, but not when they had it disabled.

This is because the custom options are only passed from the Gitlab::Llm::Logger#conditional_info method to the logger when the feature flag is enabled.

The event option was conflicting with the existing event field in the Elastic Search node for Sidekiq.

I searched for other uses of conditional_info to see if they had the same problem, but I did not find any.

MR acceptance checklist

Screenshots or screen recordings

image

How to set up and validate locally

  1. Enable v2 endpoint feature flag in rails console
Feature.enable(:v2_chat_agent_integration)
  1. Enable LLM logging
  2. Ask any question to Duo Chat
  3. Look in the logs
  4. Note that the Received a chunk from v2/chat/agent event has an ai_event listed now, not just event

Related to #494161 (closed)

Edited by Lesley Razzaghian

Merge request reports

Loading