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: add session_replay_events to lag monitoring #17397

Merged
merged 4 commits into from
Sep 28, 2023
Merged
Changes from 1 commit
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
8 changes: 4 additions & 4 deletions posthog/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def pg_row_count():
pass


CLICKHOUSE_TABLES = ["events", "person", "person_distinct_id2", "session_recording_events"]
CLICKHOUSE_TABLES = ["events", "person", "person_distinct_id2", "session_recording_events", "session_replay_events"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, because we're hipsters session_replay_events doesn't have an _timestamp column 😊



@app.task(ignore_result=True)
Expand Down Expand Up @@ -473,7 +473,7 @@ def graphile_worker_queue_size():
labelnames=["task_identifier"],
registry=registry,
)
for (task_identifier, count, oldest) in cursor.fetchall():
for task_identifier, count, oldest in cursor.fetchall():
seen_task_identifier.add(task_identifier)
waiting_jobs_gauge.labels(task_identifier=task_identifier).set(count)
processing_lag_gauge.labels(task_identifier=task_identifier).set(time.time() - float(oldest))
Expand Down Expand Up @@ -568,7 +568,7 @@ def clickhouse_part_count():
labelnames=["table"],
registry=registry,
)
for (table, parts) in rows:
for table, parts in rows:
parts_count_gauge.labels(table=table).set(parts)
statsd.gauge(f"posthog_celery_clickhouse_table_parts_count", parts, tags={"table": table})

Expand Down Expand Up @@ -597,7 +597,7 @@ def clickhouse_mutation_count():
labelnames=["table"],
registry=registry,
)
for (table, muts) in rows:
for table, muts in rows:
mutations_count_gauge.labels(table=table).set(muts)
statsd.gauge(f"posthog_celery_clickhouse_table_mutations_count", muts, tags={"table": table})

Expand Down