opentelemetry-dotnet icon indicating copy to clipboard operation
opentelemetry-dotnet copied to clipboard

[otlp] Switch to TagWriter for handling of tags/attributes

Open CodeBlanch opened this issue 1 year ago • 1 comments

Follow-up to #5476 Relates to #5475

Changes

  • Switch from TagTransformer to TagWriter design in OtlpExporter project

Details

See #5475 for information on why this is being done. The TL;DR version is this is set up to write directly onto a stream/buffer and skip all allocations completely (future work). Also there is more utilization of the base class/less duplication of logic in the tag handling for array values inside OtlpExporter code.

Merge requirement checklist

  • [X] CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • [X] Unit tests added/updated

CodeBlanch avatar May 01 '24 06:05 CodeBlanch

Codecov Report

Attention: Patch coverage is 98.68421% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 85.72%. Comparing base (6250307) to head (08843e7). Report is 205 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5585      +/-   ##
==========================================
+ Coverage   83.38%   85.72%   +2.33%     
==========================================
  Files         297      271      -26     
  Lines       12531    11369    -1162     
==========================================
- Hits        10449     9746     -703     
+ Misses       2082     1623     -459     
Flag Coverage Δ
unittests ?
unittests-Instrumentation-Experimental 87.50% <ø> (?)
unittests-Instrumentation-Stable 87.50% <ø> (?)
unittests-Solution-Experimental 85.73% <98.68%> (?)
unittests-Solution-Stable 85.64% <98.68%> (?)
unittests-Unstable-Core 19.87% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...metryProtocol/Implementation/ActivityExtensions.cs 96.13% <100.00%> (+0.20%) :arrow_up:
...rotocol/Implementation/OtlpLogRecordTransformer.cs 95.32% <100.00%> (+1.86%) :arrow_up:
...nTelemetryProtocol/Implementation/OtlpTagWriter.cs 100.00% <100.00%> (ø)
...metryProtocol/Implementation/ResourceExtensions.cs 100.00% <100.00%> (ø)
...tryProtocol/Implementation/MetricItemExtensions.cs 91.98% <75.00%> (+9.97%) :arrow_up:

... and 98 files with indirect coverage changes

codecov[bot] avatar May 01 '24 06:05 codecov[bot]