Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add source documents (api urls) to logged metrics #230

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

mbklein
Copy link
Contributor

@mbklein mbklein commented Jul 22, 2024

Changes

  • Move debug_response to metrics.py
  • Add source_documents to debug response
  • Add source_documents to list of logged fields
  • Add test for debug_response
  • Fix test code that was using the wrong question value in testing token usage

Steps to test

  1. Log in as staging admin with aws sso login
  2. From the chat directory, deploy the 5074-source-documents branch to a CloudFormation stack: sam build && sam deploy --config-file samconfig.toml --stack-name dc-api-$DEV_PREFIX-chat
  3. Grab the websocket URL from the output of sam deploy
  4. Use Postman to generate a few requests against your deployed CloudFormation stack
  5. Check AWS Cloudwatch for the dedicated metrics log at /nul/dc-api-$DEV_PREFIX-chat/ChatFunction-Metrics

@mbklein mbklein requested review from bmquinn and kdid July 22, 2024 15:46
@mbklein mbklein merged commit df48b0f into deploy/staging Jul 22, 2024
1 check passed
@mbklein mbklein deleted the 5074-source-documents branch July 22, 2024 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants