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

[PROTO] Upgrade to opentelemetry-proto v1.1.0 #2488

Merged
merged 9 commits into from
Jan 16, 2024

Conversation

marcalff
Copy link
Member

@marcalff marcalff commented Jan 11, 2024

Fixes #2487
Prepare for #2283

Changes

Please provide a brief description of the changes here.

  • Upgrade opentelemetry-proto to v1.1.0
  • Send trace flags in OtlpRecordable::SetTraceFlags()
  • Add an IsRandom() property in class IdGenerator.
  • Prepare the code to collect and send the IsRandom trace flags.

Currently, the specs complies with W3C Trace Context version 1, so that IsRandom is ignored.

When adoption of W3C Trace Context version 2 is effective, the implementation of Tracer::StartSpan() will need to change 1 line of code (using kAllW3CTraceContext2Flags instead of kAllW3CTraceContext1Flags) to complete the implementation of #2283

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

Copy link

codecov bot commented Jan 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f084fbc) 87.06% compared to head (cbeb840) 87.09%.
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2488      +/-   ##
==========================================
+ Coverage   87.06%   87.09%   +0.04%     
==========================================
  Files         199      200       +1     
  Lines        6087     6103      +16     
==========================================
+ Hits         5299     5315      +16     
  Misses        788      788              
Files Coverage Δ
api/include/opentelemetry/trace/trace_flags.h 100.00% <ø> (ø)
sdk/include/opentelemetry/sdk/trace/id_generator.h 100.00% <100.00%> (ø)
...include/opentelemetry/sdk/trace/multi_recordable.h 89.40% <100.00%> (+0.69%) ⬆️
...lude/opentelemetry/sdk/trace/random_id_generator.h 100.00% <100.00%> (ø)
sdk/include/opentelemetry/sdk/trace/recordable.h 68.75% <ø> (ø)
sdk/include/opentelemetry/sdk/trace/span_data.h 98.69% <100.00%> (+0.02%) ⬆️
sdk/src/trace/span.cc 89.78% <100.00%> (+0.12%) ⬆️
sdk/src/trace/tracer.cc 82.46% <100.00%> (+2.46%) ⬆️

@marcalff marcalff changed the title [WIP] [PROTO] Upgrade to opentelemetry-proto v1.1.0 [RFC] [PROTO] Upgrade to opentelemetry-proto v1.1.0 Jan 12, 2024
@marcalff marcalff marked this pull request as ready for review January 12, 2024 22:55
@marcalff marcalff requested a review from a team January 12, 2024 22:55
@marcalff marcalff changed the title [RFC] [PROTO] Upgrade to opentelemetry-proto v1.1.0 [PROTO] Upgrade to opentelemetry-proto v1.1.0 Jan 16, 2024
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.

* Set the trace flags of the span.
* @param flags the flags to set
*/
virtual void SetTraceFlags(opentelemetry::trace::TraceFlags flags) noexcept = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

This was a breaking change. Why not provide a no-op default implementation?

  virtual void SetTraceFlags(opentelemetry::trace::TraceFlags flags) noexcept {};

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.

[PROTO] Upgrade to opentelemetry-proto v1.1.0
5 participants