Skip to content

Commit

Permalink
remove apm
Browse files Browse the repository at this point in the history
  • Loading branch information
AlisoSouza committed Jul 25, 2024
1 parent 0c1a827 commit c6e133a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions app/main.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit c6e133a

Please sign in to comment.