Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(weave): Add project clause to inner ID filter #1715

Merged
merged 3 commits into from
Jun 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions weave/trace_server/clickhouse_trace_server_batched.py
Original file line number Diff line number Diff line change
Expand Up @@ -1980,15 +1980,25 @@ def _make_calls_where_condition_from_event_conditions(
event_conds = []
if start_event_conditions is not None and len(start_event_conditions) > 0:
conds = _combine_conditions(
["isNotNull(started_at)", *start_event_conditions], "AND"
[
"project_id = {project_id: String}",
"isNotNull(started_at)",
*start_event_conditions,
],
"AND",
)
event_conds.append(
f"calls_merged.id IN (SELECT id FROM calls_merged WHERE {conds})"
)

if end_event_conditions is not None and len(end_event_conditions) > 0:
conds = _combine_conditions(
["isNotNull(ended_at)", *end_event_conditions], "AND"
[
"project_id = {project_id: String}",
"isNotNull(ended_at)",
*end_event_conditions,
],
"AND",
)
event_conds.append(
f"calls_merged.id IN (SELECT id FROM calls_merged WHERE {conds})"
Expand Down
Loading