Skip to content

Conversation

@TimDaub
Copy link
Contributor

@TimDaub TimDaub commented Nov 6, 2025

Summary

Adds a telemetry configuration option to Porto.create() that allows developers to disable Sentry error tracking in the Porto dialog and authentication interfaces.

Motivation

Developers should have the ability to opt out of telemetry collection for privacy or compliance reasons. This change provides a simple boolean flag to control Sentry initialization.

Partially addresses #1027

Changes

  • Added telemetry?: boolean parameter to Porto.Config (defaults to true)
  • Telemetry setting is passed through the dialog mode to all dialog types (iframe, popup, inline-iframe)
  • Dialog and ID apps check localStorage for telemetry preference before initializing Sentry
  • React error handlers are made conditional based on whether Sentry was initialized
  • Updated documentation to describe the new telemetry parameter

Usage

import { Porto } from 'porto'

// Disable telemetry
const porto = Porto.create({
  telemetry: false,
})

Implementation Details

  • The telemetry preference is stored in localStorage (__porto_telemetry_disabled) for persistence across sessions
  • When telemetry: false, Sentry is not initialized and error handlers fall back to console.error()
  • The setting is communicated to dialog/ID apps via the __internal init message

🤖 Generated with Claude Code

Add a `telemetry` config option to Porto.create() that allows developers
to disable Sentry error tracking in the Porto dialog and authentication
interfaces.

Changes:
- Add `telemetry?: boolean` to Porto.Config (defaults to true)
- Pass telemetry setting through dialog mode to all dialog types
- Update dialog and id apps to respect telemetry preference via localStorage
- Make React error handlers conditional based on Sentry initialization
- Update documentation with telemetry parameter

Usage:
```ts
Porto.create({ telemetry: false })
```

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@changeset-bot
Copy link

changeset-bot bot commented Nov 6, 2025

⚠️ No Changeset found

Latest commit: 4cbfdb3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Nov 6, 2025

@TimDaub is attempting to deploy a commit to the Ithaca Team on Vercel.

A member of the Team first needs to authorize it.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 6, 2025

Open in StackBlitz

npm i https://pkg.pr.new/porto@1029

commit: 4cbfdb3

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