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

Botocore instrumentation references Django? #1010

Closed
LouisStAmour opened this issue Aug 18, 2020 · 3 comments
Closed

Botocore instrumentation references Django? #1010

LouisStAmour opened this issue Aug 18, 2020 · 3 comments

Comments

@LouisStAmour
Copy link

On line 57:

django = opentelemetry.instrumentation.botocore:BotoCoreInstrumentor

Presuming this is a bug. Found it odd when an error message I encountered was:

Instrumenting of django failed
Traceback (most recent call last):
   File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2469, in resolve
     return functools.reduce(getattr, self.attrs, module)
 AttributeError: module 'opentelemetry.instrumentation.botocore' has no attribute 'BotoCoreInstrumentor'
 
 The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/opentelemetry/instrumentation/auto_instrumentation/sitecustomize.py", line 24, in <module>
    entry_point.load()().instrument()  # type: ignore
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2461, in load
    return self.resolve()
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2471, in resolve
    raise ImportError(str(exc)) from exc
ImportError: module 'opentelemetry.instrumentation.botocore' has no attribute 'BotoCoreInstrumentor'
@lzchen
Copy link
Contributor

lzchen commented Aug 18, 2020

@LouisStAmour
Although [#1011] will fix your issue, you will still get a bug for setting the TracerProvider again in your code most likely due to this.

@ocelotl

@LouisStAmour
Copy link
Author

Thanks :)

I'll admit I was just copying and pasting from examples trying to get everything working. I had no idea what I was doing :) I've since tried using OpenCensus and after a similar period of not knowing what I was doing, I still don't have automated tracing but I do have manual tracing working, so ... I'll start with OpenCensus Python client talking to OpenTelemetry Services for now and revisit OpenTelemetry Python client later, particularly if and when logging is added, or more of the DataDog code is adopted, including Celery monitoring. For now I'll try manual instrumentation based on the DataDog examples and see how far I get. :) Sometimes automation doesn't actually save time, you know? :)

@lzchen
Copy link
Contributor

lzchen commented Aug 18, 2020

Yes you are correct. :) Thanks for finding these bugs.

@lzchen lzchen closed this as completed Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants