Skip to content

chore!: rename console log types to PostHogConsoleLog* for v4 - #912

Merged
turnipdabeets merged 1 commit into
chore/v4-remove-deprecatedfrom
chore/v4-rename-console-log-types
Oct 6, 2026
Merged

turnipdabeets merged 1 commit into
chore/v4-remove-deprecatedfrom
chore/v4-rename-console-log-types

Conversation

@turnipdabeets

Copy link
Copy Markdown
Contributor

💡 Motivation and Context

The session replay console capture types PostHogLogLevel / PostHogLogEntry sit right next to the Logs product's PostHogLogSeverity / PostHogLogRecord, and the names make them easy to mix up. 4.0 is the chance to fix that.

Before After
PostHogLogLevel PostHogConsoleLogLevel
PostHogLogEntry PostHogConsoleLogEntry

The new names match the existing PostHogSessionReplayConsoleLogConfig / PostHogConsoleLogInterceptor. The Logs types already match Android and Flutter, so they stay as they are. This is a straight rename with no behavior change. In Objective-C the enum constants become PostHogConsoleLogLevelInfo / Warn / Error.

Stacked on #873.

💚 How did you test it?

  • iOS simulator: PostHogConsoleLogInterceptorTest and PostHogSessionReplayPluginTests pass
  • PostHogExample and PostHogObjCExample build for iOS
  • Regenerated api/posthog-ios.public-api.txt with scripts/check-public-api.sh --update
  • swiftlint and swiftformat are clean on the changed files

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

If releasing new changes

  • Ran pnpm changeset to generate a changeset file

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

  • Claude Code (Opus 5.5).
  • We considered folding console capture into PostHogLogSeverity instead, and rejected it. Console capture only ever produces info/warn/error, so trace/debug/fatal would be options that don't do anything.
  • Docs follow-up: posthog.com contents/docs/session-replay/_snippets/ios-logging.mdx uses the old names and needs updating when 4.0 ships.

🤖 Generated with Claude Code

PostHogLogLevel and PostHogLogEntry belong to session replay console
capture, but their names read like the Logs product's
PostHogLogSeverity and PostHogLogRecord. Rename them to
PostHogConsoleLogLevel and PostHogConsoleLogEntry, matching the
existing PostHogSessionReplayConsoleLogConfig naming. No behavior change.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@turnipdabeets
turnipdabeets requested a review from a team as a code owner October 6, 2026 13:57
@turnipdabeets turnipdabeets self-assigned this Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

posthog-ios Compliance Report

Date: 2026-10-06 14:08:36 UTC
Duration: 224065ms

⚠️ Some Tests Failed

44/45 tests passed, 1 failed


Capture Tests

⚠️ 28/29 tests passed, 1 failed

View Details
Test Status Duration
Format Validation.Event Has Required Fields ✅ 2830ms
Format Validation.Event Has Uuid ✅ 2657ms
Format Validation.Event Has Lib Properties ✅ 2776ms
Format Validation.Distinct Id Is String ✅ 2713ms
Format Validation.Token Is Present ✅ 2821ms
Format Validation.Custom Properties Preserved ✅ 2925ms
Format Validation.Event Has Timestamp ✅ 2770ms
Retry Behavior.Retries On 503 ✅ 11769ms
Retry Behavior.Does Not Retry On 400 ✅ 4742ms
Retry Behavior.Does Not Retry On 401 ✅ 4825ms
Retry Behavior.Respects Retry After Header ✅ 7785ms
Retry Behavior.Implements Backoff ✅ 21830ms
Retry Behavior.Retries On 500 ✅ 9281ms
Retry Behavior.Retries On 502 ✅ 9267ms
Retry Behavior.Retries On 504 ✅ 9120ms
Retry Behavior.Max Retries Respected ❌ 19233ms
Deduplication.Generates Unique Uuids ✅ 2966ms
Deduplication.Preserves Uuid On Retry ✅ 9250ms
Deduplication.Preserves Uuid And Timestamp On Retry ✅ 10413ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 7805ms
Deduplication.No Duplicate Events In Batch ✅ 3055ms
Deduplication.Different Events Have Different Uuids ✅ 2901ms
Compression.Sends Gzip When Enabled ✅ 2690ms
Batch Format.Uses Proper Batch Structure ✅ 2774ms
Batch Format.Flush With No Events Sends Nothing ✅ 316ms
Batch Format.Multiple Events Batched Together ✅ 2920ms
Error Handling.Does Not Retry On 403 ✅ 4738ms
Error Handling.Does Not Retry On 413 ✅ 2264ms
Error Handling.Retries On 408 ✅ 9320ms

Failures

retry_behavior.max_retries_respected

Expected 4 requests, got 6

Feature_Flags Tests

✅ 16/16 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id ✅ 2678ms
Request Payload.Flags Request Uses V2 Query Param ✅ 2828ms
Request Payload.Flags Request Hits Flags Path Not Decide ✅ 2707ms
Request Payload.Flags Request Omits Authorization Header ✅ 2751ms
Request Payload.Token In Flags Body Matches Init ✅ 2716ms
Request Payload.Groups Round Trip ✅ 2732ms
Request Payload.Groups Default To Empty Object ✅ 2833ms
Request Payload.Person Properties Distinct Id Auto Populated When Caller Omits It ✅ 2835ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False ✅ 2724ms
Request Payload.Disable Geoip Omitted Defaults To False ✅ 2874ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key ✅ 2794ms
Request Lifecycle.No Flags Request On Init Alone ✅ 65ms
Request Lifecycle.No Flags Request On Normal Capture ✅ 2740ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests ✅ 5397ms
Request Lifecycle.Mock Response Value Is Returned To Caller ✅ 2876ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event ✅ 2997ms

@turnipdabeets
turnipdabeets merged commit 9cb65af into chore/v4-remove-deprecated Oct 6, 2026
44 checks passed
@turnipdabeets
turnipdabeets deleted the chore/v4-rename-console-log-types branch October 6, 2026 17:38
turnipdabeets added a commit that referenced this pull request Oct 7, 2026
PostHogLogLevel and PostHogLogEntry belong to session replay console
capture, but their names read like the Logs product's
PostHogLogSeverity and PostHogLogRecord. Rename them to
PostHogConsoleLogLevel and PostHogConsoleLogEntry, matching the
existing PostHogSessionReplayConsoleLogConfig naming. No behavior change.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
turnipdabeets added a commit that referenced this pull request Oct 9, 2026
PostHogLogLevel and PostHogLogEntry belong to session replay console
capture, but their names read like the Logs product's
PostHogLogSeverity and PostHogLogRecord. Rename them to
PostHogConsoleLogLevel and PostHogConsoleLogEntry, matching the
existing PostHogSessionReplayConsoleLogConfig naming. No behavior change.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
turnipdabeets added a commit that referenced this pull request Oct 20, 2026
PostHogLogLevel and PostHogLogEntry belong to session replay console
capture, but their names read like the Logs product's
PostHogLogSeverity and PostHogLogRecord. Rename them to
PostHogConsoleLogLevel and PostHogConsoleLogEntry, matching the
existing PostHogSessionReplayConsoleLogConfig naming. No behavior change.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@turnipdabeets turnipdabeets mentioned this pull request Oct 20, 2026
2 of 15 tasks
turnipdabeets added a commit that referenced this pull request Oct 23, 2026
PostHogLogLevel and PostHogLogEntry belong to session replay console
capture, but their names read like the Logs product's
PostHogLogSeverity and PostHogLogRecord. Rename them to
PostHogConsoleLogLevel and PostHogConsoleLogEntry, matching the
existing PostHogSessionReplayConsoleLogConfig naming. No behavior change.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
turnipdabeets added a commit that referenced this pull request Oct 26, 2026
PostHogLogLevel and PostHogLogEntry belong to session replay console
capture, but their names read like the Logs product's
PostHogLogSeverity and PostHogLogRecord. Rename them to
PostHogConsoleLogLevel and PostHogConsoleLogEntry, matching the
existing PostHogSessionReplayConsoleLogConfig naming. No behavior change.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants