Skip to content

Commit

Permalink
add version (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield authored Jan 3, 2025
1 parent bde4824 commit 49390a5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions quartz_solar_forecast/utils/sentry_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

import sentry_sdk
from quartz_solar_forecast.pydantic_models import PVSite
import importlib.metadata

version = importlib.metadata.version('quartz_solar_forecast')

import os

Expand Down Expand Up @@ -31,6 +34,8 @@ def write_sentry(params):
# set sentry tag
sentry_sdk.set_tag(key, value)

sentry_sdk.set_tag('version', version)

message = "quartz_solar_forecast is being used"

if os.getenv("PYTEST_CURRENT_TEST") is not None:
Expand Down

0 comments on commit 49390a5

Please sign in to comment.