Repository navigation
[Exporter.Geneva] Reduce per-record allocations - #4498
Conversation
martincostello
left a comment
There was a problem hiding this comment.
Looks reasonable to me.
Are there any changes that could/should be made to extend the fuzz tests?
e241260 to
327d240
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4498 +/- ##
==========================================
+ Coverage 75.93% 76.17% +0.23%
==========================================
Files 439 439
Lines 18050 18114 +64
==========================================
+ Hits 13707 13799 +92
+ Misses 4343 4315 -28
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
martincostello
left a comment
There was a problem hiding this comment.
Looks reasonable to me but I defer to the component owners for final approval.
|
Needs some style fixes too. |
327d240 to
7a6b93c
Compare
Cut hot-path allocations in the Geneva exporter: * Cache sanitized logger category names with a lock-free copy-on-write (CAS) cache, plus an accelerated fast path that returns the original string when it is already a valid event name. The cache snapshot is a FrozenDictionary on .NET 8+ and a Dictionary elsewhere. * MetricSerializer.SerializeBase128String now writes UTF-8 directly into the buffer via GetByteCount/GetBytes instead of allocating a temp byte[] and copying. * MsgPackTraceExporter.SerializeHttpUrl writes the composed HTTP url segments straight into the msgpack buffer (back-patching the STR16 header) instead of building interpolated strings + StringBuilder; the rare >16383-char case still delegates to GetHttpUrl for byte-identical truncation. Adds byte-for-byte equivalence tests for SerializeHttpUrl and before/after allocation benchmarks for each optimization. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
7a6b93c to
c786f40
Compare
|
Adjusted |
rajkumar-rangaraj
left a comment
There was a problem hiding this comment.
LGTM
@xiang17 Could you please review before the merge?
|
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Changes
Cut hot-path allocations in the Geneva exporter:
Adds byte-for-byte equivalence tests for SerializeHttpUrl and before/after allocation benchmarks for each optimization.
Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial changes