Skip to content

Commit 36b0318

Browse files
authored
fix(aci): Remove DataCondition duration-triggered error (#104635)
This particular error was added when slow evaluations were being debugged to keep an eye on slower cases, but in the time since our metrics histrograms have gotten much more reliable and the error hasn't proven nearly useful enough to justify its volume.
1 parent 9cc9340 commit 36b0318

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

src/sentry/workflow_engine/models/data_condition.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import logging
22
import operator
3-
import time
4-
from datetime import timedelta
53
from enum import StrEnum
64
from typing import Any, TypedDict, TypeVar, cast
75

@@ -104,12 +102,6 @@ class Condition(StrEnum):
104102

105103
T = TypeVar("T")
106104

107-
# Threshold at which we consider a fast condition's evaluation time to
108-
# be long enough to be worth logging. Our systems are designed on the
109-
# assumption that fast conditions should be fast, and if they aren't,
110-
# it's worth investigating.
111-
FAST_CONDITION_TOO_SLOW_THRESHOLD = timedelta(milliseconds=500)
112-
113105

114106
class DataConditionSnapshot(TypedDict):
115107
id: int
@@ -201,7 +193,6 @@ def _evaluate_condition(
201193
return ConditionError(msg="No registration exists for condition")
202194

203195
should_be_fast = not is_slow_condition(self)
204-
start_time = time.time()
205196
try:
206197
with metrics.timer(
207198
"workflow_engine.data_condition.evaluation_duration",
@@ -221,20 +212,6 @@ def _evaluate_condition(
221212
},
222213
)
223214
return ConditionError(msg=str(e))
224-
finally:
225-
duration = time.time() - start_time
226-
if should_be_fast and duration >= FAST_CONDITION_TOO_SLOW_THRESHOLD.total_seconds():
227-
logger.error(
228-
"Fast condition evaluation too slow; took %s seconds",
229-
duration,
230-
extra={
231-
"condition_id": self.id,
232-
"duration": duration,
233-
"type": self.type,
234-
"value": value,
235-
"comparison": self.comparison,
236-
},
237-
)
238215

239216
return result
240217

0 commit comments

Comments
 (0)