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

soroban-rpc: Add logging for HTTP requests and JSONRPC requests #584

Merged
merged 6 commits into from
Apr 18, 2023

Conversation

2opremio
Copy link
Contributor

@2opremio 2opremio commented Apr 13, 2023

What

Each HTTP request is assigned an ID logged using the the stellar/go/support/http middleware

Within each HTTP request, each JSONRPC request is logged using the global HTTP ID and the per-request JSONRPC ID.

Additionally, I added the version and commit of soroban-rpc to the startup log.

Why

Done as part of #497

Known limitations

N/A

@2opremio 2opremio requested review from paulbellamy and tamirms April 13, 2023 14:23
@2opremio 2opremio force-pushed the standarize-logging branch 5 times, most recently from 61ae269 to 0314e89 Compare April 13, 2023 14:50
@2opremio 2opremio force-pushed the standarize-logging branch 2 times, most recently from 78fbc12 to cf7cec7 Compare April 14, 2023 09:47
Each HTTP request is assigned an ID logged using the the stellar/go/support/http middleware

Within each HTTP request, each JSONRPC request is logged using the global HTTP ID and the per-request JSONRPC id.

Additionally, I added the version and commit of soroban-rpc to the startup log.
@2opremio 2opremio force-pushed the standarize-logging branch from cf7cec7 to 22fbf5f Compare April 17, 2023 13:04
@2opremio 2opremio force-pushed the standarize-logging branch from 2e712d2 to f86eac3 Compare April 17, 2023 14:02
@paulbellamy
Copy link
Contributor

@tsachiherman

limit it to 1 log line per incoming request.

I'd suggest 2 lines per request (start and finish). In the past I've found having both useful for debugging, though start could be debug level.

@2opremio 2opremio force-pushed the standarize-logging branch from d8ddc47 to ef249be Compare April 18, 2023 10:56
@2opremio 2opremio merged commit b7dee27 into stellar:main Apr 18, 2023
@2opremio 2opremio deleted the standarize-logging branch April 18, 2023 12:32
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.

4 participants