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

[BACKPORT] Send TCP metrics for bytes sent and received to server #497

Merged
merged 2 commits into from
Oct 13, 2021

Conversation

mdumandag
Copy link
Contributor

It would be good to send tcp.bytesReceived and tcp.bytesSend
metrics in the metrics blob to the server, so that, someone can
track how much traffic is passing between the server and the client.

I have manually tested the stats exported to Prometheus and verified
that these two new stats are displayed there correctly.

Backport of #496

@codecov-commenter
Copy link

codecov-commenter commented Oct 12, 2021

Codecov Report

Merging #497 (e645e18) into 4.2.z (6e7b244) will decrease coverage by 0.34%.
The diff coverage is 81.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##            4.2.z     #497      +/-   ##
==========================================
- Coverage   95.16%   94.82%   -0.35%     
==========================================
  Files         345      345              
  Lines       17552    17568      +16     
==========================================
- Hits        16704    16659      -45     
- Misses        848      909      +61     
Impacted Files Coverage Δ
hazelcast/statistics.py 90.44% <69.23%> (-0.57%) ⬇️
hazelcast/reactor.py 82.01% <100.00%> (-7.31%) ⬇️
...otocol/codec/client_authentication_custom_codec.py 50.00% <0.00%> (-23.81%) ⬇️
hazelcast/listener.py 92.30% <0.00%> (-1.93%) ⬇️
hazelcast/protocol/client_message.py 93.45% <0.00%> (-1.79%) ⬇️
hazelcast/connection.py 91.27% <0.00%> (-1.46%) ⬇️
hazelcast/invocation.py 94.25% <0.00%> (-1.15%) ⬇️
hazelcast/proxy/base.py 97.40% <0.00%> (-0.65%) ⬇️

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 6e7b244...e645e18. Read the comment docs.

It would be good to send `tcp.bytesReceived` and `tcp.bytesSend`
metrics in the metrics blob to the server, so that, someone can
track how much traffic is passing between the server and the client.

I have manually tested the stats exported to Prometheus and verified
that these two new stats are displayed there correctly.
Copy link
Member

@srknzl srknzl left a comment

Choose a reason for hiding this comment

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

LGTM with one minor comment but why codecov show coverage decreased a lot?

@@ -1,10 +1,11 @@
import time
import unittest
Copy link
Member

Choose a reason for hiding this comment

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

This import is not used anymore I think

Copy link
Member

Choose a reason for hiding this comment

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

Also don't you check unused imports?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Corrected it, thanks for the catch.
We use black to lint the code, but unfortunately, it does not have this feature. It seems autoflake and pylint have it, but enabling them requires a bit of work to get rid of their warnings. There was a task about this in Jira

@mdumandag mdumandag merged commit 5a4b2ad into hazelcast:4.2.z Oct 13, 2021
@mdumandag mdumandag deleted the tcp-metrics-4.2.z branch October 13, 2021 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants