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

[API] Add a new AddLink() operation to Span #2380

Merged
merged 11 commits into from
Oct 27, 2023

Conversation

marcalff
Copy link
Member

@marcalff marcalff commented Oct 19, 2023

Fixes #2361

Changes

Please provide a brief description of the changes here.

  • New API Span::AddLink() adds a single link to a span.
  • New API Span::AddLinks() adds multiple links to a span.

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

@marcalff marcalff changed the title [WIP][API] Add a new AddLink() operation to Span [WIP] [API] Add a new AddLink() operation to Span Oct 19, 2023
@marcalff marcalff added the abi:version_2 Fix is available WITH_ABI_VERSION_2 label Oct 19, 2023
@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

Merging #2380 (da23608) into main (d3a873a) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2380   +/-   ##
=======================================
  Coverage   87.43%   87.43%           
=======================================
  Files         199      199           
  Lines        6030     6030           
=======================================
  Hits         5272     5272           
  Misses        758      758           
Files Coverage Δ
api/include/opentelemetry/trace/default_span.h 13.34% <ø> (ø)
api/include/opentelemetry/trace/noop.h 93.34% <ø> (ø)
api/include/opentelemetry/trace/span.h 84.22% <ø> (ø)
...ude/opentelemetry/trace/span_context_kv_iterable.h 100.00% <ø> (ø)
sdk/src/trace/span.cc 89.66% <ø> (ø)
sdk/src/trace/span.h 100.00% <ø> (ø)

@marcalff marcalff changed the title [WIP] [API] Add a new AddLink() operation to Span [API] Add a new AddLink() operation to Span Oct 22, 2023
@marcalff marcalff marked this pull request as ready for review October 22, 2023 21:35
@marcalff marcalff requested a review from a team October 22, 2023 21:35
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. Nicely done. few nit comments.

api/include/opentelemetry/trace/span.h Show resolved Hide resolved
api/include/opentelemetry/trace/noop.h Show resolved Hide resolved
sdk/test/trace/tracer_test.cc Show resolved Hide resolved
@marcalff
Copy link
Member Author

Thanks @lalitb for the review.

Implemented 2 comments, and 3rd one is already resolved with SpanMixLinksAbiv2.

@esigo Any comments ?

Copy link
Member

@esigo esigo left a comment

Choose a reason for hiding this comment

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

LGTM
Thanks for the PR :)

@marcalff marcalff merged commit 17da6d8 into open-telemetry:main Oct 27, 2023
44 checks passed
carlosalberto pushed a commit to open-telemetry/opentelemetry-specification that referenced this pull request Oct 31, 2023
## Changes

Update spec-compliance-matrix.md for C++:

* `Get a Tracer with scope attributes` implemented by:
  * open-telemetry/opentelemetry-cpp#2371
* `Links can be recorded after span creation` implemented by:
  * open-telemetry/opentelemetry-cpp#2380
* `get_meter accepts attributes` implemented by:
  * open-telemetry/opentelemetry-cpp#2224
@marcalff marcalff deleted the fix_span_addlink_2361 branch June 3, 2024 21:03
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this pull request Oct 31, 2024
## Changes

Update spec-compliance-matrix.md for C++:

* `Get a Tracer with scope attributes` implemented by:
  * open-telemetry/opentelemetry-cpp#2371
* `Links can be recorded after span creation` implemented by:
  * open-telemetry/opentelemetry-cpp#2380
* `get_meter accepts attributes` implemented by:
  * open-telemetry/opentelemetry-cpp#2224
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abi:version_2 Fix is available WITH_ABI_VERSION_2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[API] Add a new AddLink() operation to Span
4 participants