Add more extensive logging guarded by feature flag
What does this MR do and why?
Add logging every log of LLM cycle. It is guarded by the feature flag scoped to user.
Some explanation:
I was thinking of overriding debug
method in Llm::Logger
class and adding the condition there. I decided against it as it would made the logic a bit hidden and making it less readable.
In the course of the review, I created info_or_debug
method that encapsulates the feature flag logic.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- In rails console enable the experiment fully
Feature.enable(:expanded_ai_loggging)
- Ask some question in chat.
- check if entries in
llm.log
are logged on info level. - Switch feature flag off, ask question again and compare
llm.log
file content.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Merge request reports
Activity
changed milestone to %16.7
added groupai framework typemaintenance labels
assigned to @mksionek
added devopsai-powered sectiondata-science labels
- A deleted user
added backend feature flag labels
- Resolved by Gosia Ksionek
2 Warnings 44020675: Commits that change 30 or more lines across at least 3 files should describe these changes in the commit body. For more information, take a look at our Commit message guidelines. 85740886: Commits that change 30 or more lines across at least 3 files should describe these changes in the commit body. For more information, take a look at our Commit message guidelines. 1 Message CHANGELOG missing: If this merge request needs a changelog entry, add the
Changelog
trailer to the commit message you want to add to the changelog.If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.
Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer backend @thutterer
(UTC+1, same timezone as author)
@jarka
(UTC+1, same timezone as author)
Please check reviewer's status!
Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
DangerEdited by Ghost Usermentioned in commit gitlab-org-sandbox/gitlab-jh-validation@5b2a349a
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@2c52ac3c
Allure report
allure-report-publisher
generated test report!e2e-test-on-gdk:
test report for bea7983eexpand test summary
+-----------------------------------------------------------------------+ | suites summary | +------------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +------------------+--------+--------+---------+-------+-------+--------+ | Monitor | 8 | 0 | 0 | 0 | 8 | ✅ | | Create | 50 | 0 | 7 | 0 | 57 | ✅ | | Plan | 55 | 0 | 0 | 0 | 55 | ✅ | | Verify | 31 | 0 | 0 | 0 | 31 | ✅ | | Govern | 57 | 0 | 0 | 0 | 57 | ✅ | | Data Stores | 23 | 0 | 0 | 0 | 23 | ✅ | | Package | 0 | 0 | 1 | 0 | 1 | ➖ | | Framework sanity | 0 | 0 | 1 | 0 | 1 | ➖ | | Manage | 0 | 0 | 1 | 0 | 1 | ➖ | +------------------+--------+--------+---------+-------+-------+--------+ | Total | 224 | 0 | 10 | 0 | 234 | ✅ | +------------------+--------+--------+---------+-------+-------+--------+
e2e-package-and-test:
test report for bea7983eexpand test summary
+------------------------------------------------------------+ | suites summary | +-------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------+--------+--------+---------+-------+-------+--------+ +-------+--------+--------+---------+-------+-------+--------+ | Total | 0 | 0 | 0 | 0 | 0 | ➖ | +-------+--------+--------+---------+-------+-------+--------+
Edited by Ghost User@nicolasdular would you review please?
requested review from @nicolasdular
- Resolved by Jan Provaznik
@nicolasdular
, thanks for approving this merge request.This is the first time the merge request has been approved. To ensure we don't only run predictive pipelines, and we don't break
master
, a new pipeline will be started shortly.Please wait for the pipeline to start before resolving this discussion and set auto-merge for the new pipeline. See merging a merge request for more details.
added pipeline:mr-approved label
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@bfa1d756
@jprovaznik would you mind performing maintainer review?