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

Always generate a new metric stream for each view an instrument matches #3148

Merged
merged 16 commits into from
Apr 12, 2022

Conversation

alanwest
Copy link
Member

@alanwest alanwest commented Apr 7, 2022

This is a follow up from #3006 (comment)

Followups included in this PR:

  • Each view an instrument matches now results separate stream.
  • View related tests have been moved to MetricViewTests.cs. (Some refactoring happened to move some helper methods from MetricApiTests.cs)
  • Tests have been expanded.

Followups not included in this PR:

@alanwest alanwest requested a review from a team as a code owner April 7, 2022 19:21
@codecov
Copy link

codecov bot commented Apr 7, 2022

Codecov Report

Merging #3148 (d5b5612) into main (4cabb23) will increase coverage by 0.02%.
The diff coverage is 91.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3148      +/-   ##
==========================================
+ Coverage   84.75%   84.77%   +0.02%     
==========================================
  Files         260      260              
  Lines        9273     9270       -3     
==========================================
  Hits         7859     7859              
+ Misses       1414     1411       -3     
Impacted Files Coverage Δ
src/OpenTelemetry/Metrics/MetricReaderExt.cs 84.40% <78.94%> (-1.67%) ⬇️
src/OpenTelemetry/Metrics/MeterProviderSdk.cs 89.50% <100.00%> (+0.31%) ⬆️
...OpenTelemetry/Metrics/MetricStreamConfiguration.cs 65.00% <100.00%> (+1.84%) ⬆️
src/OpenTelemetry/Metrics/MetricStreamIdentity.cs 90.00% <100.00%> (ø)
...Telemetry/Internal/SelfDiagnosticsEventListener.cs 97.65% <0.00%> (+0.78%) ⬆️
...emetry.Api/Internal/OpenTelemetryApiEventSource.cs 82.35% <0.00%> (+5.88%) ⬆️

Comment on lines -142 to +128
if (!metrics.Contains(existingMetric))
{
metrics.Add(existingMetric);
}

metrics.Add(existingMetric);
Copy link
Member Author

Choose a reason for hiding this comment

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

The conditional here is no longer required. Its purpose was to "merge" together identical streams resulting from different views. This primary purpose of this PR is to not do this merging.

@cijothomas cijothomas merged commit 879d3c9 into open-telemetry:main Apr 12, 2022
@alanwest alanwest deleted the alanwest/view-identifier branch September 30, 2022 22:05
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.

None yet

2 participants