You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/usr/bin/env python3
import os
import sys
from opentelemetry.instrumentation.django import DjangoInstrumentor
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "saleor.settings")
# This call is what makes the Django application be instrumented
DjangoInstrumentor().instrument()
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
I construct the Dokcerfile with handmade dockercompose file
System check identified no issues (0 silenced).
July 19, 2022 - 09:37:53
Django version 3.2.14, using settings 'saleor.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.
ERROR django.request Internal Server Error: /graphql/ [PID:23:django-main-thread]
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/local/lib/python3.9/site-packages/opentelemetry/instrumentation/django/middleware.py", line 65, in __call__
self.process_request(request)
File "/usr/local/lib/python3.9/site-packages/opentelemetry/instrumentation/django/middleware.py", line 210, in process_request
attributes = collect_request_attributes(carrier)
File "/usr/local/lib/python3.9/site-packages/opentelemetry/instrumentation/wsgi/__init__.py", line 243, in collect_request_attributes
wsgiref_util.request_uri(environ)
File "/usr/local/lib/python3.9/wsgiref/util.py", line 72, in request_uri
url = application_uri(environ)
File "/usr/local/lib/python3.9/wsgiref/util.py", line 52, in application_uri
url = environ['wsgi.url_scheme']+'://'
KeyError: 'wsgi.url_scheme'
What is the expected behavior?
wsgi.url_scheme is defined and DjangoInstrument is working
What is the actual behavior?
middleware dosenot work.
Additional context
Full
adyen==4.0.0
amqp==5.1.1; python_version >= "3.7"
aniso8601==7.0.0; python_version >= "3.6" and python_version < "4.0"
anyio==3.6.1; python_version >= "3.7" and python_full_version >= "3.6.2"
asgiref==3.5.2; python_version >= "3.7" and python_version < "4.0"
astroid==2.11.7; python_full_version >= "3.7.2"
async-timeout==4.0.2; python_version >= "3.7" and python_version < "4.0"
atomicwrites==1.4.1; python_version >= "3.7" and python_full_version < "3.0.0" and sys_platform == "win32" and python_version < "4.0" or sys_platform == "win32" and python_version >= "3.7" and python_full_version >= "3.4.0" and python_version < "4.0"
attrs==21.4.0; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4.0" or python_full_version >= "3.5.0" and python_version >= "3.7" and python_version < "4.0"
authlib==1.0.1
authorizenet==1.1.4
azure-common==1.1.28
azure-core==1.24.2; python_version >= "3.6"
azure-storage-blob==12.13.0; python_version >= "3.6"
azure-storage-common==2.1.0
babel==2.10.3; python_version >= "3.6"
beautifulsoup4==4.7.1
beautifultable==0.7.0
before-after==1.0.1
billiard==3.6.4.0; python_version >= "3.7"
black==22.6.0; python_full_version >= "3.6.2"
boto3==1.24.26; python_version >= "3.7"
botocore==1.27.26; python_version >= "3.7"
braintree==4.15.2
brotli==1.0.9; platform_python_implementation == "CPython" and python_version >= "3.7"
brotlicffi==1.0.9.2; platform_python_implementation != "CPython" and python_version >= "3.7"
cachetools==5.2.0; python_version >= "3.7" and python_version < "4.0" and (python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.7")
celery==5.2.7; python_version >= "3.7"
certifi==2022.6.15; python_version >= "3.7" and python_version < "4" and (python_version >= "3.0" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.0") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.4.0")
cffi==1.15.1; platform_python_implementation != "CPython" and python_version >= "3.7"
cfgv==3.3.1; python_full_version >= "3.6.1" and python_version >= "3.7"
charset-normalizer==2.1.0; python_version >= "3.7" and python_version < "4" and python_full_version >= "3.6.0" and (python_version >= "3.0" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.0") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.4.0")
click-didyoumean==0.3.0; python_full_version >= "3.6.2" and python_full_version < "4.0.0" and python_version >= "3.7"
click-plugins==1.1.1; python_version >= "3.7"
click-repl==0.2.0; python_version >= "3.7"
click==8.1.3; python_version >= "3.7" and python_full_version >= "3.6.2" and python_full_version < "4.0.0"
codecov==2.1.12; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.4.0")
colorama==0.4.5; sys_platform == "win32" and python_version >= "3.7" and python_full_version >= "3.7.2" and (python_version >= "3.7" and python_full_version < "3.0.0" and sys_platform == "win32" or sys_platform == "win32" and python_version >= "3.7" and python_full_version >= "3.5.0") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0") and (python_version >= "2.7" and python_full_version < "3.0.0" and platform_system == "Windows" or python_full_version >= "3.5.0" and platform_system == "Windows") and platform_system == "Windows" and (python_version >= "3.7" and python_full_version < "3.0.0" and sys_platform == "win32" and python_version < "4.0" or sys_platform == "win32" and python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.5.0")
coverage==6.4.1; python_version >= "3.7"
cryptography==37.0.4; python_version >= "3.6"
cssselect2==0.6.0; python_version >= "3.7"
deprecated==1.2.13; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.4.0"
dill==0.3.5.1; python_full_version >= "3.7.2"
distlib==0.3.4; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.7"
dj-database-url==0.5.0
dj-email-url==1.0.5
django-appconf==1.0.5; python_version >= "3.6"
django-cache-url==3.4.2
django-celery-beat==2.3.0
django-countries==7.3.2
django-debug-toolbar-request-history==0.1.4
django-debug-toolbar==3.5.0; python_version >= "3.7"
django-extensions==3.2.0; python_version >= "3.6"
django-filter==22.1; python_version >= "3.7"
django-graphiql-debug-toolbar==0.2.0; python_version >= "3.6" and python_version < "4.0"
django-js-asset==2.0.0; python_version >= "3.6"
django-measurement==3.2.4
django-mptt==0.13.4; python_version >= "3.6"
django-phonenumber-field==6.3.0; python_version >= "3.7"
django-prices-openexchangerates==1.1.0
django-prices-vatlayer==1.1.0
django-prices==2.2.0
django-redis==5.2.0; python_version >= "3.6"
django-storages==1.12.3; python_version >= "3.5"
django-stubs-ext==0.5.0; python_version >= "3.6"
django-stubs==1.8.0; python_version >= "3.6"
django-timezone-field==5.0; python_version >= "3.7" and python_version < "4.0"
django-versatileimagefield==2.2
django==3.2.14; python_version >= "3.6"
draftjs-sanitizer==1.0.0
enmerkar==0.7.1
et-xmlfile==1.1.0; python_version >= "3.6"
execnet==1.9.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
faker==13.15.0; python_version >= "3.6"
fakeredis==1.8.1; python_version >= "3.7" and python_version < "4.0"
filelock==3.7.1; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.7"
flake8==4.0.1; python_version >= "3.6"
fonttools==4.34.4; python_version >= "3.7"
freezegun==1.2.1; python_version >= "3.6"
google-api-core==2.8.2; python_version >= "3.7"
google-auth==2.9.0; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.7"
google-cloud-core==2.3.1; python_version >= "3.7"
google-cloud-pubsub==2.13.1; python_version >= "3.7"
google-cloud-storage==2.4.0; python_version >= "3.7"
google-crc32c==1.3.0; python_version >= "3.7"
google-i18n-address==2.5.2
google-measurement-protocol==1.1.0
google-resumable-media==2.3.3; python_version >= "3.7"
googleapis-common-protos==1.56.3; python_version >= "3.7"
graphene-django==2.15.0; python_version >= "3.6" and python_version < "4.0"
graphene==2.1.9
graphql-core==2.3.2; python_version >= "3.6" and python_version < "4.0"
graphql-relay==2.0.1; python_version >= "3.6" and python_version < "4.0"
grpc-google-iam-v1==0.12.4; python_version >= "3.7"
grpcio-status==1.47.0; python_version >= "3.7"
grpcio==1.47.0; python_version >= "3.7"
gunicorn==20.1.0; python_version >= "3.5"
h11==0.13.0; python_version >= "3.7"
html-to-draftjs==1.0.1
html2text==2020.1.16; python_version >= "3.5"
html5lib==1.1; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.7"
httptools==0.4.0; python_version >= "3.7" and python_full_version >= "3.5.0"
identify==2.5.1; python_version >= "3.7"
idna==3.3; python_version >= "3.7" and python_version < "4" and (python_version >= "3.0" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.0") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.4.0") and python_full_version >= "3.6.2"
importlib-metadata==4.12.0; python_version < "3.10" and python_version >= "3.7"
iniconfig==1.1.1; python_version >= "3.7" and python_version < "4.0"
isodate==0.6.1; python_version >= "3.6"
isort==5.10.1; python_full_version >= "3.6.1" and python_version < "4.0"
jaeger-client==4.8.0; python_version >= "3.7"
jinja2==3.1.2; python_version >= "3.7"
jmespath==1.0.1; python_version >= "3.7"
jsonfield==3.1.0; python_version >= "3.6"
kombu==5.2.4; python_version >= "3.7"
lazy-object-proxy==1.7.1; python_version >= "3.6" and python_full_version >= "3.7.2"
lxml==4.9.1; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
markdown==3.3.7; python_version >= "3.6"
markupsafe==2.1.1; python_version >= "3.7"
maxminddb==2.2.0; python_version >= "3.6"
mccabe==0.6.1; python_version >= "3.6" and python_full_version >= "3.7.2"
measurement==3.2.0
micawber==0.5.4
mock==1.0.1
mpmath==1.2.1; python_version >= "3.7"
msrest==0.7.1; python_version >= "3.6"
multidict==6.0.2; python_version >= "3.7"
mypy-extensions==0.4.3; python_full_version >= "3.6.2" and python_version >= "3.6"
mypy==0.960; python_version >= "3.6"
nodeenv==1.7.0; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.7.0" and python_version >= "3.7"
oauthlib==3.2.0; python_version >= "3.6"
openpyxl==3.0.10; python_version >= "3.6"
opentelemetry-api
opentelemetry-sdk
opentelemetry-exporter-jaeger
opentelemetry-instrumentation-django[asgi]
opentelemetry-opentracing-shim
opentelemetry-distro
packaging==21.3; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4.0" or python_full_version >= "3.5.0" and python_version >= "3.7" and python_version < "4.0"
pathspec==0.9.0; python_full_version >= "3.6.2"
petl==1.7.9; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.4.0")
phonenumberslite==8.12.51
pillow==9.2.0; python_version >= "3.7"
platformdirs==2.5.2; python_version >= "3.7" and python_full_version >= "3.7.2" and (python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.7")
pluggy==1.0.0; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4.0" or python_full_version >= "3.5.0" and python_version >= "3.7" and python_version < "4.0"
posuto==2022.7.0
pre-commit==2.20.0; python_version >= "3.7"
prices==1.1.0
promise==2.3; python_version >= "3.6" and python_version < "4.0"
prompt-toolkit==3.0.30; python_full_version >= "3.6.2" and python_version >= "3.7"
proto-plus==1.20.6; python_version >= "3.7"
protobuf==3.20.1; python_version >= "3.7"
psycopg2-binary==2.9.3; python_version >= "3.6"
py==1.11.0; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4.0" or python_full_version >= "3.5.0" and python_version >= "3.7" and python_version < "4.0"
pyasn1-modules==0.2.8; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.7"
pyasn1==0.4.8; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4" and (python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.7") or python_full_version >= "3.6.0" and python_version >= "3.7" and python_version < "4" and (python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.7")
pybars3==0.9.7
pycodestyle==2.8.0; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")
pycparser==2.21; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.7"
pydocstyle==6.1.1; python_version >= "3.6"
pydyf==0.2.0; python_version >= "3.7"
pyflakes==2.4.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
pyjwt==2.4.0; python_version >= "3.6"
pylint-celery==0.3
pylint-django==2.5.3
pylint-plugin-utils==0.7; python_full_version >= "3.6.2"
pylint==2.14.4; python_full_version >= "3.7.2"
pymeta3==0.5.1
pyparsing==3.0.9; python_full_version >= "3.6.8" and python_version >= "3.7" and python_version < "4.0"
pyphen==0.12.0; python_version >= "3.7"
pytest-celery==0.0.0
pytest-cov==3.0.0; python_version >= "3.6"
pytest-django-queries==1.2.0
pytest-django==4.5.2; python_version >= "3.5"
pytest-forked==1.4.0; python_version >= "3.6"
pytest-mock==3.8.2; python_version >= "3.7"
pytest-recording==0.12.1; python_version >= "3.5"
pytest-socket==0.5.1; python_version >= "3.7" and python_version < "4.0"
pytest-xdist==2.5.0; python_version >= "3.6"
pytest==7.1.2; python_version >= "3.7"
python-crontab==2.6.0
python-dateutil==2.8.2; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.3.0" and python_version >= "3.7"
python-dotenv==0.20.0; python_version >= "3.7"
python-http-client==3.3.7; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
python-json-logger==2.0.3; python_version >= "3.5"
python-magic-bin==0.4.14; sys_platform == "win32"
python-magic==0.4.27; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
pytimeparse==1.1.8
pytz==2022.1; python_version >= "3.7" and python_version < "4.0"
pywatchman==1.4.1
pyxb==1.2.5
pyyaml==6.0; python_version >= "3.7"
razorpay==1.3.0
redis==4.3.4; python_version >= "3.7" and python_version < "4.0"
requests-oauthlib==1.3.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
requests==2.28.1; python_version >= "3.7" and python_version < "4"
rsa==4.8; python_version >= "3.6" and python_version < "4" and (python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.7")
rx==1.6.1
s3transfer==0.6.0; python_version >= "3.7"
sendgrid==6.9.7; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")
sentry-sdk==1.6.0
singledispatch==3.7.0; python_version >= "3.6" and python_version < "4.0"
six==1.16.0; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.6.0"
sniffio==1.2.0; python_version >= "3.7" and python_full_version >= "3.6.2"
snowballstemmer==2.2.0; python_version >= "3.6"
sortedcontainers==2.4.0; python_version >= "3.7" and python_version < "4.0"
soupsieve==2.3.2.post1; python_version >= "3.6"
sqlparse==0.4.2; python_version >= "3.7" and python_version < "4.0"
starkbank-ecdsa==2.0.3; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
stripe==3.5.0; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.4.0")
sympy==1.10.1; python_version >= "3.7"
text-unidecode==1.3
threadloop==1.0.2; python_version >= "3.7"
thrift==0.16.0; python_version >= "3.7"
tinycss2==1.1.1; python_version >= "3.7"
toml==0.10.2; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.7"
tomli==2.0.1; python_full_version <= "3.11.0a6" and python_full_version >= "3.7.2" and python_version >= "3.7" and (python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.7") and python_version < "3.11"
tomlkit==0.11.1; python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.7.2"
tornado==6.2; python_version >= "3.7"
tox==3.25.1; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")
types-certifi==2021.10.8.3
types-freezegun==1.1.10
types-pkg-resources==0.1.3
types-python-dateutil==2.8.18
types-pytz==2021.3.8
types-redis==4.3.3
types-requests==2.28.0
types-six==1.16.17
types-urllib3==1.26.16
typing-extensions==4.3.0; python_version < "3.10" and python_full_version >= "3.7.2" and python_version >= "3.7"
tzdata==2022.1; python_version >= "2"
urllib3==1.26.10; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4" and (python_version >= "3.0" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.0") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.4.0") or python_full_version >= "3.6.0" and python_version < "4" and python_version >= "3.7" and (python_version >= "3.0" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.0") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.4.0")
uvicorn==0.17.6; python_version >= "3.7"
uvloop==0.16.0; sys_platform != "win32" and sys_platform != "cygwin" and platform_python_implementation != "PyPy" and python_version >= "3.7"
vcrpy==4.2.0; python_version >= "3.7"
vine==5.0.0; python_version >= "3.7"
virtualenv==20.15.1; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.7"
watchgod==0.8.2; python_version >= "3.7"
wcwidth==0.2.5; python_full_version >= "3.6.2" and python_version >= "3.7"
weasyprint==56.0; python_version >= "3.7"
webencodings==0.5.1; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.7"
websockets==10.3; python_version >= "3.7"
wrapt==1.14.1; python_full_version >= "3.7.2" and python_version >= "3.7" and (python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.5.0")
yarl==1.7.2; python_version >= "3.7"
zipp==3.8.0; python_version < "3.10" and python_version >= "3.7"
zopfli==0.2.1; python_version >= "3.7"
The text was updated successfully, but these errors were encountered:
Describe your environment
I am trying to instrument https://github.com/saleor/saleor with Django / opentelemetry instead of opentracing.
I have read open-telemetry/opentelemetry-python-contrib#185 , open-telemetry/opentelemetry-python-contrib#334
Those are the new requirements_dev.txt
Steps to reproduce
In
manage.py
I construct the Dokcerfile with handmade dockercompose file
Hit of the ``graphql` endpoint gives :
What is the expected behavior?
wsgi.url_scheme is defined and DjangoInstrument is working
What is the actual behavior?
middleware dosenot work.
Additional context
Full
The text was updated successfully, but these errors were encountered: