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

Unit test for metric stream duplication #2408

Merged
merged 1 commit into from
Sep 23, 2021

Conversation

cijothomas
Copy link
Member

Fixes #.

Changes

Please provide a brief description of the changes here.

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

  • CHANGELOG.md updated for non-trivial changes
  • Design discussion issue #
  • Changes in public API reviewed

@cijothomas cijothomas requested a review from a team September 23, 2021 18:54
@codecov
Copy link

codecov bot commented Sep 23, 2021

Codecov Report

Merging #2408 (1af2cd0) into main (61aaf2e) will increase coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2408      +/-   ##
==========================================
+ Coverage   80.24%   80.28%   +0.04%     
==========================================
  Files         232      232              
  Lines        7500     7500              
==========================================
+ Hits         6018     6021       +3     
+ Misses       1482     1479       -3     
Impacted Files Coverage Δ
...ter.ZPages/Implementation/ZPagesActivityTracker.cs 97.14% <0.00%> (-2.86%) ⬇️
...Telemetry/Internal/SelfDiagnosticsEventListener.cs 97.63% <0.00%> (+0.78%) ⬆️
...emetry.Api/Internal/OpenTelemetryApiEventSource.cs 82.35% <0.00%> (+2.94%) ⬆️
...ZPages/Implementation/ZPagesExporterEventSource.cs 62.50% <0.00%> (+6.25%) ⬆️
...Zipkin/Implementation/ZipkinExporterEventSource.cs 72.72% <0.00%> (+9.09%) ⬆️

{
var metricItems = new List<Metric>();
int metricCount = 0;
var metricExporter = new TestExporter<Metric>(ProcessExport);
Copy link
Member

Choose a reason for hiding this comment

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

Could we use InMemoryExporter?

Main reason is that we build InMemoryExporter for folks to use in their unit tests, I think we need to use it in our own tests, too.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. Once #2361 is fixed.

Copy link
Member

Choose a reason for hiding this comment

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

Does #2361 block this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

no. this particular test is not blocked.
Want to switch all the test in this class to use InMemoryExporter together once #2361 is ready.

@cijothomas cijothomas merged commit 7bd3de9 into open-telemetry:main Sep 23, 2021
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.

2 participants