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

Audit and test opentelemetry-instrumentation-celery #987

Closed
Tracked by #958
codeboten opened this issue Mar 10, 2022 · 1 comment
Closed
Tracked by #958

Audit and test opentelemetry-instrumentation-celery #987

codeboten opened this issue Mar 10, 2022 · 1 comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@codeboten
Copy link
Contributor

No description provided.

@codeboten codeboten added good first issue Good for newcomers help wanted Extra attention is needed labels Mar 10, 2022
tombruijn added a commit to tombruijn/opentelemetry-python-contrib that referenced this issue Jan 11, 2023
I noticed there were no tests for the error scenario in the Celery
package. This commit adds a basic test, based on the previous test and
how I see other packages test the error status on the span.

Part of open-telemetry#987
srikanthccv added a commit that referenced this issue Feb 3, 2023
* Add tests for errors in Celery tasks

I noticed there were no tests for the error scenario in the Celery
package. This commit adds a basic test, based on the previous test and
how I see other packages test the error status on the span.

Part of #987

* Record exception in Celery instrumentation

In addition to setting the status on the span, also record the exception
on the span. This adds an event to the span with more details about the
error, following the format other instrumentations also use.

* Update CHANGELOG with Celery record exception

* Fix lint code formatting issues

* Move Celery error tests to the functional tests

The celery tests failed on Python 3.11. This is most likely due to this
issue in billiard, a celery dependency, about it not working on Python
3.11 because of the error reported in the CI:
celery/billiard#377

It's been fixed in billiard 4.1.0, but celery is locked on billiard
version lower than 4, so it cannot use this version with the fix.

This issue does not arise on the Docker tests, because they use Python
3.9.16.

I've moved the error test span event assertions to the error test that
is available in the functional tests, and removed the unit test. That
way, the build will run successfully.

* Remove duplicate entry in changelog

This was added in a recent merge commit on this PR branch.

* Remove unused test code

With the move of the tests for tasks with errors to the functional
tests, remove the unit test's error task and unused imports.

---------

Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
@lzchen
Copy link
Contributor

lzchen commented Aug 14, 2024

#958 (comment)

@lzchen lzchen closed this as completed Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants