-
Notifications
You must be signed in to change notification settings - Fork 6
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
Track message sequences for Waku dogfooding #20
Track message sequences for Waku dogfooding #20
Conversation
99ce071
to
9bf0463
Compare
9bf0463
to
97dc3fc
Compare
d26f2a1
to
e66f3de
Compare
id SERIAL PRIMARY KEY, | ||
walletAddress VARCHAR(255), | ||
peerIdSender VARCHAR(255) NOT NULL, | ||
peerIdReporter VARCHAR(255) NOT NULL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is reporter
in this context? is it the node that we sent message to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reporter is the node being run by the same user who sends this data to telemetry. When sending a message via lightpush, reporter and sender will be the same.
|
||
type TelemetryPushFilter struct { | ||
ID int `json:"id"` | ||
WalletAddress string `json:"walletAddress"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems we don't need it for dogfooding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's an optional field in the db table
@@ -0,0 +1,14 @@ | |||
CREATE TABLE IF NOT EXISTS errorSendingEnvelope ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need this table? it doesn't seem needed for dogfooding and maybe can be combined with other envelope tables?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed as it will be handled in separate PR after this one
@@ -349,7 +358,65 @@ func (s *Server) rateLimit(next http.Handler) http.Handler { | |||
}) | |||
} | |||
|
|||
func (s *Server) createWakuTelemetry(w http.ResponseWriter, r *http.Request) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like how it sounds :D
2aba797
to
f9fef72
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great! let's iterate in following PRs
if err != nil { | ||
return err | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defer stmt.Close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
telemetry/server.go
Outdated
return | ||
} | ||
|
||
var errorDetails []map[string]interface{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be better to create a type instead?
type ErrorDetail struct {
Id string `json:"Id"`
Error string `json:"Error"`
}
And then use that type in
var errorDetails []map[string]ErrorDetail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added and included in http response when errors are encountered
f9fef72
to
0edd777
Compare
Adds a table and endpoint for tracking Waku data for the dogfooding app
This shouldn't effect any status-related telemetry