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
this is not properly documented. I would argue that just having this in hidden in some GH issues is not the proper way.
the functionality breaks with Connexion 2.1.0 (2.0.0 still works fine for me, upgrading to 2.2.0 does not help).
Expected behaviour
Usage of uwsgi_metrics integration is properly documented.
The integration is working with the current newest version of Connexion.
Actual behaviour
Documentation how to integrate this must be searched by users in GH issues or in the repo.
It does not work with Connexion 2.1.0. I get the following error message:
ERROR:flask.app:Exception on / [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.7/dist-packages/flask_cors/extension.py", line 161, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.7/dist-packages/flask/_compat.py", line 35, in reraise
raise value
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python3.7/dist-packages/connexion/decorators/decorator.py", line 48, in wrapper
response = function(request)
File "/usr/local/lib/python3.7/dist-packages/connexion/decorators/metrics.py", line 39, in wrapper
status = response.status_code
AttributeError: 'dict' object has no attribute 'status_code'
Steps to reproduce
pip3 install uwsgi_metrics3 on the system running the Connexion App (Python3 example)
i think the following steps are optional, because Connexion checks for the module if it is installed. but this is to get the full functionality in Connexion 2.1.0:
at the beginning of your code do an uwsgi_metrics.initialize()
call any endpoint of your application after adding this to your swagger/OpenAPI file:
ConnexionResponse decorator call moved after uwsgi metrics decorator call, when metrics decorator expects ConnexionResponse as return result value from the request handler
Description
It is possible to have a metrics endpoint in combination with uwsgi_metrics.
But:
Expected behaviour
Actual behaviour
Steps to reproduce
pip3 install uwsgi_metrics3
on the system running the Connexion App (Python3 example)uwsgi_metrics.initialize()
Additional info:
Output of the commands:
python --version
:Python 3.7.2
pip show connexion | grep "^Version\:"
:Version: 2.1.0
The text was updated successfully, but these errors were encountered: