Skip to content

Commit 05ff01b

Browse files
authored
chore(trace-explorer): Use custom buffer for trace explorer query (#68838)
1 parent 9c99a10 commit 05ff01b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/sentry/api/endpoints/organization_traces.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ def data_fn(offset: int, limit: int):
111111
max_timestamp = timestamp
112112

113113
# TODO: move to use `update_snuba_params_with_timestamp`
114-
time_buffer = options.get("performance.traces.transaction_query_timebuffer_days")
115-
buffer = timedelta(days=time_buffer)
114+
time_buffer = options.get("performance.traces.trace-explorer-buffer-hours")
115+
buffer = timedelta(hours=time_buffer)
116116
params["start"] = min_timestamp - buffer
117117
params["end"] = max_timestamp + buffer
118118
snuba_params.start = min_timestamp - buffer

src/sentry/options/defaults.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,6 +1746,12 @@
17461746
default=False,
17471747
flags=FLAG_AUTOMATOR_MODIFIABLE,
17481748
)
1749+
register(
1750+
"performance.traces.trace-explorer-buffer-hours",
1751+
type=Float,
1752+
default=1.0,
1753+
flags=FLAG_AUTOMATOR_MODIFIABLE,
1754+
) # hours
17491755

17501756
# Dynamic Sampling system-wide options
17511757
# Size of the sliding window used for dynamic sampling. It is defaulted to 24 hours.

0 commit comments

Comments
 (0)