Skip to content

0.34b0 opentelemetry-instrumentation-flask _time dependency failure with otel-sdk #1356

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

Closed
AchintyaAshok opened this issue Sep 27, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@AchintyaAshok
Copy link

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

Flask==2.2.2
opentelemetry-api==1.13.0
opentelemetry-sdk==1.13.0
opentelemetry-instrumentation-flask==0.34b0
  • Interpreter: Python 3.8.9

Steps to reproduce

from flask import Flask, jsonify
from datetime import datetime
from opentelemetry.instrumentation.flask import FlaskInstrumentor

DEFAULT_PORT = 3000

app = Flask("Sample API Server")
FlaskInstrumentor().instrument_app(app)

@app.route('/health')
def health():
    return jsonify({
        "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.

@AchintyaAshok AchintyaAshok added the bug Something isn't working label Sep 27, 2022
@srikanthccv
Copy link
Member

We had an issue with publishing for 0.34b0 so it never really got published to PyPI. Can you try installing now and check?

@srikanthccv
Copy link
Member

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.

@srikanthccv srikanthccv closed this as not planned Won't fix, can't repro, duplicate, stale Oct 2, 2022
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

No branches or pull requests

2 participants