Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

vor 2 Jahren
1234567891011121314151617181920
  1. import sentry_sdk
  2. from sentry_sdk.integrations.celery import CeleryIntegration
  3. from sentry_sdk.integrations.flask import FlaskIntegration
  4. from werkzeug.exceptions import HTTPException
  5. def init_app(app):
  6. if app.config.get('SENTRY_DSN'):
  7. sentry_sdk.init(
  8. dsn=app.config.get('SENTRY_DSN'),
  9. integrations=[
  10. FlaskIntegration(),
  11. CeleryIntegration()
  12. ],
  13. ignore_errors=[HTTPException, ValueError],
  14. traces_sample_rate=app.config.get('SENTRY_TRACES_SAMPLE_RATE', 1.0),
  15. profiles_sample_rate=app.config.get('SENTRY_PROFILES_SAMPLE_RATE', 1.0),
  16. environment=app.config.get('DEPLOY_ENV'),
  17. release=f"dify-{app.config.get('CURRENT_VERSION')}-{app.config.get('COMMIT_SHA')}"
  18. )