Add DangerBot check for AI logging compliance
What does this MR do and why?
This merge request implements a new DangerBot check for AI logging in GitLab, addressing the issue raised in #481845. The main goals are:
- Ensure compliance with GitLab's AI data usage policies
- Warn developers about potentially non-compliant AI logging
- Encourage the use of proper AI logging practices
The changes include:
- A new Dangerfile (
danger/ai_logging/Dangerfile
) that checks for AI logging calls - Logic to detect usage of
GitLab::Llm::Logger.build.info
andGitLab::Llm::Logger.build.error
- Warnings when AI logging is not gated behind the
expanded_ai_logging
feature flag - Addition of relevant labels to merge requests containing AI logging
These changes will help maintain good logging practices across AI features in the GitLab repository and reduce the risk of logging sensitive information.
Screenshots or screen recordings
N/A - This change is related to CI checks and does not affect the UI.
Related to #481845
Edited by David O'Regan