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

Implement workaround for OTel spans exceptions #70

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

Implement workaround for OTel spans exceptions #70

hellais opened this issue May 1, 2024 · 0 comments

Comments

@hellais
Copy link
Member

hellais commented May 1, 2024

Sporadically we see this happening:

Traceback (most recent call last):
  File "/home/art/repos/ooni/data/oonipipeline/.venv/lib/python3.11/site-packages/opentelemetry/context/__init__.py", line 163, in detach
    _RUNTIME_CONTEXT.detach(token)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/art/repos/ooni/data/oonipipeline/.venv/lib/python3.11/site-packages/opentelemetry/context/contextvars_context.py", line 50, in detach
    self._current_context.reset(token)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: <Token var=<ContextVar name='current_context' default={} at 0x7f18a5587bf0> at 0x7f171ce74b00> was created in a different Context

There is an open ticket about this on temporal: temporalio/sdk-python#441 and a recommended workaround here: open-telemetry/opentelemetry-python#2606 (comment)

We should look into implementing it

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

No branches or pull requests

1 participant