Commit 221fb04
[Protocol][Shannon][Observability] Protocol shannon HTTP timeout metrics (#383)
## Summary
Replace simple HTTP relay function with comprehensive HTTP client
featuring request tracing and metrics collection
### Primary Changes:
- Introduced new httpClientWithTracing struct with detailed HTTP request
lifecycle monitoring and atomic counters for performance metrics
- Replaced sendHttpRelay function with SendHTTPRelay method that
includes comprehensive error categorization and request tracing
- Added HTTP transport optimization with configurable connection
pooling, timeout settings, and keep-alive configuration
### Secondary Changes:
- Updated requestContext and Protocol structs to include httpClient
field for centralized HTTP client management
- Added detailed logging with timing breakdowns for DNS lookup,
connection establishment, TLS handshake, and response times
- Implemented graceful shutdown functionality with connection cleanup
and statistics reporting
## Issue
Missing details on HTTP timeouts when sending relay requests to
endpoints.
- Issue or PR: #{ISSUE_OR_PR_NUMBER}
## Type of change
Select one or more from the following:
- [x] New feature, functionality or library
- [ ] Bug fix
- [ ] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)
## QoS Checklist
### E2E Validation & Tests
- [ ] `make path_up`
- [ ] `make test_e2e_evm_shannon`
### Observability
- [ ] 1. `make path_up`
- [ ] 2. Run the following E2E test: `make
test_request__shannon_relay_util_100`
- [ ] 3. View results in LocalNet's [PATH Relay Grafana
Dashboard](http://localhost:3003/d/relays/path-service-requests)
## Sanity Checklist
- [x] I have updated the GitHub Issue `assignees`, `reviewers`,
`labels`, `project`, `iteration` and `milestone`
- [ ] For docs, I have run `make docusaurus_start`
- [ ] For code, I have run `make test_all`
- [ ] For configurations, I have updated the documentation
- [x] I added `TODO`s where applicable
---------
Co-authored-by: Daniel Olshansky <[email protected]>1 parent 2ea8ed4 commit 221fb04
File tree
7 files changed
+435
-95
lines changed- observation/protocol
- protocol/shannon
- proto/path/protocol
7 files changed
+435
-95
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
98 | 106 | | |
99 | 107 | | |
100 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
73 | 76 | | |
74 | 77 | | |
75 | 78 | | |
| |||
244 | 247 | | |
245 | 248 | | |
246 | 249 | | |
247 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
248 | 258 | | |
249 | 259 | | |
250 | 260 | | |
| |||
0 commit comments