Skip to content

Commit

Permalink
Merge branch 'main' into feature/elastic-apm
Browse files Browse the repository at this point in the history
  • Loading branch information
zMardone authored Jun 13, 2024
2 parents c80b265 + 54df6bb commit c5cee2e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
1 change: 1 addition & 0 deletions app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,5 @@ def __init__(self):
"INDEX_CONTENTBASES_NAME", "content_bases"
)
self.sentry_dsn = os.environ.get("SENTRY_DSN", "")
self.environment = os.environ.get("ENVIRONMENT", "local")
self.es_timeout = os.environ.get("ELASTICSEARCH_TIMEOUT", "30")
3 changes: 3 additions & 0 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from langchain.embeddings import HuggingFaceHubEmbeddings, CohereEmbeddings
from langchain.embeddings.base import Embeddings
from langchain.vectorstores import ElasticVectorSearch, VectorStore, ElasticsearchStore
from sentry_sdk.integrations.fastapi import FastApiIntegration

from app.handlers import IDocumentHandler
from app.handlers.products import ProductsHandler
Expand Down Expand Up @@ -60,6 +61,8 @@ def __init__(self, config: AppConfig):
if config.sentry_dsn != "":
sentry_sdk.init(
dsn=config.sentry_dsn,
integrations=[FastApiIntegration()],
environment=config.environment,
)

self.api = FastAPI()
Expand Down
15 changes: 9 additions & 6 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ python-dotenv = "^1.0.0"
pydantic = "2.3.0"
celery = "^5.3.6"
redis = "^5.0.1"
sentry-sdk = {extras = ["fastapi"], version = "^1.35.0"}
sentry-sdk = {extras = ["fastapi"], version = "^2.5.1"}
xlrd = "^2.0.1"
pdfminer-six = "^20231228"
cohere = "^4.37"
Expand Down

0 comments on commit c5cee2e

Please sign in to comment.