From 28d09c09433e018b553e633500a66315ede7418e Mon Sep 17 00:00:00 2001 From: Mohammad Amin Date: Mon, 22 Jan 2024 17:52:28 +0330 Subject: [PATCH] fix: Going back to previous configs! - We had to point to otel_endpoint. --- celery_app/tasks.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/celery_app/tasks.py b/celery_app/tasks.py index 9fc28a9..4a13c1e 100644 --- a/celery_app/tasks.py +++ b/celery_app/tasks.py @@ -1,9 +1,12 @@ import json import logging +import os from typing import Any + from celery_app.server import app from celery_app.utils.fire_event import job_send +from dotenv import load_dotenv from subquery import query_multiple_source from tc_messageBroker.rabbit_mq.event import Event from tc_messageBroker.rabbit_mq.payload.discord_bot.base_types.interaction_callback_data import ( @@ -41,7 +44,9 @@ def ask_question_auto_search( - `date` - `content`: which is the `ChatInputCommandInteraction` as a dictionary """ - Traceloop.init(app_name="hivemind-server") + load_dotenv() + otel_endpoint = os.getenv("TRACELOOP_BASE_URL") + Traceloop.init(app_name="hivemind-server", api_endpoint=otel_endpoint) prefix = f"COMMUNITY_ID: {community_id} | " logging.info(f"{prefix}Processing question!")