codecov-api icon indicating copy to clipboard operation
codecov-api copied to clipboard

add QueryMetricsExtension to graphql view

Open nora-shap opened this issue 1 year ago • 4 comments
trafficstars

Purpose/Motivation

Gives insight into our GraphQL use

Links to relevant tickets

https://github.com/codecov/engineering-team/issues/1238

What does this PR do?

Adds 2 counters and 1 timer to our GQL endpoint, we should be able to see what queries are being used the most and if any are mad slow

Notes to Reviewer

The hardest part for me was trying to anticipate all the possible formats for our queries, to be able to parse and log them correctly in set_type_and_name. I have them listed in test_query_metrics_extension_set_type_and_name. If anyone knows of any other patterns we use, let me know and I'll build them in.

nora-shap avatar May 17 '24 22:05 nora-shap

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

:white_check_mark: All tests successful. No failed tests found.

:loudspeaker: Thoughts on this report? Let us know!

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.42%. Comparing base (43827db) to head (5524218).

:white_check_mark: All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #572      +/-   ##
==========================================
+ Coverage   91.40%   91.42%   +0.02%     
==========================================
  Files         604      604              
  Lines       16052    16102      +50     
==========================================
+ Hits        14672    14722      +50     
  Misses       1380     1380              
Flag Coverage Δ
unit 91.42% <100.00%> (+0.02%) :arrow_up:
unit-latest-uploader 91.42% <100.00%> (+0.02%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-qa[bot] avatar May 17 '24 22:05 codecov-qa[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.42%. Comparing base (43827db) to head (5524218).

:white_check_mark: All tests successful. No failed tests found :relaxed:

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #572      +/-   ##
==========================================
+ Coverage   91.40%   91.42%   +0.02%     
==========================================
  Files         604      604              
  Lines       16052    16102      +50     
==========================================
+ Hits        14672    14722      +50     
  Misses       1380     1380              
Flag Coverage Δ
unit 91.42% <100.00%> (+0.02%) :arrow_up:
unit-latest-uploader 91.42% <100.00%> (+0.02%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
graphql_api/views.py 98.01% <100.00%> (+0.98%) :arrow_up:

Impacted file tree graph

codecov-public-qa[bot] avatar May 17 '24 22:05 codecov-public-qa[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.87%. Comparing base (43827db) to head (5524218).

:white_check_mark: All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##            main    #572     +/-   ##
=======================================
+ Coverage   95.86   95.87   +0.01     
=======================================
  Files        782     782             
  Lines      17370   17420     +50     
=======================================
+ Hits       16651   16701     +50     
  Misses       719     719             
Flag Coverage Δ
unit 91.42% <100.00%> (+0.02%) :arrow_up:
unit-latest-uploader 91.42% <100.00%> (+0.02%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 17 '24 22:05 codecov[bot]