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

feat(views): Update addView() to disallow named views that select more than one instrument. #2820

Merged
merged 10 commits into from
Mar 20, 2022

Conversation

pichlermarc
Copy link
Member

@pichlermarc pichlermarc commented Mar 7, 2022

Which problem is this PR solving?

This PR simplifies the the public API for MeterProvider.addView() as mentioned in #2592 and makes addView() adhere to the following spec statement:

In order to avoid conflicts, views which specify a name SHOULD have an instrument selector that selects at most one instrument.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

  • Unit tests

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added
  • Documentation has been updated

@codecov
Copy link

codecov bot commented Mar 7, 2022

Codecov Report

Merging #2820 (98414aa) into main (e71a5ee) will increase coverage by 0.04%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2820      +/-   ##
==========================================
+ Coverage   93.47%   93.51%   +0.04%     
==========================================
  Files         163      163              
  Lines        5544     5570      +26     
  Branches     1168     1179      +11     
==========================================
+ Hits         5182     5209      +27     
+ Misses        362      361       -1     
Impacted Files Coverage Δ
...dk-metrics-base/src/state/MetricStorageRegistry.ts 93.75% <0.00%> (-6.25%) ⬇️
...entelemetry-sdk-metrics-base/src/view/Predicate.ts 100.00% <0.00%> (ø)
...ckages/opentelemetry-sdk-metrics-base/src/utils.ts 100.00% <0.00%> (+4.00%) ⬆️
...pentelemetry-sdk-metrics-base/src/MeterProvider.ts 75.80% <0.00%> (+18.30%) ⬆️

@legendecas
Copy link
Member

In case you missed it: this PR is still marked as WIP. You need to click the button "Ready for review" to gather attention from other approvers.

@pichlermarc pichlermarc marked this pull request as ready for review March 14, 2022 16:32
@pichlermarc pichlermarc requested a review from a team March 14, 2022 16:32
Copy link
Member

@legendecas legendecas left a comment

Choose a reason for hiding this comment

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

Thank you for your work! Overall LGTM, just one suggestion left.

@legendecas legendecas requested a review from a team March 16, 2022 16:07
Copy link
Member

@vmarchaud vmarchaud left a comment

Choose a reason for hiding this comment

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

lgtm however you'll need to rebase

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.

3 participants