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

resource sdk: Update Resource::Merge function docs #1615

Merged
merged 1 commit into from
Sep 15, 2022

Conversation

ricekot
Copy link
Contributor

@ricekot ricekot commented Sep 14, 2022

The documented behaviour of Resource::Merge is the opposite of what it actually does.

As per https://cplusplus.com/reference/unordered_map/unordered_map/insert/, when calling insert on an unordered_map, each element is inserted only if its key is not equivalent to the key of any other element already in the container.

The documented behaviour of Resource::Merge is the opposite of what it
actually does.

As per https://cplusplus.com/reference/unordered_map/unordered_map/insert/,
when calling `insert` on an unordered_map, each element is inserted only
if its key is not equivalent to the key of any other element already in
the container.

Signed-off-by: ricekot <github@ricekot.com>
@ricekot ricekot requested a review from a team September 14, 2022 15:28
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Sep 14, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: ricekot / name: Akshath Kothari (6d89fca)

@codecov
Copy link

codecov bot commented Sep 14, 2022

Codecov Report

Merging #1615 (6d89fca) into main (c7dfc0d) will decrease coverage by 0.03%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1615      +/-   ##
==========================================
- Coverage   85.30%   85.28%   -0.02%     
==========================================
  Files         156      156              
  Lines        4978     4978              
==========================================
- Hits         4246     4245       -1     
- Misses        732      733       +1     
Impacted Files Coverage Δ
sdk/include/opentelemetry/sdk/resource/resource.h 100.00% <ø> (ø)
sdk/src/trace/batch_span_processor.cc 90.63% <0.00%> (-0.78%) ⬇️

Copy link
Member

@lalitb lalitb left a comment

Choose a reason for hiding this comment

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

Yes agree, the comment is not consistent with the code, as well as the specs. Can you fix the easyCLA failure to allow this be merged.

@ricekot
Copy link
Contributor Author

ricekot commented Sep 15, 2022

Signed the CLA.

@lalitb lalitb merged commit 82a8115 into open-telemetry:main Sep 15, 2022
@ricekot ricekot deleted the fix-resource-merge-docs branch September 15, 2022 02:35
yxue pushed a commit to yxue/opentelemetry-cpp that referenced this pull request Dec 5, 2022
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