-
Notifications
You must be signed in to change notification settings - Fork 452
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
Use native Rust support for async traits in LogExporter::export() method (11% improvement) #2374
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2374 +/- ##
=======================================
- Coverage 76.9% 76.7% -0.2%
=======================================
Files 122 122
Lines 22213 22266 +53
=======================================
+ Hits 17082 17096 +14
- Misses 5131 5170 +39 ☔ View full report in Codecov by Sentry. |
OK, have updated this PR after removing the Before this PR (the regression introduced by #2380 because of inclusion of exporter ~44 -> ~40):
After this PR:
The cons of introducing the native-async in trait would be
Current export method could be simplified a bit for lifetime specifiers. I will look into that. But in general, open for discussion if we should bump the msrv. |
Based on today's SIG discussion: Awaiting more feedback. |
This is ready for review now, with #2417 to bump msrv is merged |
Have updated the description now to reflect the improvement seen through stress test, which is ~11% |
Changes
Continuation to #2143, more to show feasibility, performance improvements, and have discussion before raising the PR for eventual review, this PR demonstrate using async traits support in Rust exporter. The support was added in Rust v1.75, while the msrv as of now is v1.70 for otel-sdk
The change is:
Existing:
PR:
There is 11% improvement as seen from stress test:
Before PR:
Number of threads: 16
Throughput: 40,468,186 iterations/sec
Throughput: 40,792,480 iterations/sec
Throughput: 40,456,227 iterations/sec
Throughput: 40,455,461 iterations/sec
After this PR:
Throughput: 44,793,174 iterations/sec
Throughput: 45,321,168 iterations/sec
Throughput: 45,387,969 iterations/sec
Throughput: 45,629,648 iterations/sec
Throughput: 45,607,326 iterations/sec
Throughput: 45,303,331 iterations/sec
Throughput: 45,634,108 iterations/sec
Thanks,
Lalit
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial, user-facing changes