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

BatchSpanProcessor triggers assertion error in gevent #3897

Open
davidhewitt opened this issue May 1, 2024 · 0 comments
Open

BatchSpanProcessor triggers assertion error in gevent #3897

davidhewitt opened this issue May 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@davidhewitt
Copy link

I'm getting an AssertionError when running the following code. It seems to be a combination of gevent + opentelemetry. Originally reported in pydantic/logfire#63

Minimal reproduction:

import gevent.monkey

gevent.monkey.patch_all()

from opentelemetry.sdk.trace.export import BatchSpanProcessor, SpanExporter

processor = BatchSpanProcessor(SpanExporter(), schedule_delay_millis=500)

# doing this import shows the error
import magic

Output looks like this:

$ python app.py
Traceback (most recent call last):
  File "src/gevent/_abstract_linkable.py", line 287, in gevent._gevent_c_abstract_linkable.AbstractLinkable._notify_links
  File "src/gevent/_abstract_linkable.py", line 333, in gevent._gevent_c_abstract_linkable.AbstractLinkable._notify_links
AssertionError: (None, <callback at 0x7f72a5936040 args=([],)>)
2024-05-01T14:26:07Z <callback at 0x7f72a5936040 args=([],)> failed with AssertionError

Environment:

  • Python 3.12.3
  • Ubuntu, confirmed on 22.04 & 24.04

dependencies:

Deprecated==1.2.14
gevent==24.2.1
greenlet==3.0.3
importlib-metadata==7.0.0
opentelemetry-api==1.24.0
opentelemetry-sdk==1.24.0
opentelemetry-semantic-conventions==0.45b0
python-magic==0.4.27
typing_extensions==4.11.0
wrapt==1.16.0
zipp==3.18.1
zope.event==5.0
zope.interface==6.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant