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

fix(issue#25182): eventhubs processor client start span independently #26157

Closed
wants to merge 10 commits into from

Conversation

ZejiaJiang
Copy link
Member

@ZejiaJiang ZejiaJiang commented Dec 23, 2021

processor can start span if events come from upstream with opentelemetry is not enable

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@ZejiaJiang ZejiaJiang changed the title fix(issue#25182): processor can start span if events come from upstre… fix(issue#25182): processor start span independently Dec 23, 2021
@ZejiaJiang ZejiaJiang changed the title fix(issue#25182): processor start span independently fix(issue#25182): eventhubs processor client start span independently Dec 23, 2021
@ZejiaJiang
Copy link
Member Author

fix #25182

* add requirement.txt for python

* use common mvn build

* update readme if available
@ZejiaJiang ZejiaJiang marked this pull request as ready for review December 23, 2021 07:44
@ZejiaJiang ZejiaJiang requested a review from lmolkova December 23, 2021 07:49
@ZejiaJiang
Copy link
Member Author

@lmolkova I fixed this #25182 issue and I found the same logic code in service bus. Should I fix that code as well in this PR?

@lmolkova
Copy link
Member

@lmolkova I fixed this #25182 issue and I found the same logic code in service bus. Should I fix that code as well in this PR?

this looks great! Can you please also add a test?

And yes, if you can do servicebus in this PR (or a different one, as you prefer), it would be great.

return Context.NONE;
}

Context spanContext = tracerProvider.extractContext(diagnosticId.toString(), Context.NONE)
Context spanContext = Objects.isNull(diagnosticId) ? Context.NONE : tracerProvider.extractContext(diagnosticId.toString(), Context.NONE);
spanContext = spanContext
Copy link
Member

Choose a reason for hiding this comment

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

Will this diagnosticId.toString() result in an NPE when diagnosticId is null?

Copy link
Member Author

Choose a reason for hiding this comment

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

Will this diagnosticId.toString() result in an NPE when diagnosticId is null?

the former code check diagnosticId before call the toStirng() method. The new code use Objects.IsNull() to check diagnosticId. BTW this PR is closed. And here is the new opened PR #26180

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants