pmm
pmm copied to clipboard
PMM-4087 pmm agent metrics collection for itself
Codecov Report
Merging #1312 (bf5b942) into main (e090d0f) will increase coverage by
0.61%
. Report is 3 commits behind head on main. The diff coverage is61.84%
.
:exclamation: Current head bf5b942 differs from pull request most recent head f589c9e. Consider uploading reports for the commit f589c9e to get more accurate results
@@ Coverage Diff @@
## main #1312 +/- ##
==========================================
+ Coverage 42.80% 43.42% +0.61%
==========================================
Files 384 350 -34
Lines 48344 41423 -6921
==========================================
- Hits 20693 17986 -2707
+ Misses 25699 21899 -3800
+ Partials 1952 1538 -414
Flag | Coverage Δ | |
---|---|---|
agent | 53.77% <61.84%> (+0.75%) |
:arrow_up: |
vmproxy | ? |
Flags with carried forward coverage won't be shown. Click here to find out more.
Files | Coverage Δ | |
---|---|---|
agent/agents/supervisor/supervisor.go | 64.77% <96.42%> (+7.52%) |
:arrow_up: |
agent/client/client.go | 42.81% <0.00%> (+0.61%) |
:arrow_up: |
agent/connectionuptime/service.go | 86.79% <96.15%> (+2.64%) |
:arrow_up: |
agent/client/channel/channel.go | 52.30% <43.29%> (-8.55%) |
:arrow_down: |
... and 257 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
@michal-kralik I will be grateful for the suggestion.
Hi, Michal. Fixed a place with mutex. According to linter errors, everything seems to be fixed, maybe with the exception of cyclomatic complexity, but there is just one switch. Regarding the refactoring proposal. No problem. Is it to be done as a service or... ? Maybe in the project there is an example of what you would like to see? I suppose this will also need to be done for the channel?
Hi, Michal. Fixed a place with mutex. According to linter errors, everything seems to be fixed, maybe with the exception of cyclomatic complexity, but there is just one switch. Regarding the refactoring proposal. No problem. Is it to be done as a service or... ? Maybe in the project there is an example of what you would like to see? I suppose this will also need to be done for the channel?
I would suggest we create a metrics
package in agent
and client
and store this information there.
I'd be looking for a solution where the metrics logic would be separated from the application logic so the code is easier to understand and maintain.
Re linting - try running the linter locally such as bin/golangci-lint run -c=.golangci.yml --new-from-rev=main
This prints a couple issues.