From c6e133a28dabf3703886498ef14c1733766e3fe8 Mon Sep 17 00:00:00 2001 From: Alisson Date: Thu, 25 Jul 2024 15:02:01 -0300 Subject: [PATCH] remove apm --- app/main.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/main.py b/app/main.py index b9284f9..6cc5bb3 100644 --- a/app/main.py +++ b/app/main.py @@ -1,7 +1,7 @@ import sentry_sdk import os from elasticsearch import Elasticsearch -from elasticapm.contrib.starlette import ElasticAPM, make_apm_client +# from elasticapm.contrib.starlette import ElasticAPM, make_apm_client from fastapi import FastAPI from langchain.embeddings import HuggingFaceHubEmbeddings, CohereEmbeddings from langchain.embeddings.base import Embeddings @@ -95,15 +95,15 @@ def __init__(self, config: AppConfig): # APM Configuration - apm_config = { - 'SERVICE_NAME': os.environ.get('APM_SERVICE_NAME'), - 'SECRET_TOKEN': os.environ.get('APM_SECRET_TOKEN'), - 'SERVER_URL': os.environ.get('APM_SERVER_URL'), - 'ENVIRONMENT': os.environ.get('APM_ENVIRONMENT'), - } + # apm_config = { + # 'SERVICE_NAME': os.environ.get('APM_SERVICE_NAME'), + # 'SECRET_TOKEN': os.environ.get('APM_SECRET_TOKEN'), + # 'SERVER_URL': os.environ.get('APM_SERVER_URL'), + # 'ENVIRONMENT': os.environ.get('APM_ENVIRONMENT'), + # } - apm_CLIENT = make_apm_client(apm_config) - self.api.add_middleware(ElasticAPM, client=apm_CLIENT) + # apm_CLIENT = make_apm_client(apm_config) + # self.api.add_middleware(ElasticAPM, client=apm_CLIENT) config = AppConfig()