From 0eb9baa1fde9135514aab6ca2f59b9c90a3d2ec2 Mon Sep 17 00:00:00 2001 From: Dustin Byrne Date: Thu, 10 Sep 2026 14:27:23 -0400 Subject: [PATCH 1/3] chore(config): deprecate maxRetries --- .changeset/deprecate-max-retries.md | 5 +++++ PostHog/PostHogConfig.swift | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .changeset/deprecate-max-retries.md diff --git a/.changeset/deprecate-max-retries.md b/.changeset/deprecate-max-retries.md new file mode 100644 index 000000000..f0e2a86c9 --- /dev/null +++ b/.changeset/deprecate-max-retries.md @@ -0,0 +1,5 @@ +--- +"posthog-ios": minor +--- + +Deprecate `PostHogConfig.maxRetries`: ingestion retries are not count-limited. Use `maxQueueSize` for events and replay, and `logs.maxBufferSize` for logs. This option still controls push subscription registration retries. diff --git a/PostHog/PostHogConfig.swift b/PostHog/PostHogConfig.swift index 92f463f73..28b605ddb 100644 --- a/PostHog/PostHogConfig.swift +++ b/PostHog/PostHogConfig.swift @@ -90,8 +90,11 @@ public typealias BeforeSendBlock = (PostHogEvent) -> PostHogEvent? @objc public var flushIntervalSeconds: TimeInterval = Defaults.flushIntervalSeconds /// Maximum number of retries for push-subscription registration failures. - /// Durable event, replay, and log queues retain retryable records and use - /// their configured capacity as the storage bound. Default: `3`. + /// + /// Default: `3`. + /// - Deprecated: Ingestion retries are not count-limited. Use `maxQueueSize` for events and replay, + /// and `logs.maxBufferSize` for logs. This option still controls push subscription registration retries. + @available(*, deprecated, message: "Ingestion retries are not count-limited. Use maxQueueSize for events and replay, and logs.maxBufferSize for logs. This option still controls push subscription registration retries.") @objc public var maxRetries: Int = Defaults.maxRetries /// Maximum number of retries for feature flag requests after transient network errors or retryable HTTP responses. From cb0485f2717fe337d2376f38ee09cbc675c67b9a Mon Sep 17 00:00:00 2001 From: Dustin Byrne Date: Thu, 10 Sep 2026 14:50:19 -0400 Subject: [PATCH 2/3] docs(config): clarify maxRetries scope --- .changeset/clarify-max-retries-scope.md | 5 +++++ .changeset/deprecate-max-retries.md | 5 ----- PostHog/PostHogConfig.swift | 7 ++++--- 3 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 .changeset/clarify-max-retries-scope.md delete mode 100644 .changeset/deprecate-max-retries.md diff --git a/.changeset/clarify-max-retries-scope.md b/.changeset/clarify-max-retries-scope.md new file mode 100644 index 000000000..da0241c47 --- /dev/null +++ b/.changeset/clarify-max-retries-scope.md @@ -0,0 +1,5 @@ +--- +"posthog-ios": patch +--- + +Clarify that `maxRetries` limits push-subscription registration retries. Retryable event, replay, and log ingestion failures retain queued records for later flush attempts with backoff. Use `maxQueueSize` for event/replay capacity and `logs.maxBufferSize` for log capacity. diff --git a/.changeset/deprecate-max-retries.md b/.changeset/deprecate-max-retries.md deleted file mode 100644 index f0e2a86c9..000000000 --- a/.changeset/deprecate-max-retries.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"posthog-ios": minor ---- - -Deprecate `PostHogConfig.maxRetries`: ingestion retries are not count-limited. Use `maxQueueSize` for events and replay, and `logs.maxBufferSize` for logs. This option still controls push subscription registration retries. diff --git a/PostHog/PostHogConfig.swift b/PostHog/PostHogConfig.swift index 28b605ddb..8193dfb33 100644 --- a/PostHog/PostHogConfig.swift +++ b/PostHog/PostHogConfig.swift @@ -91,10 +91,11 @@ public typealias BeforeSendBlock = (PostHogEvent) -> PostHogEvent? /// Maximum number of retries for push-subscription registration failures. /// + /// This limit does not apply to event, replay, or log ingestion. Retryable ingestion + /// failures retain queued records for later flush triggers, subject to backoff. + /// Use `maxQueueSize` for events and replay, and `logs.maxBufferSize` for logs. + /// /// Default: `3`. - /// - Deprecated: Ingestion retries are not count-limited. Use `maxQueueSize` for events and replay, - /// and `logs.maxBufferSize` for logs. This option still controls push subscription registration retries. - @available(*, deprecated, message: "Ingestion retries are not count-limited. Use maxQueueSize for events and replay, and logs.maxBufferSize for logs. This option still controls push subscription registration retries.") @objc public var maxRetries: Int = Defaults.maxRetries /// Maximum number of retries for feature flag requests after transient network errors or retryable HTTP responses. From 1f28186ab8986d16235dde6017617d681af96531 Mon Sep 17 00:00:00 2001 From: Dustin Byrne Date: Thu, 10 Sep 2026 15:04:09 -0400 Subject: [PATCH 3/3] docs: use the durable queue changeset --- .changeset/clarify-max-retries-scope.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .changeset/clarify-max-retries-scope.md diff --git a/.changeset/clarify-max-retries-scope.md b/.changeset/clarify-max-retries-scope.md deleted file mode 100644 index da0241c47..000000000 --- a/.changeset/clarify-max-retries-scope.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"posthog-ios": patch ---- - -Clarify that `maxRetries` limits push-subscription registration retries. Retryable event, replay, and log ingestion failures retain queued records for later flush attempts with backoff. Use `maxQueueSize` for event/replay capacity and `logs.maxBufferSize` for log capacity.