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

Adds Logging for Expanded Classification Endpoint #3681

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

tyler-spangler6
Copy link
Contributor

What was the problem?

This PR adds logging to track Endpoint in datadog logs. The logging structure is the same as /vagov-claim-classifier endpoint with the exception of adding the endpoint name to differentiate between the endpoints in datadog. The logs will look:

  • Contention Log:
{
    "vagov_claim_id": 100,
    "claim_type": "new",
    "classification_code": 249482,
    "classification_name": "Musculoskeletal - Bones",
    "contention_text": "unmapped contention text",
    "diagnostic_code": "None",
    "is_in_dropdown": false,
    "is_lookup_table_match": true,
    "is_multi_contention": true,
    "endpoint": "/expanded-contention-classification",
    "date": "2024-11-04 13:40:25",
    "level": "info"
}
  • Claim Log:
{
    "claim_id": 100,
    "form526_submission_id": 500,
    "is_fully_classified": false,
    "percent_clasified": 81.25,
    "num_processed_contentions": 16,
    "num_classified_contentions": 13,
    "endpoint": "/expanded-contention-classification",
    "date": "2024-11-04 13:40:25",
    "level": "info"
}

Associated tickets or Slack threads:

How does this fix it?1

This adds logging to the endpoint calls for both contentions and claim level logging.

How to test this PR

  • Can test manually in Postman or other API testing tool and send test request and see the logs in the terminal. No unit tests written specifically for logging.
  • Step 22

Footnotes

  1. Pull-Requests guidelines. If PR is significant, update Current Software State wiki page.

  2. To check if a PR will succeed in the SecRel workflow, test PRs in the SecRel pipeline.

Copy link
Contributor

github-actions bot commented Nov 4, 2024

Test Results

136 tests  ±0   136 ✅ ±0   28s ⏱️ -1s
 39 suites ±0     0 💤 ±0 
 39 files   ±0     0 ❌ ±0 

Results for commit 9872008. ± Comparison against base commit dc70755.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Nov 4, 2024

JaCoCo Test Coverage

Overall Project 71.24%

There is no coverage information present for the Files changed

@tyler-spangler6 tyler-spangler6 marked this pull request as ready for review November 4, 2024 21:03
@tyler-spangler6 tyler-spangler6 requested a review from a team as a code owner November 4, 2024 21:03
Copy link

@williamphelps13 williamphelps13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Nice job in adding this!

@tyler-spangler6 tyler-spangler6 merged commit 258a98b into develop Nov 5, 2024
1 check passed
@tyler-spangler6 tyler-spangler6 deleted the conditions-add-logging branch November 5, 2024 15:07
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