Skip to content
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

Renaming BroadcastActivity #1015

Merged
merged 3 commits into from
Aug 5, 2020
Merged

Renaming BroadcastActivity #1015

merged 3 commits into from
Aug 5, 2020

Conversation

eddynaka
Copy link
Contributor

@eddynaka eddynaka commented Aug 5, 2020

Fixes #980, #979 .

Changes

Please provide a brief description of the changes here. Update the
CHANGELOG.md for non-trivial changes.

For significant contributions please make sure you have completed the following items:

  • Design discussion issue #
  • Changes in public API reviewed

@eddynaka eddynaka requested a review from a team August 5, 2020 20:45
@codecov
Copy link

codecov bot commented Aug 5, 2020

Codecov Report

Merging #1015 into master will increase coverage by 0.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1015      +/-   ##
==========================================
+ Coverage   77.01%   77.03%   +0.01%     
==========================================
  Files         220      220              
  Lines        6083     6083              
==========================================
+ Hits         4685     4686       +1     
+ Misses       1398     1397       -1     
Impacted Files Coverage Δ
src/OpenTelemetry/Sdk.cs 94.04% <0.00%> (ø)
...elemetry/Trace/Internal/FanOutActivityProcessor.cs 92.50% <100.00%> (ø)
...nTelemetry/Internal/OpenTelemetrySdkEventSource.cs 86.76% <0.00%> (+1.47%) ⬆️

@@ -41,7 +41,7 @@ public BroadcastActivityProcessor(IEnumerable<ActivityProcessor> processors)
throw new ArgumentException($"{nameof(processors)} collection is empty");
}

this.processors = processors;
this.processors = new List<ActivityProcessor>(processors);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we cast instead of creating a new. Earlier implementation of using IEnumerable was good. Is there a reason to change this to list?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue #980 points to a perf issue

Copy link
Member

@CodeBlanch CodeBlanch Aug 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My guess would be it was changed so that if the user changes it after the call, it won't impact us. But I like it because it will also save two allocations on every Activity (when doing the foreach in OnStart & OnEnd).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CodeBlanch CodeBlanch merged commit 1758e32 into open-telemetry:master Aug 5, 2020
@eddynaka eddynaka deleted the feature/renaming-broadcastactivity branch August 14, 2020 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid IEnumerator from FanOutActivityProcessor
4 participants