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

Adding baggage implementation #676

Merged
merged 9 commits into from
Apr 21, 2021

Conversation

nikhil1511
Copy link
Contributor

@nikhil1511 nikhil1511 commented Apr 16, 2021

Fixes #79

Changes

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@nikhil1511 nikhil1511 requested a review from a team April 16, 2021 06:12
@codecov
Copy link

codecov bot commented Apr 16, 2021

Codecov Report

Merging #676 (75779eb) into main (2e7594e) will increase coverage by 0.10%.
The diff coverage is 98.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #676      +/-   ##
==========================================
+ Coverage   94.66%   94.76%   +0.10%     
==========================================
  Files         208      210       +2     
  Lines        9407     9644     +237     
==========================================
+ Hits         8905     9139     +234     
- Misses        502      505       +3     
Impacted Files Coverage Δ
api/include/opentelemetry/baggage/baggage.h 97.29% <97.29%> (ø)
api/include/opentelemetry/common/kv_properties.h 98.88% <100.00%> (+0.07%) ⬆️
api/include/opentelemetry/common/string_util.h 100.00% <100.00%> (ø)
api/test/baggage/baggage_test.cc 100.00% <100.00%> (ø)
api/test/common/string_util_test.cc 100.00% <100.00%> (ø)

@nikhil1511 nikhil1511 changed the title Adding baggage implementation [WIP] Adding baggage implementation Apr 16, 2021
@nikhil1511 nikhil1511 changed the title [WIP] Adding baggage implementation Adding baggage implementation Apr 19, 2021
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.

Thanks for your contribution. Looks nicely done, have few comments.

api/include/opentelemetry/baggage/baggage.h Outdated Show resolved Hide resolved
api/include/opentelemetry/baggage/baggage.h Show resolved Hide resolved
api/include/opentelemetry/baggage/baggage.h Show resolved Hide resolved
api/include/opentelemetry/baggage/baggage.h Show resolved Hide resolved
api/include/opentelemetry/baggage/baggage.h Show resolved Hide resolved
api/include/opentelemetry/baggage/baggage.h Show resolved Hide resolved
api/include/opentelemetry/baggage/baggage.h Outdated Show resolved Hide resolved
api/include/opentelemetry/baggage/baggage.h Outdated Show resolved Hide resolved
}
header_s.append(Encode(key));
header_s.push_back(kKeyValueSeparator);
header_s.append(Encode(value));
Copy link
Member

Choose a reason for hiding this comment

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

Should we ensure not to encode metadata, as it may result in double encoding ( as we don't decode it in FromHeader() )

Copy link
Contributor Author

@nikhil1511 nikhil1511 Apr 20, 2021

Choose a reason for hiding this comment

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

Yes, you are correct. Will fix this issue. Missed this bug in testcases !
Update : fixed it

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.

LGTM apart from few nitpiks.

@lalitb lalitb merged commit c8c697f into open-telemetry:main Apr 21, 2021
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.

Implement Baggage ( prev: CorrelationContext )
3 participants