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

Python Getting Started Roll the DIce: No Telemetry #3521

Closed
ArtificialBlue opened this issue Nov 8, 2023 · 6 comments
Closed

Python Getting Started Roll the DIce: No Telemetry #3521

ArtificialBlue opened this issue Nov 8, 2023 · 6 comments
Labels
bug Something isn't working sig:python

Comments

@ArtificialBlue
Copy link

What needs to be changed? Describe the update that is required.
Was trying to follow the Getting Started tutorial for Python (https://opentelemetry.io/docs/instrumentation/python/getting-started/). Executed command "opentelemetry-bootstrap -a install" and it gave back the following error log:

instrumentation for package werkzeug<3.0.0 is available but version werkzeug==3.0.1 is installed. Skipping.
ERROR: Could not find a version that satisfies the requirement opentelemetry-instrumentation-aws-lambda==0.42b0 (from versions: 0.26b1, 0.27b0, 0.28b0, 0.28b1, 0.29b0, 0.30b0, 0.30b1, 0.31b0, 0.32b0, 0.33b0, 0.34b0, 0.35b0, 0.36b0, 0.37b0, 0.38b0, 0.39b0, 0.40b0, 0.41b0)
ERROR: No matching distribution found for opentelemetry-instrumentation-aws-lambda==0.42b0
Traceback (most recent call last):
  File "/Users/alexanderlopez2/dev/PersonalScripts/OpenTelemetry/otel-getting-started/lib/python3.11/site-packages/opentelemetry/instrumentation/bootstrap.py", line 37, in wrapper
    return func(package)
           ^^^^^^^^^^^^^
  File "/Users/alexanderlopez2/dev/PersonalScripts/OpenTelemetry/otel-getting-started/lib/python3.11/site-packages/opentelemetry/instrumentation/bootstrap.py", line 53, in _sys_pip_install
    subprocess.check_call(
  File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/alexanderlopez2/dev/PersonalScripts/OpenTelemetry/otel-getting-started/bin/python3.11', '-m', 'pip', 'install', '-U', '--upgrade-strategy', 'only-if-needed', 'opentelemetry-instrumentation-aws-lambda==0.42b0']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/alexanderlopez2/dev/PersonalScripts/OpenTelemetry/otel-getting-started/bin/opentelemetry-bootstrap", line 8, in <module>
    sys.exit(run())
             ^^^^^
  File "/Users/alexanderlopez2/dev/PersonalScripts/OpenTelemetry/otel-getting-started/lib/python3.11/site-packages/opentelemetry/instrumentation/bootstrap.py", line 161, in run
    cmd()
  File "/Users/alexanderlopez2/dev/PersonalScripts/OpenTelemetry/otel-getting-started/lib/python3.11/site-packages/opentelemetry/instrumentation/bootstrap.py", line 123, in _run_install
    _sys_pip_install(lib)
  File "/Users/alexanderlopez2/dev/PersonalScripts/OpenTelemetry/otel-getting-started/lib/python3.11/site-packages/opentelemetry/instrumentation/bootstrap.py", line 45, in wrapper
    raise RuntimeError(msg)
RuntimeError: Error calling system command "/Users/alexanderlopez2/dev/PersonalScripts/OpenTelemetry/otel-getting-started/bin/python3.11 -m pip install -U --upgrade-strategy only-if-needed opentelemetry-instrumentation-aws-lambda==0.42b0" for package "opentelemetry-instrumentation-aws-lambda==0.42b0"

I tried to continue with the tutorial despite this. Ran the command:

opentelemetry-instrument \
    --traces_exporter console \
    --metrics_exporter console \
    flask run -p 8080

The application run successfully, generating a random number, but I don't see any telemetry in the console.

What is the name + path of the page that needs changed?
(https://opentelemetry.io/docs/instrumentation/python/getting-started/)

@ArtificialBlue ArtificialBlue added the bug Something isn't working label Nov 8, 2023
@ArtificialBlue
Copy link
Author

Package installation caused errors with latest versions because of release process. Downgraded to the previous versions seen here (viewable through command pip freeze)

blinker==1.7.0
click==8.1.7
Deprecated==1.2.14
Flask==2.3.3
importlib-metadata==6.8.0
itsdangerous==2.1.2
Jinja2==3.1.2
MarkupSafe==2.1.3
opentelemetry-api==1.20.0
opentelemetry-distro==0.41b0
opentelemetry-instrumentation==0.41b0
opentelemetry-instrumentation-flask==0.41b0
opentelemetry-instrumentation-wsgi==0.41b0
opentelemetry-sdk==1.20.0
opentelemetry-semantic-conventions==0.41b0
opentelemetry-util-http==0.41b0
packaging==23.2
typing_extensions==4.8.0
Werkzeug==3.0.1
wrapt==1.15.0
zipp==3.17.0

Worked and can now see the telemetry. Will continue working through the tutorial with goal of addressing Issue [Meta] Make the "Roll the dice" application the default sample application #2623 .

@svrnm
Copy link
Member

svrnm commented Nov 9, 2023

Thanks @ArtificialBlue for reporting this issue. @open-telemetry/python-approvers please take a look!

@lsfischer
Copy link

lsfischer commented Nov 17, 2023

I'm facing a similar issue also following the getting-started doc.
While I did not get an error during pip installing I also was not getting any telemetry on the console.

Like @ArtificialBlue I also downgraded opentelemetry-sdk to 1.20 and the requirements that opentelemetry-bootstrap installs to 0.41b0 instead of 0.42b0.

opentelemetry-instrumentation-aws-lambda==0.41b0
opentelemetry-instrumentation-dbapi==0.41b0
opentelemetry-instrumentation-logging==0.41b0
opentelemetry-instrumentation-sqlite3==0.41b0
opentelemetry-instrumentation-urllib==0.41b0
opentelemetry-instrumentation-wsgi==0.41b0
opentelemetry-instrumentation-flask==0.41b0

and that seemed to work

@svrnm
Copy link
Member

svrnm commented Nov 17, 2023

@open-telemetry/python-approvers please take a look!

@ekquasar
Copy link
Contributor

You need werkzeug<3. The docs just got updated.

@svrnm
Copy link
Member

svrnm commented Dec 15, 2023

Thanks for confirming @ekquasar . I will close this issue now, please re-open if you still face issues @ArtificialBlue

@svrnm svrnm closed this as completed Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sig:python
Projects
None yet
Development

No branches or pull requests

4 participants