You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe your environment Describe any aspect of your environment relevant to the problem, including your Python version, platform, version numbers of installed dependencies, information about your cloud hosting provider, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on main.
fromflaskimportFlask, jsonifyfromdatetimeimportdatetimefromopentelemetry.instrumentation.flaskimportFlaskInstrumentorDEFAULT_PORT=3000app=Flask("Sample API Server")
FlaskInstrumentor().instrument_app(app)
@app.route('/health')defhealth():
returnjsonify({
"health": "green",
"currentTime": datetime.utcnow().isoformat()
})
def__start_server():
"""Starts the sample server with the OTEL collector."""app.run(host='localhost', port=DEFAULT_PORT, debug=True)
if__name__=='__main__':
print("hello python")
__start_server()
What is the expected behavior?
Expected the server to startup with the Flask instrumenter.
What is the actual behavior?
Dependency error with opentelemetry sdk:
Traceback (most recent call last):
File "sample_python_api/api/server.py", line 4, in <module>
from opentelemetry.instrumentation.flask import FlaskInstrumentor
File "sample_python_api/venv/lib/python3.8/site-packages/opentelemetry/instrumentation/flask/__init__.py", line 158, in <module>
from opentelemetry.util._time import _time_ns
ModuleNotFoundError: No module named 'opentelemetry.util._time'
Looks like there's a breaking bug in this release which is depending on a non-existent module in the opentelemetry sdk.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
I couldn't reproduce this with the given package versions and application code. Feel free to re-open if this issue is reproducible and share a simple git repo.
Describe your environment Describe any aspect of your environment relevant to the problem, including your Python version, platform, version numbers of installed dependencies, information about your cloud hosting provider, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on main.
requirements.txt
Python 3.8.9
Steps to reproduce
What is the expected behavior?
What is the actual behavior?
Looks like there's a breaking bug in this release which is depending on a non-existent module in the opentelemetry sdk.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: