-
Notifications
You must be signed in to change notification settings - Fork 626
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
urllib instrumentation fails for local file access #820
Comments
Thanks for reporting this. Could you please share the exception traceback and a reproducible code example? |
Traceback:
|
It's not minimal, but reproduction is as easy as specifying a local file as the schema for https://github.com/Yelp/swagger_spec_validator. |
Is "returning a non-int status code' a common thing amongst instrumentations? If not, maybe we should treat this as a special use case and address it only for urlib. |
I think in the interest of never crashing, |
When reading local files the status code is not specified and is None. This isn't handled by the instrumentation and causes an exception.
opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/__init__.py
Lines 212 to 217 in 444e0a1
The text was updated successfully, but these errors were encountered: