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

OTEL_PROPAGATORS does not support "none" value #4143

Open
M-Sayed opened this issue Aug 22, 2024 · 5 comments
Open

OTEL_PROPAGATORS does not support "none" value #4143

M-Sayed opened this issue Aug 22, 2024 · 5 comments
Assignees
Labels
bug Something isn't working good first issue Good first issue

Comments

@M-Sayed
Copy link

M-Sayed commented Aug 22, 2024

Describe your environment

OS: Linux/amd64
Python version: Python 3.12
SDK version: I installed following libs using pip, so I assume the latest version (opentelemetry-exporter-otlp opentelemetry-instrumentation-requests opentelemetry-instrumentation-flask)
API version: I installed following libs using pip, so I assume the latest version (opentelemetry-exporter-otlp opentelemetry-instrumentation-requests opentelemetry-instrumentation-flask)

What happened?

It seems that I can't disable context propagation in Python by setting the OTEL_PROPAGATORS ENV variable to none as mentioned here.

When trying to do so, I get the following error:

{
  "message": "Uncaught exception",
  "traceback": "Traceback (most recent call last):
    File \"/usr/local/lib/python3.12/site-packages/opentelemetry/propagate/__init__.py\", line 139, in <module>
      next(  # type: ignore
  StopIteration
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File \"/cert-issuer/wsgi.py\", line 1, in <module>
      from app import app
    File \"/cert-issuer/app.py\", line 24, in <module>
      setup_instrument(app)
    File \"/cert-issuer/accredible/setup_instrument.py\", line 24, in setup_instrument
      from opentelemetry.instrumentation.flask import FlaskInstrumentor
    File \"/usr/local/lib/python3.12/site-packages/opentelemetry/instrumentation/flask/__init__.py\", line 251, in <module>
      import opentelemetry.instrumentation.wsgi as otel_wsgi
    File \"/usr/local/lib/python3.12/site-packages/opentelemetry/instrumentation/wsgi/__init__.py\", line 216, in <module>
      from opentelemetry.instrumentation._semconv import (
    File \"/usr/local/lib/python3.12/site-packages/opentelemetry/instrumentation/_semconv.py\", line 19, in <module>
      from opentelemetry.instrumentation.utils import http_status_to_status_code
    File \"/usr/local/lib/python3.12/site-packages/opentelemetry/instrumentation/utils.py\", line 32, in <module>
      from opentelemetry.propagate import extract
    File \"/usr/local/lib/python3.12/site-packages/opentelemetry/propagate/__init__.py\", line 149, in <module>
      raise ValueError(
  ValueError: Propagator none not found. It is either misspelled or not installed."
}

It seems that error happens at this line and it's because we are missing the none propagator definition here in opentelemetry-api/pyproject.toml. (I am not a python expert, so my assumption can be wrong)

Steps to Reproduce

  • set OTEL_PROPAGATORS=none
  • run the app

Expected Result

No errors are expected, and automatic propagation is disabled.

Actual Result

Error that the none propagator is not defined.

Additional context

I am not sure if setting the OTEL_PROPAGATORS="" will be valid, but according to the documentation, none should be a valid value.

Would you like to implement a fix?

None

@M-Sayed M-Sayed added the bug Something isn't working label Aug 22, 2024
@xrmx xrmx added the good first issue Good first issue label Sep 3, 2024
@Rajamanosankari
Copy link

I would like to work on this issue

@Ali-Alnosairi
Copy link
Contributor

Hi @xrmx,
Can I work on it ?

@lzchen
Copy link
Contributor

lzchen commented Sep 10, 2024

@Ali-Alnosairi

I believe @Rajamanosankari has already been assigned to this issue. Feel free to reach out to them if you'd like to collaborate or take over.

@Annosha
Copy link

Annosha commented Oct 5, 2024

@lzchen I am an Outreachy contributor for project. This is my first contribution to otel-python repo. If @Rajamanosankari isn't working can I take on this issue? Thanks

@lzchen
Copy link
Contributor

lzchen commented Oct 15, 2024

@Annosha

Seeing as @Rajamanosankari has not responded in the thread I will reassign.

@lzchen lzchen assigned Annosha and unassigned Rajamanosankari Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good first issue
Projects
None yet
Development

No branches or pull requests

6 participants