From 262002d509c27f86f6cd8593c101053d1ebae5d8 Mon Sep 17 00:00:00 2001 From: Brian Lou Date: Wed, 31 Jul 2024 13:12:48 -0700 Subject: [PATCH 1/2] Update usage of infra-event-notifier --- py/parse_and_notify.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/py/parse_and_notify.py b/py/parse_and_notify.py index b60dac83..74371903 100755 --- a/py/parse_and_notify.py +++ b/py/parse_and_notify.py @@ -9,7 +9,7 @@ from dataclasses import dataclass from typing import Any, Mapping, Sequence -from infra_event_notifier.notifier import Notifier +from infra_event_notifier.datadog_notifier import DatadogNotifier SENTRY_REGION = os.getenv("SENTRY_REGION", "unknown") @@ -155,7 +155,7 @@ def build(cls, raw_content: Mapping[str, Any]) -> UpdatedTopic: def main(): token = os.getenv("DATADOG_API_KEY") assert token is not None, "No Datadog token in DATADOG_API_KEY env var" - notifier = Notifier(datadog_api_key=token) + notifier = DatadogNotifier(datadog_api_key=token) for line in sys.stdin: topic = json.loads(line) @@ -185,7 +185,7 @@ def main(): ) tags["topicctl_topic"] = topic_content.name - notifier.notify(title=title, tags=tags, text=text, alert_type="") + notifier.send(title=title, body=text, tags=tags, alert_type="") print(f"{title}", file=sys.stderr) From 493bb19987d820c02a1328ab82557561d318cf3b Mon Sep 17 00:00:00 2001 From: Brian Lou Date: Wed, 31 Jul 2024 16:21:42 -0700 Subject: [PATCH 2/2] Change version --- py/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/requirements.txt b/py/requirements.txt index a68c639f..c963961b 100644 --- a/py/requirements.txt +++ b/py/requirements.txt @@ -1,3 +1,3 @@ --index-url https://pypi.devinfra.sentry.io/simple -sentry-infra-event-notifier==0.0.4 +sentry-infra-event-notifier==0.0.5