Skip to content

[RUM-16387] Store remote configuration in Application Support#3029

Open
maxep wants to merge 1 commit into
feature/remote-configfrom
maxep/RUM-16387/remote-config-persistent-storage
Open

[RUM-16387] Store remote configuration in Application Support#3029
maxep wants to merge 1 commit into
feature/remote-configfrom
maxep/RUM-16387/remote-config-persistent-storage

Conversation

@maxep

@maxep maxep commented Jun 29, 2026

Copy link
Copy Markdown
Member

What and why?

The SDK core directory lives under /Library/Caches, which the system may purge under disk pressure. When that happens the persisted remote configuration is lost and the SDK reverts to defaults until the next successful fetch. This stores remote configuration under /Library/Application Support instead, which the system does not purge.

How?

  • Added Directory.applicationSupport() alongside Directory.cache().
  • Added an injectable persistentDirectory on the configuration (defaults to Application Support), mirroring systemDirectory.
  • RemoteConfigurationProvider now gets an instance-scoped directory built from persistentDirectory() (…/Application Support/com.datadoghq/v2/<uuid>/). All other (purgeable) Feature data stays under /Library/Caches.

Notes: the config directory is included in iCloud/iTunes backups (Application Support default — intentional). Application Support is used on all platforms; on tvOS persistence remains best-effort (no worse than today's Caches).

Review checklist

  • Feature or bugfix MUST have appropriate tests
  • Make sure each commit and the PR mention the Issue number or JIRA reference
  • Add CHANGELOG entry for user facing changes
  • Add Objective-C interface for public APIs
  • Run make api-surface when adding new APIs

@maxep maxep marked this pull request as ready for review June 30, 2026 09:18
@maxep maxep requested review from a team as code owners June 30, 2026 09:18

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dcd9336a62

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread DatadogCore/Sources/Datadog.swift
The core directory lives under /Library/Caches, which the system may purge under
disk pressure — losing the persisted remote configuration and reverting to defaults.

Store remote configuration under /Library/Application Support instead, which is not
purged. Adds Directory.applicationSupport() and an injectable persistentDirectory on
the configuration; the rest of the core stays in Caches.
@maxep maxep force-pushed the maxep/RUM-16387/remote-config-persistent-storage branch from dcd9336 to 36b263e Compare July 3, 2026 15:26
@sbarrio sbarrio requested a review from barboraplasovska July 6, 2026 09:56
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.

1 participant