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): handle view conflicts. #2734

Merged

Conversation

pichlermarc
Copy link
Member

@pichlermarc pichlermarc commented Jan 24, 2022

Which problem is this PR solving?

This PR is part of the work on #2592 and adds a MetricStorageRegistry, as well as logic in Meter to handle conflicts with view names that are used more than once per Meter.

Currently waiting for open-telemetry/opentelemetry-specification#2317 to be merged.

Type of change

  • New feature (non-breaking change which adds functionality)

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 Jan 24, 2022

Codecov Report

Merging #2734 (2223ff7) into main (a901732) will increase coverage by 0.06%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2734      +/-   ##
==========================================
+ Coverage   93.41%   93.48%   +0.06%     
==========================================
  Files         160      163       +3     
  Lines        5467     5541      +74     
  Branches     1149     1166      +17     
==========================================
+ Hits         5107     5180      +73     
- Misses        360      361       +1     
Impacted Files Coverage Δ
...ckages/opentelemetry-sdk-metrics-base/src/Meter.ts 97.82% <0.00%> (-0.14%) ⬇️
...metry-sdk-metrics-base/src/InstrumentDescriptor.ts 100.00% <0.00%> (ø)
...ry-sdk-metrics-base/src/state/SyncMetricStorage.ts 100.00% <0.00%> (ø)
...y-sdk-metrics-base/src/state/AsyncMetricStorage.ts 100.00% <0.00%> (ø)
...emetry-sdk-metrics-base/src/state/MetricStorage.ts 100.00% <0.00%> (ø)
...sdk-metrics-base/src/view/RegistrationConflicts.ts 96.96% <0.00%> (ø)
...dk-metrics-base/src/state/MetricStorageRegistry.ts 100.00% <0.00%> (ø)

@pichlermarc pichlermarc marked this pull request as ready for review January 24, 2022 16:40
@pichlermarc pichlermarc requested a review from a team January 24, 2022 16:40
@legendecas
Copy link
Member

Link here for visibility: open-telemetry/opentelemetry-specification#2226

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.

Great works 👍 ! I'd like to wait for open-telemetry/opentelemetry-specification#2270 to land since this would really depend on lots of statements in that spec change.


export function getDescriptorIncompatibilityDetails(existing: InstrumentDescriptor, otherDescriptor: InstrumentDescriptor) {
let incompatibility = '';
if (existing.description !== otherDescriptor.description) {
Copy link
Member

Choose a reason for hiding this comment

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

Ditto.

@pichlermarc pichlermarc marked this pull request as draft January 25, 2022 14:53
@legendecas
Copy link
Member

@pichlermarc the spec team asked language sdks to prototype the changes proposed at open-telemetry/opentelemetry-specification#2317, would you mind making the changes?

@pichlermarc
Copy link
Member Author

@legendecas yes, I will pick up work on this :)

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.

Nice work! 👍

@legendecas
Copy link
Member

@pichlermarc it seems like I cannot edit this PR (merge the base branch into this PR). Would you mind updating the PR with the latest base branch so that we could merge this one?

@legendecas legendecas merged commit 5b83c18 into open-telemetry:main Mar 4, 2022
@dyladan dyladan deleted the handle-view-conflicts branch March 4, 2022 19:34
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