Closed stevejgordon closed 3 months ago
Attention: Patch coverage is 94.73684%
with 3 lines
in your changes missing coverage. Please review.
Project coverage is 86.22%. Comparing base (
6250307
) to head (d43e26f
). Report is 288 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
....Api/Context/Propagation/TraceContextPropagator.cs | 94.73% | 3 Missing :warning: |
This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day.
@CodeBlanch, I am just bumping here to keep this open and see if we can solve the discussion on using stackalloc
offline to move this along? I had hoped to attend the SIG to raise it, but the timing didn't work out again last night.
Sorry for the delay on this @stevejgordon! We did look at this on the SIG yesterday. @vishweshbankwar will do a review pass when he has a moment and then we'll go from there.
Contributes to #728
Changes
This PR removes almost all overhead of extracting the
tracestate
inside theTraceContextPropagator
by switching to a stack-allocated or rented buffer when building the final string. Specifically, this avoids usingStringBuilder
andHashSet
to prevent heap allocations. The execution time is also slightly improved with this approach. I've preserved the existing behaviour based on the tests.This also adds a benchmark to measure the performance of the extract method.
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial changes