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

Created prometheus handler class #790

Merged
merged 2 commits into from
Oct 16, 2024
Merged

Conversation

adrian-codecov
Copy link
Contributor

We want to separate prometheus responsibilities from the checkpoint responsibilities to later extend its functionality. This PR just rearranges logic and doesn't include new one, to separate reviews into more manageable chunks.

This PR mainly creates the PrometheusCheckpointLoggerHandler class, which has log_X methods for logging X things. This class is then used in the checkpoint_logger.init.py file

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Copy link

codecov bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.01%. Comparing base (112592f) to head (1fb9d83).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #790   +/-   ##
=======================================
  Coverage   98.01%   98.01%           
=======================================
  Files         442      443    +1     
  Lines       36597    36615   +18     
=======================================
+ Hits        35869    35887   +18     
  Misses        728      728           
Flag Coverage Δ
integration 98.01% <100.00%> (+<0.01%) ⬆️
unit 98.01% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 95.87% <100.00%> (+<0.01%) ⬆️
OutsideTasks 97.99% <100.00%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
helpers/checkpoint_logger/__init__.py 95.00% <100.00%> (-0.17%) ⬇️
helpers/checkpoint_logger/prometheus.py 100.00% <100.00%> (ø)

@codecov-notifications
Copy link

codecov-notifications bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #790   +/-   ##
=======================================
  Coverage   98.01%   98.01%           
=======================================
  Files         442      443    +1     
  Lines       36597    36615   +18     
=======================================
+ Hits        35869    35887   +18     
  Misses        728      728           
Flag Coverage Δ
integration 98.01% <100.00%> (+<0.01%) ⬆️
unit 98.01% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 95.87% <100.00%> (+<0.01%) ⬆️
OutsideTasks 97.99% <100.00%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
helpers/checkpoint_logger/__init__.py 95.00% <100.00%> (-0.17%) ⬇️
helpers/checkpoint_logger/prometheus.py 100.00% <100.00%> (ø)

@codecov-qa
Copy link

codecov-qa bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.01%. Comparing base (112592f) to head (1fb9d83).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #790   +/-   ##
=======================================
  Coverage   98.01%   98.01%           
=======================================
  Files         442      443    +1     
  Lines       36597    36615   +18     
=======================================
+ Hits        35869    35887   +18     
  Misses        728      728           
Flag Coverage Δ
integration 98.01% <100.00%> (+<0.01%) ⬆️
unit 98.01% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 95.87% <100.00%> (+<0.01%) ⬆️
OutsideTasks 97.99% <100.00%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
helpers/checkpoint_logger/__init__.py 95.00% <100.00%> (-0.17%) ⬇️
helpers/checkpoint_logger/prometheus.py 100.00% <100.00%> (ø)

Copy link

codecov-public-qa bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.01%. Comparing base (112592f) to head (1fb9d83).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #790   +/-   ##
=======================================
  Coverage   98.01%   98.01%           
=======================================
  Files         442      443    +1     
  Lines       36597    36615   +18     
=======================================
+ Hits        35869    35887   +18     
  Misses        728      728           
Flag Coverage Δ
integration 98.01% <100.00%> (+<0.01%) ⬆️
unit 98.01% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 95.87% <100.00%> (+<0.01%) ⬆️
OutsideTasks 97.99% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
helpers/checkpoint_logger/__init__.py 95.00% <100.00%> (-0.17%) ⬇️
helpers/checkpoint_logger/prometheus.py 100.00% <100.00%> (ø)

@@ -17,79 +17,22 @@
)

import sentry_sdk
from shared.metrics import Counter, Histogram, metrics
from shared.metrics import metrics
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess you can also use the opportunity to remove all these statsd metrics

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have a followup PR incoming, I'll remove them in that one 👌

@sentry-autofix sentry-autofix bot mentioned this pull request Oct 16, 2024
@adrian-codecov adrian-codecov added this pull request to the merge queue Oct 16, 2024
Merged via the queue into main with commit 48ce427 Oct 16, 2024
26 of 27 checks passed
@adrian-codecov adrian-codecov deleted the 2576-create-prometheus-handler branch October 16, 2024 19:36
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.

4 participants