Skip to content

Commit

Permalink
Merge pull request #86 from openclimatefix/Sentry-update
Browse files Browse the repository at this point in the history
Sentry update to the code
  • Loading branch information
ADIMANV authored Sep 23, 2024
2 parents 9273f95 + e076ba5 commit 9309194
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gspconsumer/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import click
import pandas as pd
import sentry_sdk
from nowcasting_datamodel.connection import DatabaseConnection
from nowcasting_datamodel.models.base import Base_Forecast
from nowcasting_datamodel.models.gsp import GSPYield, GSPYieldSQL, LocationSQL
Expand All @@ -30,6 +31,13 @@
)
logger = logging.getLogger(__name__)

sentry_sdk.init(
dsn=os.getenv("SENTRY_DSN"), environment=os.getenv("ENVIRONMENT", "local"), traces_sample_rate=1
)

sentry_sdk.set_tag("app_name", "GSP_consumer")
sentry_sdk.set_tag("version", gspconsumer.__version__)


@click.command()
@click.option(
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ pyyaml
urllib3
requests
nowcasting_datamodel==1.5.46
sentry-sdk==2.13.0
#git+https://github.com/SheffieldSolar/PV_Live-API#pvlive_api
click

0 comments on commit 9309194

Please sign in to comment.