Skip to content

fix(tracer): restore OpenTelemetry API compliance for context parameter#848

Open
1mike1451 wants to merge 2 commits intoinstana:mainfrom
1mike1451:main
Open

fix(tracer): restore OpenTelemetry API compliance for context parameter#848
1mike1451 wants to merge 2 commits intoinstana:mainfrom
1mike1451:main

Conversation

@1mike1451
Copy link

Add 'context' parameter to start_span() and start_as_current_span() while maintaining backward compatibility with 'span_context' parameter.

Fixes TypeError with OpenTelemetry-compliant libraries (regression from c4d4251). Includes 15 new tests, all 20 tests pass.

fixes: #847

Add 'context' parameter to start_span() and start_as_current_span()
while maintaining backward compatibility with 'span_context' parameter.

Fixes TypeError with OpenTelemetry-compliant libraries (regression from c4d4251).
Includes 15 new tests, all 20 tests pass.

Signed-off-by: Michael Ramos <ramosm@us.ibm.com>
@1mike1451 1mike1451 requested a review from a team as a code owner February 26, 2026 20:24
@github-actions
Copy link

@1mike1451 the signed-off-by was not found in the following 1 commits:

  • 92b8d3b: fix(tracer): use isinstance guard when extracting span context from OTel context

📝 What should I do to fix it?

All proposed commits should include a sign-off in their messages, ideally at the end.

❔ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO, reformatted for readability:

By making a contribution to this project, I certify that:

a. The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

b. The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

c. The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

d. I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <randomdeveloper@example.com>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'

…Tel context

Signed-off-by: Michael Ramos <ramosm@us.ibm.com>
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.

[Bug]: start_as_current_span() missing OpenTelemetry 'context' parameter

2 participants