Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump sentry-sdk from 2.11.0 to 2.13.0 #223

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ Link : https://wiki.python.org/moin/WindowsCompilers#Microsoft_Visual_C.2B-.2B-_
```bash
pip install poetry
poetry update
poetry lock --no-update
```
NLDA : I have not been able to work with wordcloud on windows.

Expand Down
1,759 changes: 910 additions & 849 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ aiohttp = "^3.8.6"
pytest-asyncio = "^0.23.5"
swifter = "^1.4.0"
tenacity = "^8.2.3"
sentry-sdk = "^2.6.0"
sentry-sdk = "^2.13.0"
modin = {extras = ["ray"], version = "^0.31.0"}
[build-system]
requires = ["poetry-core>=1.1"]
Expand Down
5 changes: 3 additions & 2 deletions quotaclimat/data_processing/mediatree/api_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def get_channels():
async def get_and_save_api_data(exit_event):
with sentry_sdk.start_transaction(op="task", name="get_and_save_api_data"):
try:
logging.warning(f"Available CPUS {os.cpu_count()} - MODIN_CPUS config : {os.environ.get('MODIN_CPUS', 0)}")
logging.warning(f"Available CPUS {os.cpu_count()} - MODIN_CPUS config : {os.environ.get('MODIN_CPUS', 3)}")

conn = connect_to_db()
token=get_auth_token(password=password, user_name=USER)
Expand Down Expand Up @@ -269,9 +269,10 @@ async def main():
event_finish = asyncio.Event()
# Start the health check server in the background
health_check_task = asyncio.create_task(run_health_check_server())

context = ray.init(
dashboard_host="0.0.0.0", # for docker dashboard
# runtime_env=dict(worker_process_setup_hook=sentry_init),
)
logging.info(f"Ray context dahsboard available at : {context.dashboard_url}")
logging.warning(f"Ray Information about the env: {ray.available_resources()}")
Expand Down
2 changes: 1 addition & 1 deletion quotaclimat/data_processing/mediatree/channel_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def get_programs():
df_programs['start'] = format_hour_minute(df_programs['start'])
df_programs['end'] = format_hour_minute(df_programs['end'])
except (Exception) as error:
logging.error("Could not read channel_program.json", error)
logging.error("Could not read channel_program.json")
raise Exception

return df_programs
Expand Down
10 changes: 7 additions & 3 deletions quotaclimat/utils/sentry.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

import ray
import os
import logging
from quotaclimat.utils.healthcheck_config import get_app_version
Expand All @@ -21,14 +22,17 @@ def sentry_init():
logging.info("Sentry init")
sentry_sdk.init(
enable_tracing=False,
traces_sample_rate=0.7,
traces_sample_rate=0.3,
# To set a uniform sample rate
# Set profiles_sample_rate to 1.0 to profile 100%
# of sampled transactions.
# We recommend adjusting this value in production,
profiles_sample_rate=0.7,
profiles_sample_rate=0.3,
release=get_app_version(),
functions_to_trace=functions_to_trace,
# functions_to_trace=functions_to_trace,
# integrations=[ # TODO : https://docs.sentry.io/platforms/python/integrations/ray/
# RayIntegration(),
# ],
)
else:
logging.info("Sentry not init - SENTRY_DSN not found")
Loading