SolarEdgeTech / pyctuator

Monitor Python applications using Spring Boot Admin
Apache License 2.0
175 stars 18 forks source link

pyctuator._integrate_flask() does not use passed customizer: Optional[Callable] #107

Open vsutskever opened 7 months ago

vsutskever commented 7 months ago

pyctuator._integrate_flask() does not use passed customizer: Optional[Callable]

def _integrate_flask(
            self,
            app: Any,
            pyctuator_impl: PyctuatorImpl,
            customizer: Optional[Callable],
            disabled_endpoints: Endpoints,
    ) -> bool:
        """
        This method should only be called if we detected that Flask is installed.
        It will then check whether the given app is a Flask app, and if so - it will add the Pyctuator
        endpoints to it.
        """
        from flask import Flask
        if isinstance(app, Flask):
            from pyctuator.impl.flask_pyctuator import FlaskPyctuator
            FlaskPyctuator(app, pyctuator_impl, disabled_endpoints)
            return True
        return False`