-
Notifications
You must be signed in to change notification settings - Fork 0
chore: remove the ProxyInner trait #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
base: main
Are you sure you want to change the base?
Conversation
| { | ||
| Ok(jrpc_response) => jrpc_response, | ||
| Err(err) => { | ||
| warn!(error = ?err, "Failed to parse json-rpc response"); |
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.
issue:
proxy field shouldn't be removed. it helps when trouble-shooting to focus on just one kind of a proxy, and this field helps with that.
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.
proxy field is still missing in the log emitted by this line
there is a bunch of places where at some point with |
b045408 to
3335cfa
Compare
The field isn't being removed it was put in the enclosing span. That's what these lines in |
I don's see it in the logs: |
|
also, I would very much like to avoid using instrumentation spans. these are a disaster to navigate, and unless we really use some advanced tracing platform add absolutely no value. for example: {
"timestamp": "2025-10-22T14:18:43.291839Z",
"level": "INFO",
"message": "Starting websocket-proxy...",
"listen_address": "0.0.0.0:1111",
"workers_count": 10,
"target": "rproxy::server::proxy::ws::proxy",
"span": {
"proxy": "rproxy-flashblocks",
"name": "proxy_name"
},
"spans": [
{
"proxy": "rproxy-flashblocks",
"name": "proxy_name"
}
]
}^-- I will need to make +2 clicks on the structured log in the UI just to see the proxy name compare with: {
"timestamp": "2025-10-22T14:22:03.907551Z",
"level": "INFO",
"message": "Starting websocket-proxy...",
"proxy": "rproxy-flashblocks",
"listen_address": "0.0.0.0:1111",
"workers_count": 10,
"target": "rproxy::server::proxy::ws::proxy"
} |
3335cfa to
eda15bc
Compare
|
I've added the proxy field back to all the log messages. We can resolve the dispute over using spans and a custom formatter later |
| { | ||
| Ok(jrpc_response) => jrpc_response, | ||
| Err(err) => { | ||
| warn!(error = ?err, "Failed to parse json-rpc response"); |
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.
proxy field is still missing in the log emitted by this line
| Ok(jrpc_response) => jrpc_response, | ||
| Err(err) => { | ||
| warn!(proxy = Self::name(), error = ?err, "Failed to parse json-rpc response"); | ||
| warn!(error = ?err, "Failed to parse json-rpc response"); |
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.
issue:
proxy field is gone here too
This trait doesn't do anything except for getting the proxy name for logging and metrics. There are simpler ways to do this and this PR uses tracing spans and simply passes the name as an argument as necessary