aury-boot 0.0.34__tar.gz → 0.0.36__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. {aury_boot-0.0.34 → aury_boot-0.0.36}/PKG-INFO +1 -1
  2. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/_version.py +2 -2
  3. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/app/base.py +4 -10
  4. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/config/settings.py +18 -16
  5. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/scheduler.py +6 -3
  6. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/server/app.py +8 -5
  7. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/main.py.tpl +5 -3
  8. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/worker.py +6 -3
  9. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/common/logging/__init__.py +2 -4
  10. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/common/logging/setup.py +51 -50
  11. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/monitoring/alerting/rules.py +2 -2
  12. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/monitoring/tracing/processor.py +17 -1
  13. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/mq/backends/__init__.py +2 -0
  14. aury_boot-0.0.36/aury/boot/infrastructure/mq/backends/redis_stream.py +428 -0
  15. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/mq/base.py +1 -0
  16. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/mq/manager.py +3 -0
  17. {aury_boot-0.0.34 → aury_boot-0.0.36}/.gitignore +0 -0
  18. {aury_boot-0.0.34 → aury_boot-0.0.36}/README.md +0 -0
  19. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/__init__.py +0 -0
  20. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/__init__.py +0 -0
  21. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/adapter/__init__.py +0 -0
  22. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/adapter/base.py +0 -0
  23. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/adapter/config.py +0 -0
  24. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/adapter/decorators.py +0 -0
  25. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/adapter/exceptions.py +0 -0
  26. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/adapter/http.py +0 -0
  27. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/app/__init__.py +0 -0
  28. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/app/components.py +0 -0
  29. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/app/middlewares.py +0 -0
  30. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/app/startup.py +0 -0
  31. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/config/__init__.py +0 -0
  32. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/config/multi_instance.py +0 -0
  33. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/constants/__init__.py +0 -0
  34. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/constants/components.py +0 -0
  35. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/constants/scheduler.py +0 -0
  36. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/constants/service.py +0 -0
  37. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/errors/__init__.py +0 -0
  38. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/errors/chain.py +0 -0
  39. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/errors/codes.py +0 -0
  40. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/errors/exceptions.py +0 -0
  41. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/errors/handlers.py +0 -0
  42. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/errors/response.py +0 -0
  43. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/interfaces/__init__.py +0 -0
  44. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/interfaces/egress.py +0 -0
  45. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/interfaces/ingress.py +0 -0
  46. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/middleware/__init__.py +0 -0
  47. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/middleware/logging.py +0 -0
  48. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/migrations/__init__.py +0 -0
  49. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/migrations/manager.py +0 -0
  50. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/migrations/setup.py +0 -0
  51. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/rpc/__init__.py +0 -0
  52. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/rpc/base.py +0 -0
  53. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/rpc/client.py +0 -0
  54. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/rpc/discovery.py +0 -0
  55. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/scheduler/__init__.py +0 -0
  56. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/scheduler/runner.py +0 -0
  57. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/application/server/__init__.py +0 -0
  58. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/__init__.py +0 -0
  59. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/add.py +0 -0
  60. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/app.py +0 -0
  61. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/config.py +0 -0
  62. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/docker.py +0 -0
  63. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/docs.py +0 -0
  64. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/generate.py +0 -0
  65. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/init.py +0 -0
  66. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/migrate/__init__.py +0 -0
  67. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/migrate/app.py +0 -0
  68. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/migrate/commands.py +0 -0
  69. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/pkg.py +0 -0
  70. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/server/__init__.py +0 -0
  71. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/generate/api.py.tpl +0 -0
  72. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/generate/model.py.tpl +0 -0
  73. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/generate/repository.py.tpl +0 -0
  74. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/generate/schema.py.tpl +0 -0
  75. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/generate/service.py.tpl +0 -0
  76. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/AGENTS.md.tpl +0 -0
  77. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/README.md.tpl +0 -0
  78. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/admin_console_init.py.tpl +0 -0
  79. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/alert_rules.example.yaml.tpl +0 -0
  80. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/aury_docs/00-overview.md.tpl +0 -0
  81. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/aury_docs/01-model.md.tpl +0 -0
  82. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/aury_docs/02-repository.md.tpl +0 -0
  83. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/aury_docs/03-service.md.tpl +0 -0
  84. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/aury_docs/04-schema.md.tpl +0 -0
  85. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/aury_docs/05-api.md.tpl +0 -0
  86. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/aury_docs/06-exception.md.tpl +0 -0
  87. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/aury_docs/07-cache.md.tpl +0 -0
  88. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/aury_docs/08-scheduler.md.tpl +0 -0
  89. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/aury_docs/09-tasks.md.tpl +0 -0
  90. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/aury_docs/10-storage.md.tpl +0 -0
  91. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/aury_docs/11-logging.md.tpl +0 -0
  92. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/aury_docs/12-admin.md.tpl +0 -0
  93. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/aury_docs/13-channel.md.tpl +0 -0
  94. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/aury_docs/14-mq.md.tpl +0 -0
  95. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/aury_docs/15-events.md.tpl +0 -0
  96. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/aury_docs/16-adapter.md.tpl +0 -0
  97. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/aury_docs/17-alerting.md.tpl +0 -0
  98. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/aury_docs/99-cli.md.tpl +0 -0
  99. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/config.py.tpl +0 -0
  100. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/conftest.py.tpl +0 -0
  101. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/env_templates/_header.tpl +0 -0
  102. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/env_templates/admin.tpl +0 -0
  103. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/env_templates/cache.tpl +0 -0
  104. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/env_templates/database.tpl +0 -0
  105. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/env_templates/log.tpl +0 -0
  106. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/env_templates/messaging.tpl +0 -0
  107. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/env_templates/monitoring.tpl +0 -0
  108. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/env_templates/rpc.tpl +0 -0
  109. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/env_templates/scheduler.tpl +0 -0
  110. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/env_templates/service.tpl +0 -0
  111. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/env_templates/storage.tpl +0 -0
  112. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/env_templates/third_party.tpl +0 -0
  113. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/gitignore.tpl +0 -0
  114. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/modules/api.py.tpl +0 -0
  115. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/modules/exceptions.py.tpl +0 -0
  116. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/modules/schedules.py.tpl +0 -0
  117. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/commands/templates/project/modules/tasks.py.tpl +0 -0
  118. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/common/__init__.py +0 -0
  119. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/common/exceptions/__init__.py +0 -0
  120. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/common/i18n/__init__.py +0 -0
  121. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/common/i18n/translator.py +0 -0
  122. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/common/logging/context.py +0 -0
  123. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/common/logging/decorators.py +0 -0
  124. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/common/logging/format.py +0 -0
  125. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/contrib/__init__.py +0 -0
  126. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/contrib/admin_console/__init__.py +0 -0
  127. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/contrib/admin_console/auth.py +0 -0
  128. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/contrib/admin_console/discovery.py +0 -0
  129. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/contrib/admin_console/install.py +0 -0
  130. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/contrib/admin_console/utils.py +0 -0
  131. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/domain/__init__.py +0 -0
  132. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/domain/exceptions/__init__.py +0 -0
  133. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/domain/models/__init__.py +0 -0
  134. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/domain/models/base.py +0 -0
  135. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/domain/models/mixins.py +0 -0
  136. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/domain/models/models.py +0 -0
  137. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/domain/pagination/__init__.py +0 -0
  138. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/domain/repository/__init__.py +0 -0
  139. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/domain/repository/impl.py +0 -0
  140. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/domain/repository/interceptors.py +0 -0
  141. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/domain/repository/interface.py +0 -0
  142. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/domain/repository/query_builder.py +0 -0
  143. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/domain/service/__init__.py +0 -0
  144. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/domain/service/base.py +0 -0
  145. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/domain/transaction/__init__.py +0 -0
  146. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/__init__.py +0 -0
  147. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/cache/__init__.py +0 -0
  148. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/cache/backends.py +0 -0
  149. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/cache/base.py +0 -0
  150. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/cache/exceptions.py +0 -0
  151. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/cache/factory.py +0 -0
  152. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/cache/manager.py +0 -0
  153. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/channel/__init__.py +0 -0
  154. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/channel/backends/__init__.py +0 -0
  155. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/channel/backends/broadcaster.py +0 -0
  156. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/channel/base.py +0 -0
  157. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/channel/manager.py +0 -0
  158. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/clients/__init__.py +0 -0
  159. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/clients/rabbitmq/__init__.py +0 -0
  160. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/clients/rabbitmq/config.py +0 -0
  161. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/clients/rabbitmq/manager.py +0 -0
  162. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/clients/redis/__init__.py +0 -0
  163. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/clients/redis/config.py +0 -0
  164. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/clients/redis/manager.py +0 -0
  165. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/database/__init__.py +0 -0
  166. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/database/config.py +0 -0
  167. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/database/exceptions.py +0 -0
  168. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/database/manager.py +0 -0
  169. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/database/query_tools/__init__.py +0 -0
  170. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/database/strategies/__init__.py +0 -0
  171. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/di/__init__.py +0 -0
  172. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/di/container.py +0 -0
  173. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/events/__init__.py +0 -0
  174. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/events/backends/__init__.py +0 -0
  175. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/events/backends/broadcaster.py +0 -0
  176. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/events/backends/rabbitmq.py +0 -0
  177. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/events/base.py +0 -0
  178. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/events/manager.py +0 -0
  179. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/events/middleware.py +0 -0
  180. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/monitoring/__init__.py +0 -0
  181. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/monitoring/alerting/__init__.py +0 -0
  182. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/monitoring/alerting/aggregator.py +0 -0
  183. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/monitoring/alerting/events.py +0 -0
  184. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/monitoring/alerting/manager.py +0 -0
  185. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/monitoring/alerting/notifiers/__init__.py +0 -0
  186. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/monitoring/alerting/notifiers/base.py +0 -0
  187. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/monitoring/alerting/notifiers/feishu.py +0 -0
  188. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/monitoring/alerting/notifiers/webhook.py +0 -0
  189. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/monitoring/health/__init__.py +0 -0
  190. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/monitoring/tracing/__init__.py +0 -0
  191. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/monitoring/tracing/context.py +0 -0
  192. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/monitoring/tracing/logging.py +0 -0
  193. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/monitoring/tracing/provider.py +0 -0
  194. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/monitoring/tracing/tracing.py +0 -0
  195. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/mq/__init__.py +0 -0
  196. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/mq/backends/rabbitmq.py +0 -0
  197. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/mq/backends/redis.py +0 -0
  198. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/scheduler/__init__.py +0 -0
  199. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/scheduler/exceptions.py +0 -0
  200. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/scheduler/manager.py +0 -0
  201. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/storage/__init__.py +0 -0
  202. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/storage/base.py +0 -0
  203. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/storage/exceptions.py +0 -0
  204. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/storage/factory.py +0 -0
  205. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/tasks/__init__.py +0 -0
  206. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/tasks/config.py +0 -0
  207. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/tasks/constants.py +0 -0
  208. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/tasks/exceptions.py +0 -0
  209. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/infrastructure/tasks/manager.py +0 -0
  210. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/testing/__init__.py +0 -0
  211. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/testing/base.py +0 -0
  212. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/testing/client.py +0 -0
  213. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/testing/factory.py +0 -0
  214. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/toolkit/__init__.py +0 -0
  215. {aury_boot-0.0.34 → aury_boot-0.0.36}/aury/boot/toolkit/http/__init__.py +0 -0
  216. {aury_boot-0.0.34 → aury_boot-0.0.36}/pyproject.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aury-boot
3
- Version: 0.0.34
3
+ Version: 0.0.36
4
4
  Summary: Aury Boot - 基于 FastAPI 生态的企业级 API 开发框架
5
5
  Requires-Python: >=3.13
6
6
  Requires-Dist: alembic>=1.17.2
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.0.34'
32
- __version_tuple__ = version_tuple = (0, 0, 34)
31
+ __version__ = version = '0.0.36'
32
+ __version_tuple__ = version_tuple = (0, 0, 36)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -280,7 +280,7 @@ class FoundationApp(FastAPI):
280
280
  title: str = "Aury Service",
281
281
  version: str = "1.0.0",
282
282
  description: str | None = None,
283
- intercept_loggers: list[str] | None = None,
283
+ logger_levels: list[tuple[str, str]] | None = None,
284
284
  **kwargs: Any,
285
285
  ) -> None:
286
286
  """初始化应用。
@@ -290,9 +290,8 @@ class FoundationApp(FastAPI):
290
290
  title: 应用标题
291
291
  version: 应用版本
292
292
  description: 应用描述
293
- intercept_loggers: 额外需要拦截的标准 logging logger 名称列表,
294
- 会追加到框架默认列表 (uvicorn, sqlalchemy.engine )
295
- 也可通过配置 LOG__INTERCEPT_LOGGERS 设置。
293
+ logger_levels: 需要设置特定级别的 logger 列表,格式: [("name", "LEVEL"), ...]
294
+ 例如: [("sse_starlette", "WARNING"), ("httpx", "INFO")]
296
295
  **kwargs: 传递给 FastAPI 的其他参数
297
296
  """
298
297
  # 加载配置
@@ -304,11 +303,6 @@ class FoundationApp(FastAPI):
304
303
  frame = sys._getframe(1)
305
304
  self._caller_module = frame.f_globals.get("__name__", "__main__")
306
305
 
307
- # 合并 intercept_loggers:参数 + 配置
308
- merged_intercept = list(config.log.intercept_loggers)
309
- if intercept_loggers:
310
- merged_intercept.extend(intercept_loggers)
311
-
312
306
  # 初始化日志(必须在其他操作之前)
313
307
  setup_logging(
314
308
  log_level=config.log.level,
@@ -318,7 +312,7 @@ class FoundationApp(FastAPI):
318
312
  retention_days=config.log.retention_days,
319
313
  enable_file_rotation=config.log.enable_file_rotation,
320
314
  enable_console=config.log.enable_console,
321
- intercept_loggers=merged_intercept,
315
+ logger_levels=logger_levels,
322
316
  )
323
317
 
324
318
  # 注册 access 日志(HTTP 请求日志)
@@ -401,14 +401,6 @@ class LogSettings(BaseModel):
401
401
  default=False,
402
402
  description="是否记录 WebSocket 消息内容(注意性能和敏感数据)"
403
403
  )
404
- intercept_loggers: list[str] = Field(
405
- default_factory=list,
406
- description=(
407
- "额外需要由 loguru 接管的标准 logging logger 名称列表。"
408
- "框架默认已拦截 uvicorn、uvicorn.error、uvicorn.access、sqlalchemy.engine,"
409
- "此处配置会追加到默认列表。"
410
- ),
411
- )
412
404
 
413
405
 
414
406
  class ServiceSettings(BaseModel):
@@ -538,24 +530,25 @@ class MessageQueueSettings(BaseModel):
538
530
  """消息队列配置。
539
531
 
540
532
  环境变量格式: MQ__{FIELD}
541
- 示例: MQ__BROKER_URL, MQ__DEFAULT_QUEUE, MQ__SERIALIZER
533
+ 示例: MQ__BACKEND, MQ__URL, MQ__BROKER_URL
542
534
 
543
535
  与 Task(任务队列)的区别:
544
536
  - Task: 基于 Dramatiq,用于异步任务处理(API + Worker 模式)
545
537
  - MQ: 通用消息队列,用于服务间通信、事件驱动架构
546
538
 
547
539
  支持的后端:
548
- - Redis: redis://localhost:6379/0
549
- - RabbitMQ: amqp://guest:guest@localhost:5672//
540
+ - redis: redis://localhost:6379/0
541
+ - redis_stream: redis://localhost:6379/0
542
+ - rabbitmq: amqp://guest:guest@localhost:5672//
550
543
  """
551
544
 
552
- enabled: bool = Field(
553
- default=False,
554
- description="是否启用消息队列组件"
545
+ backend: str = Field(
546
+ default="",
547
+ description="消息队列后端 (redis/redis_stream/rabbitmq),空字符串表示不启用"
555
548
  )
556
- broker_url: str | None = Field(
549
+ url: str | None = Field(
557
550
  default=None,
558
- description="消息队列代理 URL"
551
+ description="连接 URL"
559
552
  )
560
553
  default_queue: str = Field(
561
554
  default="default",
@@ -1009,6 +1002,7 @@ class BaseConfig(BaseSettings):
1009
1002
  # ========== 异步与事件 ==========
1010
1003
  task: TaskSettings = Field(default_factory=TaskSettings)
1011
1004
  event: EventSettings = Field(default_factory=EventSettings)
1005
+ mq: MessageQueueSettings = Field(default_factory=MessageQueueSettings)
1012
1006
 
1013
1007
  # ========== 微服务通信 ==========
1014
1008
  # RPC 客户端配置(调用其他服务)
@@ -1116,10 +1110,18 @@ class BaseConfig(BaseSettings):
1116
1110
  """获取所有消息队列实例配置。
1117
1111
 
1118
1112
  从环境变量解析 MQ__{INSTANCE}__{FIELD} 格式的配置。
1113
+ 如果没有配置多实例,返回从单实例配置转换的 default 实例。
1119
1114
  """
1120
1115
  if self._mqs is None:
1121
1116
  loader = MultiInstanceConfigLoader("MQ", MQInstanceConfig)
1122
1117
  self._mqs = loader.load()
1118
+ if not self._mqs and self.mq.backend:
1119
+ self._mqs = {
1120
+ "default": MQInstanceConfig(
1121
+ backend=self.mq.backend,
1122
+ url=self.mq.url,
1123
+ )
1124
+ }
1123
1125
  return self._mqs
1124
1126
 
1125
1127
  def get_events(self) -> dict[str, EventInstanceConfig]:
@@ -84,9 +84,12 @@ def run_scheduler(
84
84
  module = __import__(module_path, fromlist=[app_name])
85
85
  application = getattr(module, app_name)
86
86
 
87
- # 设置日志上下文
88
- from aury.boot.common.logging import set_service_context
89
- set_service_context("scheduler")
87
+ # 设置日志(必须在其他操作之前)
88
+ from aury.boot.common.logging import setup_logging
89
+ setup_logging(
90
+ log_level=getattr(application, "_config", None) and application._config.log.level or "INFO",
91
+ service_type="scheduler",
92
+ )
90
93
 
91
94
  # 获取调度器
92
95
  from aury.boot.infrastructure.scheduler import SchedulerManager
@@ -9,6 +9,7 @@ import sys
9
9
  from typing import TYPE_CHECKING
10
10
 
11
11
  import typer
12
+ import uvicorn
12
13
 
13
14
  if TYPE_CHECKING:
14
15
  from aury.boot.application.app.base import FoundationApp
@@ -416,7 +417,6 @@ def dev(
416
417
  os_module.environ["AURIMYTH_RELOAD"] = "1"
417
418
 
418
419
  # 热重载模式下,直接使用 uvicorn,传递 app 字符串路径
419
- import uvicorn
420
420
  uvicorn.run(
421
421
  app=app_module_path,
422
422
  host=server_host,
@@ -500,19 +500,22 @@ def prod(
500
500
  typer.echo(" 热重载: ❌")
501
501
  typer.echo(" 调试模式: ❌")
502
502
 
503
+ # 获取 app 模块路径(多进程模式需要字符串格式)
504
+ app_module_path = app_path or _detect_app_module()
505
+ typer.echo(f" 应用模块: {app_module_path}")
506
+
503
507
  try:
504
- server = ApplicationServer(
505
- app=app_instance,
508
+ # 多进程模式必须使用字符串路径,否则子进程无法重新加载应用
509
+ uvicorn.run(
510
+ app=app_module_path,
506
511
  host=server_host,
507
512
  port=server_port,
508
513
  workers=server_workers,
509
514
  reload=False,
510
515
  loop="auto",
511
516
  http="auto",
512
- debug=False,
513
517
  access_log=True,
514
518
  )
515
- server.run()
516
519
  except KeyboardInterrupt:
517
520
  typer.echo("\n👋 服务器已停止")
518
521
  except Exception as e:
@@ -25,15 +25,17 @@ config = AppConfig()
25
25
  # - HEALTH_CHECK_PATH: 健康检查路径(默认 /api/health)
26
26
  # - HEALTH_CHECK_ENABLED: 是否启用(默认 true)
27
27
  #
28
- # 日志拦截:
29
- # 框架默认拦截 uvicorn/sqlalchemy.engine,可通过 intercept_loggers 追加额外的 logger
28
+ # 日志:
29
+ # 框架自动全局接管所有 logging,无需配置
30
+ # 要查看 TRACE 级别日志,设置 LOG__LEVEL=TRACE
31
+ # 要屏蔽某些库的 DEBUG 日志,使用 logger_levels 参数
30
32
  #
31
33
  app = FoundationApp(
32
34
  title="{project_name}",
33
35
  version="0.1.0",
34
36
  description="{project_name} - 基于 Aury Boot",
35
37
  config=config,
36
- intercept_loggers=[],
38
+ # logger_levels=[("sse_starlette", "WARNING")], # 可选:设置特定库的日志级别
37
39
  )
38
40
 
39
41
  # 注册 API 路由
@@ -100,9 +100,12 @@ def run_worker(
100
100
  module = __import__(module_path, fromlist=[app_name])
101
101
  application = getattr(module, app_name)
102
102
 
103
- # 设置日志上下文
104
- from aury.boot.common.logging import set_service_context
105
- set_service_context("worker")
103
+ # 设置日志(必须在其他操作之前)
104
+ from aury.boot.common.logging import setup_logging
105
+ setup_logging(
106
+ log_level=getattr(application, "_config", None) and application._config.log.level or "INFO",
107
+ service_type="worker",
108
+ )
106
109
 
107
110
  # 尝试导入 dramatiq
108
111
  try:
@@ -41,14 +41,13 @@ from aury.boot.common.logging.format import (
41
41
  log_exception,
42
42
  )
43
43
  from aury.boot.common.logging.setup import (
44
- DEFAULT_INTERCEPT_LOGGERS,
44
+ TRACE,
45
45
  register_log_sink,
46
- setup_intercept,
47
46
  setup_logging,
48
47
  )
49
48
 
50
49
  __all__ = [
51
- "DEFAULT_INTERCEPT_LOGGERS",
50
+ "TRACE",
52
51
  "ServiceContext",
53
52
  "format_exception_java_style",
54
53
  "get_class_logger",
@@ -61,7 +60,6 @@ __all__ = [
61
60
  "register_log_sink",
62
61
  "set_service_context",
63
62
  "set_trace_id",
64
- "setup_intercept",
65
63
  "setup_logging",
66
64
  ]
67
65
 
@@ -11,6 +11,25 @@ from typing import Any
11
11
 
12
12
  from loguru import logger
13
13
 
14
+ # =============================================================================
15
+ # TRACE Level 支持
16
+ # =============================================================================
17
+ # 标准 logging 没有 TRACE,需要手动添加
18
+ # TRACE (5) < DEBUG (10),用于超细粒度调试(如每个 streaming chunk)
19
+ TRACE = 5
20
+ logging.addLevelName(TRACE, "TRACE")
21
+
22
+
23
+ def _add_trace_method() -> None:
24
+ """为标准 logging.Logger 添加 trace() 方法。"""
25
+ def trace(self: logging.Logger, msg: str, *args: Any, **kwargs: Any) -> None:
26
+ if self.isEnabledFor(TRACE):
27
+ self._log(TRACE, msg, args, **kwargs)
28
+
29
+ logging.Logger.trace = trace # type: ignore[attr-defined]
30
+
31
+ _add_trace_method()
32
+
14
33
  from aury.boot.common.logging.context import (
15
34
  ServiceContext,
16
35
  _to_service_context,
@@ -89,31 +108,27 @@ def register_log_sink(
89
108
  logger.debug(f"注册日志 sink: {name} (filter_key={filter_key})")
90
109
 
91
110
 
92
- # 默认拦截的标准 logging 日志记录器
93
- # - uvicorn: Uvicorn 服务器日志
94
- # - uvicorn.error: Uvicorn 错误日志
95
- # - sqlalchemy.engine: SQLAlchemy SQL 语句日志
96
- # 注意:uvicorn.access 不拦截,因为框架有自己的 RequestLoggingMiddleware
97
- DEFAULT_INTERCEPT_LOGGERS = [
98
- "uvicorn",
99
- "uvicorn.error",
100
- "sqlalchemy.engine",
101
- ]
102
-
103
111
 
104
112
  class _InterceptHandler(logging.Handler):
105
113
  """将标准 logging 日志转发到 loguru 的处理器。"""
106
114
 
107
115
  def emit(self, record: logging.LogRecord) -> None:
108
116
  # 获取对应的 loguru 级别
117
+ # loguru 原生支持 TRACE,标准 logging 的 TRACE(5) 会自动映射
109
118
  try:
110
119
  level = logger.level(record.levelname).name
111
120
  except ValueError:
112
121
  level = record.levelno
113
122
 
114
123
  # 查找调用者的帧深度
115
- frame, depth = logging.currentframe(), 2
116
- while frame and frame.f_code.co_filename == logging.__file__:
124
+ # 跳过 logging 模块和本文件的所有帧
125
+ frame = logging.currentframe()
126
+ depth = 0
127
+ while frame is not None:
128
+ filename = frame.f_code.co_filename
129
+ # 跳过 logging 模块、本文件、loguru 内部
130
+ if "logging" not in filename and "loguru" not in filename:
131
+ break
117
132
  frame = frame.f_back
118
133
  depth += 1
119
134
 
@@ -122,35 +137,22 @@ class _InterceptHandler(logging.Handler):
122
137
  )
123
138
 
124
139
 
125
- def _setup_intercept(logger_names: list[str]) -> None:
126
- """ loguru 接管指定的标准 logging 日志记录器。"""
127
- handler = _InterceptHandler()
128
- for name in logger_names:
129
- std_logger = logging.getLogger(name)
130
- std_logger.handlers = [handler]
131
- std_logger.setLevel(logging.DEBUG)
132
- std_logger.propagate = False
133
-
134
-
135
- def setup_intercept(logger_names: list[str] | None = None) -> None:
136
- """拦截标准 logging 日志记录器并转发到 loguru。
137
-
138
- 用于独立脚本/CLI 入口点(不使用 FoundationApp 时)。
139
- FoundationApp 会自动调用此函数,无需手动调用。
140
-
140
+ def _setup_global_intercept(logger_levels: list[tuple[str, str]] | None = None) -> None:
141
+ """全局接管所有标准 logging,转发到 loguru。
142
+
143
+ 这样任何使用 logging.getLogger() 的库都会自动被接管。
144
+
141
145
  Args:
142
- logger_names: 额外需要拦截的 logger 名称列表,
143
- 会追加到默认列表 (uvicorn, sqlalchemy.engine )
144
-
145
- 使用示例::
146
-
147
- from aury.boot.common.logging import setup_logging, setup_intercept
148
-
149
- setup_logging(log_level="DEBUG")
150
- setup_intercept(["my_package", "third_party_lib"])
146
+ logger_levels: 需要设置特定级别的 logger 列表,格式: [("name", "LEVEL"), ...]
147
+ 例如: [("sse_starlette", "WARNING"), ("httpx", "INFO")]
151
148
  """
152
- to_intercept = DEFAULT_INTERCEPT_LOGGERS + (logger_names or [])
153
- _setup_intercept(to_intercept)
149
+ logging.root.handlers = [_InterceptHandler()]
150
+ logging.root.setLevel(TRACE) # 接收所有级别,包括 TRACE
151
+
152
+ # 对指定的 logger 设置特定级别
153
+ if logger_levels:
154
+ for name, level in logger_levels:
155
+ logging.getLogger(name).setLevel(level.upper())
154
156
 
155
157
 
156
158
  def setup_logging(
@@ -162,7 +164,7 @@ def setup_logging(
162
164
  retention_days: int = 7,
163
165
  rotation_size: str = "50 MB",
164
166
  enable_console: bool = True,
165
- intercept_loggers: list[str] | None = None,
167
+ logger_levels: list[tuple[str, str]] | None = None,
166
168
  ) -> None:
167
169
  """设置日志配置。
168
170
 
@@ -177,7 +179,7 @@ def setup_logging(
177
179
  可通过 register_log_sink() 注册额外的日志文件(如 access.log)。
178
180
 
179
181
  Args:
180
- log_level: 日志级别(DEBUG/INFO/WARNING/ERROR/CRITICAL)
182
+ log_level: 日志级别(DEBUG/INFO/WARNING/ERROR/CRITICAL/TRACE
181
183
  log_dir: 日志目录(默认:./logs)
182
184
  service_type: 服务类型(app/scheduler/worker)
183
185
  enable_file_rotation: 是否启用日志轮转
@@ -185,8 +187,8 @@ def setup_logging(
185
187
  retention_days: 日志保留天数(默认:7 天)
186
188
  rotation_size: 单文件大小上限(默认:50 MB)
187
189
  enable_console: 是否输出到控制台
188
- intercept_loggers: 额外需要拦截的标准 logging logger 名称列表,
189
- 会追加到默认列表 (uvicorn, sqlalchemy.engine )
190
+ logger_levels: 需要设置特定级别的 logger 列表,格式: [("name", "LEVEL"), ...]
191
+ 例如: [("sse_starlette", "WARNING"), ("httpx", "INFO")]
190
192
  """
191
193
  log_level = log_level.upper()
192
194
  log_dir = log_dir or "logs"
@@ -273,16 +275,15 @@ def setup_logging(
273
275
  filter=lambda record, c=ctx: record["extra"].get("service") == c,
274
276
  )
275
277
 
276
- # 拦截标准 logging 日志并转发到 loguru
277
- to_intercept = DEFAULT_INTERCEPT_LOGGERS + (intercept_loggers or [])
278
- _setup_intercept(to_intercept)
278
+ # 全局拦截标准 logging 日志并转发到 loguru
279
+ # 所有使用 logging.getLogger() 的库自动被接管
280
+ _setup_global_intercept(logger_levels=logger_levels)
279
281
 
280
- logger.info(f"日志系统初始化完成 | 服务: {service_type} | 级别: {log_level} | 目录: {log_dir}")
282
+ logger.info
281
283
 
282
284
 
283
285
  __all__ = [
284
- "DEFAULT_INTERCEPT_LOGGERS",
286
+ "TRACE",
285
287
  "register_log_sink",
286
- "setup_intercept",
287
288
  "setup_logging",
288
289
  ]
@@ -107,14 +107,14 @@ class AlertRule:
107
107
  # 检查路径
108
108
  if self._path_regex:
109
109
  endpoint = event.metadata.get("endpoint", "")
110
- if not self._path_regex.match(endpoint):
110
+ if not self._path_regex.fullmatch(endpoint):
111
111
  return False
112
112
 
113
113
  # 检查排除路径
114
114
  if self._exclude_regexes:
115
115
  endpoint = event.metadata.get("endpoint", "")
116
116
  for exclude_regex in self._exclude_regexes:
117
- if exclude_regex.match(endpoint):
117
+ if exclude_regex.fullmatch(endpoint):
118
118
  return False # 匹配到排除规则,不触发告警
119
119
 
120
120
  # 检查阈值(对于 slow_* 类型)
@@ -181,7 +181,23 @@ class AlertingSpanProcessor:
181
181
  or name
182
182
  )
183
183
 
184
- return any(regex.match(path) for regex in self._exclude_regexes)
184
+ # 检查所有可能的路径来源
185
+ paths_to_check = [path]
186
+
187
+ # 也检查 span name 中的路径(可能包含 HTTP 方法和后缀)
188
+ # 例如 "GET /api/v1/spaces/{space_id}/subscribe http receive"
189
+ if name and name != path:
190
+ # 尝试提取 span name 中的路径部分
191
+ parts = name.split()
192
+ for part in parts:
193
+ if part.startswith("/"):
194
+ paths_to_check.append(part)
195
+
196
+ for p in paths_to_check:
197
+ if any(regex.fullmatch(p) for regex in self._exclude_regexes):
198
+ return True
199
+
200
+ return False
185
201
 
186
202
  def _emit_slow_alert(
187
203
  self,
@@ -2,8 +2,10 @@
2
2
 
3
3
  from .rabbitmq import RabbitMQ
4
4
  from .redis import RedisMQ
5
+ from .redis_stream import RedisStreamMQ
5
6
 
6
7
  __all__ = [
7
8
  "RabbitMQ",
8
9
  "RedisMQ",
10
+ "RedisStreamMQ",
9
11
  ]