Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(persons): fix stale person deletion and reset wording (#111063)

Eli Reismanf7b2a3cc3c81
diff --git a/posthog/api/person.py b/posthog/api/person.py
index 17d6e97e6e8c..66323db01d02 100644
--- a/posthog/api/person.py
+++ b/posthog/api/person.py
@@ -979,7 +979,7 @@ class PersonViewSet(TeamAndOrgViewSetMixin, viewsets.ModelViewSet):
OpenApiParameter(
"delete_events",
OpenApiTypes.BOOL,
- description="If true, a task to delete all events associated with this person will be created and queued. The task does not run immediately and instead is batched together and at 5AM UTC every Sunday",
+ description="If true, queue a task to delete all events for this person. The task does not run right away. It is batched with other deletions and runs weekly.",
default=False,
),
],
@@ -1713,7 +1713,7 @@ class PersonViewSet(TeamAndOrgViewSetMixin, viewsets.ModelViewSet):
raise NotFound(detail="Person not found.")
@extend_schema(
- description="Reset a distinct_id for a deleted person. This allows the distinct_id to be used again.",
+ description="Fix a distinct_id that stays hidden after its person was deleted and created again. Does nothing if no live person uses this distinct_id. In that case, send a new event for it instead.",
)
@action(methods=["POST"], detail=False, required_scopes=["person:write"])
def reset_person_distinct_id(self, request: request.Request, *args: Any, **kwargs: Any) -> response.Response:
diff --git a/posthog/dags/deletes.py b/posthog/dags/deletes.py
index 5c71197b6e93..a9347821849c 100644
--- a/posthog/dags/deletes.py
+++ b/posthog/dags/deletes.py
@@ -950,7 +950,7 @@ def _count_through(
"""Survivors on ``table``, or None when no attempt could complete.
None is deliberately not zero: a count that errored or ran out of time says nothing about
- whether rows remain, and mark_deletions_verified refuses to mark on it. Each attempt gets the
+ whether rows remain, so mark_deletions_verified logs the table as unchecked. Each attempt gets the
full time budget, and the runner picks a host per call, so a retry also routes around a single
slow or sick host.
"""
diff --git a/posthog/personhog_client/README.md b/posthog/personhog_client/README.md
index 0da08ebfb871..4c3171fb4980 100644
--- a/posthog/personhog_client/README.md
+++ b/posthog/personhog_client/README.md
@@ -122,8 +122,7 @@ The client emits Prometheus metrics at multiple layers:
**gRPC request metrics** (`interceptor.py`):
- `personhog_django_grpc_request_duration_seconds` — request latency histogram
-- `personhog_django_grpc_requests_total` — request count by method and status
-- `personhog_django_grpc_timeouts_total` — deadline exceeded count
+- `personhog_django_grpc_requests_total` — request count by method and status (timeouts are `status="DEADLINE_EXCEEDED"`)
**Channel metrics** (`client.py`):
diff --git a/products/persons/frontend/generated/api.ts b/products/persons/frontend/generated/api.ts
index 0e3ded8a275b..0089ce836b83 100644
--- a/products/persons/frontend/generated/api.ts
+++ b/products/persons/frontend/generated/api.ts
@@ -700,7 +700,7 @@ export const getPersonsResetPersonDistinctIdCreateUrl = (
}
/**
- * Reset a distinct_id for a deleted person. This allows the distinct_id to be used again.
+ * Fix a distinct_id that stays hidden after its person was deleted and created again. Does nothing if no live person uses this distinct_id. In that case, send a new event for it instead.
*/
export const personsResetPersonDistinctIdCreate = async (
projectId: string,
diff --git a/products/persons/frontend/generated/api.zod.ts b/products/persons/frontend/generated/api.zod.ts
index 7578bde388fd..cca5d8fde472 100644
--- a/products/persons/frontend/generated/api.zod.ts
+++ b/products/persons/frontend/generated/api.zod.ts
@@ -129,7 +129,7 @@ export const PersonsBulkDeleteCreateBody = /* @__PURE__ */ zod.object({
})
/**
- * Reset a distinct_id for a deleted person. This allows the distinct_id to be used again.
+ * Fix a distinct_id that stays hidden after its person was deleted and created again. Does nothing if no live person uses this distinct_id. In that case, send a new event for it instead.
*/
export const PersonsResetPersonDistinctIdCreateBody = /* @__PURE__ */ zod.object({
properties: zod
diff --git a/products/persons/frontend/pages/PersonsScene.tsx b/products/persons/frontend/pages/PersonsScene.tsx
index 3a42761439de..fe8def46a108 100644
--- a/products/persons/frontend/pages/PersonsScene.tsx
+++ b/products/persons/frontend/pages/PersonsScene.tsx
@@ -59,8 +59,8 @@ export function PersonsScene(): JSX.Element {
LemonDialog.openForm({
width: '30rem',
title: 'Reset deleted person',
- description: `Once a person is deleted, the "distinct_id" associated with them can no longer be used.
- You can use this tool to reset the "distinct_id" for a person so that new events associated with it will create a new Person profile.`,
+ description: `Use this if a deleted person's distinct ID gets new events, but no person shows up for it.
+ Resetting the distinct ID makes that person show up again.`,
initialValues: { distinct_id: '' },
content: (
<LemonField name="distinct_id" label="Distinct ID to reset">
@@ -113,8 +113,8 @@ export function PersonsScene(): JSX.Element {
LemonDialog.openForm({
width: '30rem',
title: 'Reset deleted person',
- description: `Once a person is deleted, the "distinct_id" associated with them can no longer be used.
- You can use this tool to reset the "distinct_id" for a person so that new events associated with it will create a new Person profile.`,
+ description: `Use this if a deleted person's distinct ID gets new events, but no person shows up for it.
+ Resetting the distinct ID makes that person show up again.`,
initialValues: {
distinct_id: '',
},