[COMPASS-7054] Log full requests and responses from AI Created: 26/Jul/23  Updated: 01/Aug/23  Resolved: 01/Aug/23

Status: Closed
Project: Compass
Component/s: None
Affects Version/s: None
Fix Version/s: No version

Type: Task Priority: Major - P3
Reporter: Alena Khineika Assignee: Alena Khineika
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
causes COMPASS-7061 Removed request logging before the fe... Closed
Epic Link: COMPASS-6866
Documentation Changes: Not Needed
Sprint: Iteration Gargoyleosaurus

 Description   

Currently, we log only the shape of the requests:

req.logger.info('Performing a query generation request', {
  hasSchema: !!req.body.schema,
  hasCollectionName: !!req.body.collectionName,
  hasSampleDocuments: !!req.body.hasSampleDocuments,
});

And errors in responses:

req.logger.error('Error occurred', err);

For the internal beta, we want to log full requests and responses to learning from this experience how good our prompts are at building MongoDB queries. Since we don't use sample documents we should be okay from security perspective.


Generated at Wed Feb 07 22:45:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.