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

chore: use imported telemetry types, clean bandwith metrics #5674

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

vpavlin
Copy link
Member

@vpavlin vpavlin commented Aug 8, 2024

This PR switches from using maps for telemetry data to using types exported by telemetry the project. It also removes extra/separate telemetry client for Waku bandwith metrics

Important changes:

  • remove waku/telemetry.go in favour of using telemetry/client.go
  • add dependency on github.com/status-im/telemetry for telemetry/pkg/types
  • replace usage of map with explicit types/structs
  • move the bandwith tests
  • move some types around to avoid circular deps

@vpavlin vpavlin marked this pull request as draft August 8, 2024 06:23
@status-im-auto
Copy link
Member

status-im-auto commented Aug 8, 2024

Jenkins Builds

Click to see older builds (40)
Commit #️⃣ Finished (UTC) Duration Platform Result
✖️ 1b55f49 #1 2024-08-08 06:23:54 ~29 sec tests-rpc 📄log
1b55f49 #1 2024-08-08 06:24:15 ~39 sec android 📄log
1b55f49 #1 2024-08-08 06:24:15 ~47 sec linux 📄log
1b55f49 #1 2024-08-08 06:24:16 ~56 sec ios 📄log
✖️ 1b55f49 #1 2024-08-08 06:24:40 ~1 min tests 📄log
✖️ 6ce9db9 #2 2024-08-08 06:52:23 ~18 sec tests-rpc 📄log
6ce9db9 #2 2024-08-08 06:52:25 ~24 sec android 📄log
6ce9db9 #2 2024-08-08 06:52:35 ~25 sec ios 📄log
6ce9db9 #2 2024-08-08 06:52:35 ~29 sec linux 📄log
✖️ 6ce9db9 #2 2024-08-08 06:53:03 ~57 sec tests 📄log
✖️ 41119f7 #3 2024-08-08 06:56:04 ~14 sec tests-rpc 📄log
41119f7 #3 2024-08-08 06:56:22 ~23 sec android 📄log
41119f7 #3 2024-08-08 06:56:24 ~23 sec ios 📄log
41119f7 #3 2024-08-08 06:56:24 ~29 sec linux 📄log
✖️ 41119f7 #3 2024-08-08 06:57:48 ~1 min tests 📄log
285f243 #4 2024-08-08 06:59:31 ~39 sec ios 📄log
✖️ 285f243 #4 2024-08-08 07:00:03 ~1 min tests-rpc 📄log
✖️ 285f243 #4 2024-08-08 07:00:18 ~1 min tests 📄log
285f243 #4 2024-08-08 07:00:21 ~1 min android 📄log
285f243 #4 2024-08-08 07:00:21 ~1 min linux 📄log
✔️ 1df03af #5 2024-08-08 07:19:50 ~2 min tests-rpc 📄log
✖️ 1df03af #5 2024-08-08 07:20:14 ~2 min tests 📄log
✔️ 1df03af #5 2024-08-08 07:20:37 ~2 min linux 📦zip
✔️ 1df03af #5 2024-08-08 07:21:58 ~4 min ios 📦zip
✔️ 1df03af #5 2024-08-08 07:21:59 ~4 min android 📦aar
✖️ fa53483 #6 2024-08-08 07:23:44 ~1 min tests 📄log
✔️ fa53483 #6 2024-08-08 07:24:10 ~1 min linux 📦zip
✔️ fa53483 #6 2024-08-08 07:24:32 ~2 min tests-rpc 📄log
✔️ fa53483 #6 2024-08-08 07:25:21 ~3 min ios 📦zip
✔️ fa53483 #6 2024-08-08 07:27:29 ~5 min android 📦aar
✔️ 9a6a644 #7 2024-08-08 08:08:38 ~1 min android 📦aar
✔️ 9a6a644 #7 2024-08-08 08:09:10 ~2 min linux 📦zip
✔️ 9a6a644 #7 2024-08-08 08:09:17 ~2 min tests-rpc 📄log
✔️ 9a6a644 #7 2024-08-08 08:10:01 ~2 min ios 📦zip
✔️ 9a6a644 #7 2024-08-08 08:51:04 ~43 min tests 📄log
90026cd #8 2024-08-13 13:18:50 ~23 sec android 📄log
90026cd #8 2024-08-13 13:18:57 ~27 sec ios 📄log
90026cd #8 2024-08-13 13:19:02 ~30 sec linux 📄log
✖️ 90026cd #8 2024-08-13 13:19:02 ~30 sec tests-rpc 📄log
✖️ 90026cd #8 2024-08-13 14:02:06 ~43 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✖️ 0217643 #9 2024-08-15 12:57:06 ~17 sec tests-rpc 📄log
0217643 #9 2024-08-15 12:57:06 ~24 sec android 📄log
0217643 #9 2024-08-15 12:57:13 ~26 sec ios 📄log
0217643 #9 2024-08-15 12:57:29 ~44 sec linux 📄log
✔️ 0217643 #9 2024-08-15 13:40:52 ~44 min tests 📄log
✔️ 54ed67f #10 2024-08-15 13:03:05 ~3 min ios 📦zip
✔️ 54ed67f #10 2024-08-15 13:05:34 ~5 min tests-rpc 📄log
✔️ 54ed67f #10 2024-08-15 13:05:59 ~6 min android 📦aar
✔️ 54ed67f #10 2024-08-15 13:06:39 ~6 min linux 📦zip
✔️ 54ed67f #10 2024-08-15 14:28:06 ~46 min tests 📄log

go.mod Outdated
@@ -292,3 +293,5 @@ require (
modernc.org/sqlite v1.14.2-0.20211125151325-d4ed92c0a70f // indirect
zombiezen.com/go/sqlite v0.8.0 // indirect
)

replace github.com/status-im/dev-telemetry => github.com/vpavlin/telemetry v0.0.0-20240807100636-642385d153a3
Copy link
Member Author

Choose a reason for hiding this comment

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

This needs to be fixed before merging! Depends on status-im/telemetry#37

@vpavlin vpavlin force-pushed the chore/telemetry-types branch 6 times, most recently from fa53483 to 9a6a644 Compare August 8, 2024 08:06
@vpavlin vpavlin force-pushed the chore/telemetry-types branch 2 times, most recently from 90026cd to 0217643 Compare August 15, 2024 12:56
@vpavlin vpavlin marked this pull request as ready for review August 15, 2024 13:47
@vpavlin
Copy link
Member Author

vpavlin commented Aug 15, 2024

Rebased, tests seem to be running/happy, dropping Draft, making it ready for review - although if we want this after 2.30, we can also switch it back to draft and come back to it

Comment on lines +14 to +26
type ProtocolStatsMap map[protocol.ID]metrics.Stats

type SentEnvelope struct {
Envelope *wakuv2protocol.Envelope
PublishMethod common.PublishMethod
}

type ErrorSendingEnvelope struct {
Error error
SentEnvelope SentEnvelope
}

type ITelemetryClient interface {
Copy link
Member

Choose a reason for hiding this comment

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

Should these types live in status-im/telemetry?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question, they probably could be. I kept them in status-go because they are used in processAndPushTelemetry (https://github.com/status-im/status-go/pull/5674/files#diff-6a98f0c7655c1846990bd03c6d7c1feab2b2d96ae9cf14b3bcd3d5c3677af6ffR199) along types like v2protocol.Envelope and some other defined in the client.

I'd say we could keep it this way as the next step still is to move the whole client to telemetry repo and that will require some more thoughts on the API and/or how to abstract it.

But also happy move it now if that is the preference

Copy link
Member

Choose a reason for hiding this comment

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

nah was just curious! PR looks good already!

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.

3 participants