mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 19:41:11 +00:00
63ab3abe67
This is primarily useful for debugging changes to the OpenTelemetry setup.
13 lines
374 B
Python
13 lines
374 B
Python
from django.apps import AppConfig
|
|
from celerywyrm import settings
|
|
|
|
|
|
class CelerywyrmConfig(AppConfig):
|
|
name = "celerywyrm"
|
|
verbose_name = "BookWyrm Celery"
|
|
|
|
def ready(self):
|
|
if settings.OTEL_EXPORTER_OTLP_ENDPOINT or settings.OTEL_EXPORTER_CONSOLE:
|
|
from bookwyrm.telemetry import open_telemetry
|
|
|
|
open_telemetry.instrumentCelery()
|