-
Notifications
You must be signed in to change notification settings - Fork 310
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
Ag/json rpc metrics #11222
Closed
Closed
Ag/json rpc metrics #11222
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alexghr
force-pushed
the
ag/track-block-building-helpers
branch
from
January 14, 2025 21:35
4456aed
to
b881440
Compare
alexghr
force-pushed
the
ag/track-block-building-helpers
branch
2 times, most recently
from
January 14, 2025 21:44
b64d50c
to
fa6aeeb
Compare
spalladino
added a commit
that referenced
this pull request
Jan 20, 2025
Uses otel's `propagate` API to push the current trace from the json rpc client to server using http headers. Client is instrumented by wrapping the `fetch` function so it creates a new span and creates the headers, and the server is instrumented by injecting new middleware that captures the headers and starts a new span for the scope of the request. Fixes #11185 Fixes #11223 Cherry-picks work by @alexghr from #11222 ### Example run Note that `traceId` is the same in both processes. Bot with pxe logs: ``` [20:08:54.763] INFO: pxe:service Sent transaction 0x125eb560f33f44a28b98f0f065197eed8a8557bcb1ab2659eb34e5be0b33a9b4 {"trace_id":"d1143080037e46c037dea7cbdf8e29d6","span_id":"236692ffb270ecb4","trace_flags":"01"} [20:08:54.763] INFO: bot Sent tx with hash 0x125eb560f33f44a28b98f0f065197eed8a8557bcb1ab2659eb34e5be0b33a9b4 {"trace_id":"d1143080037e46c037dea7cbdf8e29d6","span_id":"236692ffb270ecb4","trace_flags":"01"} ``` Node logs: ``` [20:08:54.762] INFO: node Received tx 0x125eb560f33f44a28b98f0f065197eed8a8557bcb1ab2659eb34e5be0b33a9b4 {"txHash":"0x125eb560f33f44a28b98f0f065197eed8a8557bcb1ab2659eb34e5be0b33a9b4","trace_id":"d1143080037e46c037dea7cbdf8e29d6","span_id":"5d1b907122754832","trace_flags":"01"} ``` --------- Co-authored-by: Alex Gherghisan <[email protected]>
merged in #11325 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds spans for json rpc server requests