Features: Prometheus addons
This commit is contained in:
parent
4163606f0c
commit
e800bbab15
6 changed files with 6 additions and 6 deletions
|
|
@ -11,7 +11,7 @@ from core.views import CustomGraphQLView, CustomRedocView, CustomSwaggerView, fa
|
||||||
from evibes.settings import SPECTACULAR_PLATFORM_SETTINGS
|
from evibes.settings import SPECTACULAR_PLATFORM_SETTINGS
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('', include('django_prometheus.urls')),
|
path('prometheus/', include('django_prometheus.urls')),
|
||||||
path(r"graphql/", csrf_exempt(CustomGraphQLView.as_view(graphiql=True, schema=schema))),
|
path(r"graphql/", csrf_exempt(CustomGraphQLView.as_view(graphiql=True, schema=schema))),
|
||||||
path(
|
path(
|
||||||
r"docs/",
|
r"docs/",
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ from evibes.settings import SPECTACULAR_B2B_SETTINGS
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
# path(r'graphql/', csrf_exempt(CustomGraphQLView.as_view(graphiql=True, schema=schema))),
|
# path(r'graphql/', csrf_exempt(CustomGraphQLView.as_view(graphiql=True, schema=schema))),
|
||||||
path('', include('django_prometheus.urls')),
|
path('prometheus/', include('django_prometheus.urls')),
|
||||||
path(
|
path(
|
||||||
r"docs/",
|
r"docs/",
|
||||||
SpectacularAPIView.as_view(urlconf="evibes.b2b_urls", custom_settings=SPECTACULAR_B2B_SETTINGS),
|
SpectacularAPIView.as_view(urlconf="evibes.b2b_urls", custom_settings=SPECTACULAR_B2B_SETTINGS),
|
||||||
|
|
|
||||||
|
|
@ -113,6 +113,7 @@ MIDDLEWARE = [
|
||||||
"evibes.middleware.CustomLocaleMiddleware",
|
"evibes.middleware.CustomLocaleMiddleware",
|
||||||
"django_hosts.middleware.HostsResponseMiddleware",
|
"django_hosts.middleware.HostsResponseMiddleware",
|
||||||
"djangorestframework_camel_case.middleware.CamelCaseMiddleWare",
|
"djangorestframework_camel_case.middleware.CamelCaseMiddleWare",
|
||||||
|
"django_prometheus.middleware.PrometheusAfterMiddleware"
|
||||||
]
|
]
|
||||||
|
|
||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
|
|
@ -290,7 +291,6 @@ if getenv("SENTRY_DSN"):
|
||||||
from sentry_sdk.integrations.redis import RedisIntegration
|
from sentry_sdk.integrations.redis import RedisIntegration
|
||||||
|
|
||||||
ignore_errors = [
|
ignore_errors = [
|
||||||
"flower.views.error.NotFoundErrorHandler",
|
|
||||||
"django.http.response.Http404",
|
"django.http.response.Http404",
|
||||||
"django.core.exceptions.PermissionDenied",
|
"django.core.exceptions.PermissionDenied",
|
||||||
"django.core.exceptions.BadRequest",
|
"django.core.exceptions.BadRequest",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ from evibes.settings.base import REDIS_PASSWORD, getenv
|
||||||
|
|
||||||
CACHES = {
|
CACHES = {
|
||||||
"default": {
|
"default": {
|
||||||
"BACKEND": "django_redis.cache.RedisCache",
|
"BACKEND": "django_prometheus.cache.backends.redis",
|
||||||
"LOCATION": getenv("CELERY_BROKER_URL", f"redis://:{REDIS_PASSWORD}@redis:6379/0"),
|
"LOCATION": getenv("CELERY_BROKER_URL", f"redis://:{REDIS_PASSWORD}@redis:6379/0"),
|
||||||
"OPTIONS": {
|
"OPTIONS": {
|
||||||
"CLIENT_CLASS": "django_redis.client.DefaultClient",
|
"CLIENT_CLASS": "django_redis.client.DefaultClient",
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ from evibes.settings.base import * # noqa: F403
|
||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
"default": {
|
"default": {
|
||||||
"ENGINE": "django.contrib.gis.db.backends.postgis",
|
"ENGINE": "django_prometheus.db.backends.postgis",
|
||||||
"NAME": getenv("POSTGRES_DB"), # noqa: F405
|
"NAME": getenv("POSTGRES_DB"), # noqa: F405
|
||||||
"USER": getenv("POSTGRES_USER"), # noqa: F405
|
"USER": getenv("POSTGRES_USER"), # noqa: F405
|
||||||
"PASSWORD": getenv("POSTGRES_PASSWORD"), # noqa: F405
|
"PASSWORD": getenv("POSTGRES_PASSWORD"), # noqa: F405
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ six = "1.17.0"
|
||||||
cryptography = "44.0.3"
|
cryptography = "44.0.3"
|
||||||
redis = "6.0.0"
|
redis = "6.0.0"
|
||||||
httpx = "0.28.1"
|
httpx = "0.28.1"
|
||||||
celery = { extras = ["flower"], version = "5.5.2", optional = true }
|
celery = { version = "5.5.2", optional = true }
|
||||||
pillow = "11.2.1"
|
pillow = "11.2.1"
|
||||||
south = "1.0.2"
|
south = "1.0.2"
|
||||||
pygraphviz = { version = "1.14", optional = true }
|
pygraphviz = { version = "1.14", optional = true }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue