Skip to content

Replace Sentry with Datadog monitoring (dd-sdk-ios) - #8

Merged
alexkroman merged 6 commits into
mainfrom
feat/datadog-monitoring
Jul 1, 2026
Merged

alexkroman merged 6 commits into
mainfrom
feat/datadog-monitoring

Conversation

@alexkroman

Copy link
Copy Markdown
Collaborator

Swaps the crash/error-reporting stack from sentry-cocoa to the Datadog Swift SDK (dd-sdk-ios 3.13.0).

New Monitoring module (App/Blurt/Blurt/Monitoring/Monitoring.swift)

Release-only, trackingConsent: .granted, no PII, site: .us1, service: blurt, env: production. Client token embedded (public, like the old DSN).

  • DatadogCore + DatadogCrashReporting — crash reports (the Sentry crash equivalent).
  • DatadogLogs — handled faults via reportError(_:attributes:), preserving AppCoordinator's exact fault filtering + the underlying_error attribute (the Sentry capture(error:) equivalent). Crashes and error logs both feed Datadog Error Tracking.

⚠️ Important: RUM is not usable here — used Logs + Crash instead

I initially wired DatadogRUM (with the app ID you created), but it fails to build for native macOS: RUMDebugging.swift links UIKit, which doesn't exist on native AppKit macOS (RUM's macOS support is Mac-Catalyst-only). Blurt is a native AppKit app, so RUM is out. Logs + Crash Reporting is the supported best-practice Datadog stack for native macOS, and it fully covers what Sentry did (crashes + handled errors, both in Error Tracking).

  • The iOS-type RUM application you created isn't used by this stack (harmless to leave). The client token is what's used (org-wide).

Also changed

  • Removed the Sentry SPM dependency (project.yml, Package.resolved); regenerated project.pbxproj.
  • release-build.sh: dropped sentry-cli preflight/dSYM/release steps; added best-effort npx @datadog/datadog-ci dsyms upload (guarded on DATADOG_API_KEY, DATADOG_SITE defaults datadoghq.com). A release with no key skips symbol upload with a warning rather than failing.
  • Updated README.md, SECURITY.md, the release skill, and the codeql.yml cache comment.

Still needed from you

  • DATADOG_API_KEY in your release environment (secret, not committed) so datadog-ci can upload dSYMs and crashes symbolicate. Until then crashes report but stay unsymbolicated.
  • .mcp.json still lists the Sentry MCP server — I was blocked from editing agent-startup config. Remove that entry yourself if you want a clean break (it only affects querying old Sentry data from Claude Code, not the app).

Verification

  • App builds on macOS (arch=arm64, Debug, warnings-as-errors) — confirmed the full Datadog integration compiles.
  • shellcheck, swift-format --strict, actionlint, prettier, markdownlint all pass.

Note: stacked

Touches README.md/SECURITY.md (rewritten by #5/#7), so this is based on the #7 branch. Merge order: #5 → #7 → this. After those land, the diff reduces to the Datadog change.

🤖 Generated with Claude Code

Comment thread App/Blurt/Blurt/Monitoring/Monitoring.swift
alexkroman-assembly and others added 3 commits July 1, 2026 13:04
The project now lives at github.com/AssemblyAI/blurt, so:
- AutoUpdater fetches releases from owner "AssemblyAI" (was "alexkroman"),
  so the in-app self-update pulls from this repo's GitHub Releases.
- All github.com/alexkroman/blurt links → github.com/AssemblyAI/blurt
  across README, site, SECURITY, CONTRIBUTING, issue templates, and the
  launch-metrics skill's default repo.

Left CODE_OF_CONDUCT's @alexkroman link alone — that's the maintainer's
personal contact for reporting, not a repository link.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Swap the crash/error-reporting stack from sentry-cocoa to the Datadog
Swift SDK (dd-sdk-ios 3.13.0).

New `Monitoring` module (Release-only, no PII, US1) wires:
- DatadogCore + DatadogCrashReporting — crash reports (Sentry crash equiv).
- DatadogLogs — handled faults reported as error logs via reportError(),
  preserving AppCoordinator's fault filtering + underlying_error attribute
  (Sentry capture(error:) equiv). Both feed Datadog Error Tracking.

RUM is intentionally not used: DatadogRUM links UIKit and does not build
for native (AppKit) macOS — only Mac Catalyst. Logs + Crash Reporting are
the supported best-practice stack for a native macOS app.

Also: remove the Sentry SPM dependency + release-build.sh sentry-cli
(dSYM/release) steps, replaced with best-effort `datadog-ci dsyms upload`
(guarded on DATADOG_API_KEY); update README/SECURITY/release skill wording
and the codeql cache comment.

Verified: app builds on macos (arch=arm64, warnings-as-errors); shellcheck,
swift-format, actionlint, prettier, markdownlint all pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Completes the Sentry removal: drop the now-defunct Sentry MCP server
config, leaving only assemblyai-docs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@alexkroman
alexkroman force-pushed the feat/datadog-monitoring branch from 96feeee to 9ea6f74 Compare July 1, 2026 17:06
Set a random, locally-generated install UUID as Datadog's @usr.id (no
name/email/PII) and emit one "app launched" log per run, so unique-install
and version-adoption metrics have baseline volume — not just installs that
hit an error. Powers the Unique users / Adoption widgets on the Blurt
dashboard.

Using UUID + UserDefaults also makes `import Foundation` required again,
fixing the swiftlint analyze unused_import failure. Disclosed in
README.md and SECURITY.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Monitoring.start() was only called inside `#if !DEBUG` in AppDelegate, so
periphery (which scans a Debug build) saw it — and everything it uses
(clientToken/service/environment/installIDKey/installID) — as unreachable
dead code. Call start() unconditionally and move the release gate to a
runtime `isReleaseBuild` guard inside it: same behavior (no-op in Debug, no
dev telemetry) but the config stays reachable, so periphery is clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@alexkroman
alexkroman added this pull request to the merge queue Jul 1, 2026
Merged via the queue into main with commit 8d6a4e5 Jul 1, 2026
6 checks passed
@alexkroman
alexkroman deleted the feat/datadog-monitoring branch July 1, 2026 18:14
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