mirror of
https://github.com/makeplane/plane.git
synced 2026-07-13 14:01:45 +02:00
fix: tracer changes
This commit is contained in:
@@ -3,6 +3,7 @@ from celery import shared_task
|
||||
|
||||
# Django imports
|
||||
from django.conf import settings
|
||||
from opentelemetry import trace
|
||||
|
||||
# Module imports
|
||||
from plane.license.models import Instance
|
||||
@@ -23,6 +24,7 @@ from plane.utils.telemetry import init_telemetry
|
||||
|
||||
@shared_task
|
||||
def instance_traces():
|
||||
init_telemetry()
|
||||
# Check if the instance is registered
|
||||
instance = Instance.objects.first()
|
||||
|
||||
@@ -33,7 +35,7 @@ def instance_traces():
|
||||
# If not multi-tenant and telemetry is enabled
|
||||
if not settings.IS_MULTI_TENANT and instance.is_telemetry_enabled:
|
||||
# Get the tracer
|
||||
tracer = init_telemetry()
|
||||
tracer = trace.get_tracer(__name__)
|
||||
# Instance details
|
||||
with tracer.start_as_current_span("instance_details") as span:
|
||||
# Count of all models
|
||||
|
||||
Reference in New Issue
Block a user