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

NonRecordingSpan causes errors in wsgi #956

Closed
codeboten opened this issue Mar 10, 2022 · 0 comments · Fixed by #957
Closed

NonRecordingSpan causes errors in wsgi #956

codeboten opened this issue Mar 10, 2022 · 0 comments · Fixed by #957
Labels
bug Something isn't working

Comments

@codeboten
Copy link
Contributor

The following error arises from the tracecontext integration tests in the core repo:

Traceback (most recent call last):
  File "/Users/alex.ianchici/workspace/opentelemetry-python/.tox/tracecontext/lib/python3.9/site-packages/flask/app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/alex.ianchici/workspace/opentelemetry-python/.tox/tracecontext/src/opentelemetry-instrumentation-wsgi/instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/__init__.py", line 339, in __call__
    if span.kind == trace.SpanKind.SERVER:
AttributeError: 'NonRecordingSpan' object has no attribute 'kind'

It appears the problem came from this change: 2f5bbc4

@codeboten codeboten added the bug Something isn't working label Mar 10, 2022
codeboten pushed a commit to codeboten/opentelemetry-python-contrib that referenced this issue Mar 10, 2022
There was a bug caused by accessing `.kind` on a NonRecordingSpan. Added a test to validate the fix.

Fix open-telemetry#956
codeboten pushed a commit to codeboten/opentelemetry-python-contrib that referenced this issue Mar 10, 2022
There was a bug caused by accessing `.kind` on a NonRecordingSpan. Added a test to validate the fix.

Fix open-telemetry#956
ocelotl pushed a commit that referenced this issue Mar 10, 2022
* [instrumentation/wsgi] fix NonRecordingSpan bug

There was a bug caused by accessing `.kind` on a NonRecordingSpan. Added a test to validate the fix.

Fix #956

* fix lint

* use is_recording

* fix lint

* fix lint

* fix lint
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

Successfully merging a pull request may close this issue.

1 participant