Skip to content

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

Merged
lalitb merged 1 commit intoopen-telemetry:mainfrom
ricekot:fix-resource-merge-docs
Sep 15, 2022
Merged

resource sdk: Update Resource::Merge function docs#1615
lalitb merged 1 commit intoopen-telemetry:mainfrom
ricekot:fix-resource-merge-docs

Conversation

@ricekot
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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