Skip to content

Invalid type WSGIRequest for attribute 'request' value opentelemetry #4136

@saichander17

Description

@saichander17

Describe your environment

OS: (Alpine Docker)
Python version: (Python 3.8)
SDK version: (e.g., 1.22.0)
API version: (e.g., 1.22.0)

What happened?

Invalid type WSGIRequest for attribute 'request' value. Expected one of ['bool', 'str', 'bytes', 'int', 'float'] or a sequence of those types

I'm getting this warning when I integrated opentelemetry in my Django application. I don't know if it's a bug or I'm doing something wrong. Has anyone encountered this previously?

Steps to Reproduce

Added these to my requirements

opentelemetry-distro==0.43b0
opentelemetry-exporter-otlp==1.22.0

Added the following to my Dockerfile

RUN opentelemetry-bootstrap --action=install
ENV DJANGO_SETTINGS_MODULE myapp.settings
CMD OTEL_RESOURCE_ATTRIBUTES=service.name=testing_app OTEL_EXPORTER_OTLP_ENDPOINT="http://<IP>:4317" OTEL_EXPORTER_OTLP_PROTOCOL=grpc opentelemetry-instrument gunicorn myapp.wsgi:application -c gunicorn.conf.py

Expected Result

I shouldn't get that warning? I'm not sure here!

Actual Result

I'm getting the warning
Invalid type WSGIRequest for attribute 'request' value. Expected one of ['bool', 'str', 'bytes', 'int', 'float'] or a sequence of those types

Additional context

No response

Would you like to implement a fix?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions