dockstore / dockstore

Our VM/Docker sharing infrastructure and management component
https://dockstore.org/
Apache License 2.0
116 stars 27 forks source link

Feature/metrics registry #5873

Closed denis-yuen closed 1 month ago

denis-yuen commented 2 months ago

Description

Follows https://github.com/dockstore/dockstore/pull/5872 but uses standard dropwizard metrics patterns. May make a little more sense to merge that one then look at "Files changed" for this one, but either way.

AWS CloudWatch output should stay the same (tested on qa)

For local output, add to web.yaml

localCloudWatchMetrics: true

and get console output

2024-04-22, 4:40:56 p.m. =======================================================

-- Gauges ----------------------------------------------------------------------
io.dropwizard.db.ManagedPooledDataSource.hibernate.active
             value = 0
io.dropwizard.db.ManagedPooledDataSource.hibernate.idle
             value = 10
io.dropwizard.db.ManagedPooledDataSource.hibernate.load
             value = 0.0
io.dropwizard.db.ManagedPooledDataSource.hibernate.size
             value = 10

2024-04-22, 4:41:56 p.m. =======================================================

-- Gauges ----------------------------------------------------------------------
io.dropwizard.db.ManagedPooledDataSource.hibernate.active
             value = 0
io.dropwizard.db.ManagedPooledDataSource.hibernate.idle
             value = 8
io.dropwizard.db.ManagedPooledDataSource.hibernate.load
             value = 0.0
io.dropwizard.db.ManagedPooledDataSource.hibernate.size
             value = 8

Review Instructions Same as the previous PR, look for metrics and auto-scaling rules in ECS linked to the new metrics. Created https://ucsc-cgl.atlassian.net/browse/SEAB-6402 for benchmarking

Issue https://ucsc-cgl.atlassian.net/browse/SEAB-6401

Security and Privacy

Should be none, a little safer since metrics don't hitchhike on healthcheck

Please make sure that you've checked the following before submitting your pull request. Thanks!

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 72.22222% with 20 lines in your changes are missing coverage. Please review.

Project coverage is 74.49%. Comparing base (1550b54) to head (9197952). Report is 2 commits behind head on develop.

Files Patch % Lines
...ockstore/webservice/CloudWatchMetricsReporter.java 72.72% 8 Missing and 4 partials :warning:
...ore/webservice/DockstoreWebserviceApplication.java 73.68% 4 Missing and 1 partial :warning:
...e/webservice/DockstoreWebserviceConfiguration.java 50.00% 2 Missing :warning:
...ebservice/resources/ConnectionPoolHealthCheck.java 80.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #5873 +/- ## ============================================= - Coverage 74.51% 74.49% -0.02% - Complexity 5246 5256 +10 ============================================= Files 368 369 +1 Lines 18945 19013 +68 Branches 1992 1996 +4 ============================================= + Hits 14117 14164 +47 - Misses 3879 3895 +16 - Partials 949 954 +5 ``` | [Flag](https://app.codecov.io/gh/dockstore/dockstore/pull/5873/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dockstore) | Coverage Δ | | |---|---|---| | [bitbuckettests](https://app.codecov.io/gh/dockstore/dockstore/pull/5873/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dockstore) | `27.38% <68.05%> (+0.14%)` | :arrow_up: | | [integrationtests](https://app.codecov.io/gh/dockstore/dockstore/pull/5873/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dockstore) | `58.94% <72.22%> (+0.03%)` | :arrow_up: | | [languageparsingtests](https://app.codecov.io/gh/dockstore/dockstore/pull/5873/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dockstore) | `11.16% <33.33%> (+0.08%)` | :arrow_up: | | [localstacktests](https://app.codecov.io/gh/dockstore/dockstore/pull/5873/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dockstore) | `21.89% <68.05%> (+0.17%)` | :arrow_up: | | [toolintegrationtests](https://app.codecov.io/gh/dockstore/dockstore/pull/5873/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dockstore) | `30.77% <68.05%> (+0.14%)` | :arrow_up: | | [unit-tests_and_non-confidential-tests](https://app.codecov.io/gh/dockstore/dockstore/pull/5873/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dockstore) | `28.73% <68.05%> (+0.15%)` | :arrow_up: | | [workflowintegrationtests](https://app.codecov.io/gh/dockstore/dockstore/pull/5873/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dockstore) | `38.99% <68.05%> (+0.11%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dockstore#carryforward-flags-in-the-pull-request-comment) to find out more.

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

denis-yuen commented 2 months ago

(Codacy local variable suggestion intentionally ignored, probably don't want that to be garbage collected)

sonarcloud[bot] commented 2 months ago

Quality Gate Failed Quality Gate failed

Failed conditions
73.9% Coverage on New Code (required ≥ 80%)
E Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint