department-of-veterans-affairs / abd-vro

To get Veterans benefits in minutes, VRO software uses health evidence data to help fast track disability claims.
Other
19 stars 6 forks source link

svc-bgs-api: Fixed bug causing delays in response to client. Add standard DD tags. #3541

Closed dfitchett closed 4 days ago

dfitchett commented 4 days ago

What was the problem?

Datadog API requests are sent synchronously during the processing of a message from the queue to add claim notes. This can cause delays if there are issues with the connection to datadog. This also artificially inflates the duration metric for processing add note requests.

Additionally, svc-bgs-api does not currently meet VA tagging standards as defined here.

Associated tickets or Slack threads:

How does this fix it?[^1]

Makes the calls async by using ruby gem async with a do block adding the calls to a task list to be run concurrently. This will ensure that the datadog calls do not affect the responses sent to the client.

How to test this PR

[^1]: Pull-Requests guidelines. If PR is significant, update Current Software State wiki page. [^secrel]: To check if a PR will succeed in the SecRel workflow, test PRs in the SecRel pipeline.

github-actions[bot] commented 4 days ago

Test Results

136 tests  ±0   136 :white_check_mark: ±0   19s :stopwatch: -1s  39 suites ±0     0 :zzz: ±0   39 files   ±0     0 :x: ±0 

Results for commit e2eca7cd. ± Comparison against base commit c2ca5e3a.

github-actions[bot] commented 4 days ago

JaCoCo Test Coverage

Overall Project 72.67% :x:

There is no coverage information present for the Files changed