bosagora / agora

POC Node implementation for CoinNet
https://bosagora.io
MIT License
37 stars 23 forks source link

Stats: Merge `stats` interface with `http[s]` #3232

Closed mkykadir closed 2 years ago

mkykadir commented 2 years ago

Stats interface is also a http[s] interface, before it was required to configure as a separate interface. This change ease configuration of interfaces and still allows configuring stats interface on separate address/port.

Fixes #2888 This changeset also allows us to configure multiple stats interface

If one wants to access stats server from same HTTP interface, following configuration can be used;

interfaces:
    - type: http
       address: 0.0.0.0
       port: 8080
       stats: true

stats server can also be accessed through separate interface with the following configuration;

interfaces:
    - type: http
       address: 0.0.0.0
       port: 8080
    - type: http
       address: 0.0.0.0
       port: 3000
       stats: true
mkykadir commented 2 years ago

Faucet will need an update, reason of Integration test failing

codecov[bot] commented 2 years ago

Codecov Report

Merging #3232 (4774817) into v0.x.x (bda3dfb) will decrease coverage by 1.27%. The diff coverage is 4.76%.

@@            Coverage Diff             @@
##           v0.x.x    #3232      +/-   ##
==========================================
- Coverage   88.64%   87.36%   -1.28%     
==========================================
  Files         167      165       -2     
  Lines       17072    16966     -106     
==========================================
- Hits        15133    14823     -310     
- Misses       1939     2143     +204     
Flag Coverage Δ
integration ?
unittests 87.36% <4.76%> (-0.03%) :arrow_down:

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

Impacted Files Coverage Δ
source/agora/node/FullNode.d 72.44% <ø> (-3.01%) :arrow_down:
source/agora/node/Runner.d 0.00% <0.00%> (-57.36%) :arrow_down:
source/agora/node/Config.d 69.42% <50.00%> (-11.58%) :arrow_down:
source/agora/network/RPC.d 1.51% <0.00%> (-59.85%) :arrow_down:
source/agora/network/VibeManager.d 1.42% <0.00%> (-44.29%) :arrow_down:
source/agora/network/Clock.d 72.22% <0.00%> (-16.67%) :arrow_down:
source/scpd/scp/SCPDriver.d 60.00% <0.00%> (-15.00%) :arrow_down:
source/agora/utils/Log.d 52.20% <0.00%> (-10.07%) :arrow_down:
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update bda3dfb...4774817. Read the comment docs.

Geod24 commented 2 years ago

My problem with this change is that it forces an http[s] interface. We know that our http[s] interface are more fragile / risky because they go through Vibe.d. That's why it was a separate interface to begin with.

Geod24 commented 2 years ago

Reading again, stats is still here, so ignore the above comment.