Skip to content

Default enableExposureLogging to true#152

Merged
leoromanovsky merged 1 commit intomainfrom
leo/default-exposure-logging-true
Feb 2, 2026
Merged

Default enableExposureLogging to true#152
leoromanovsky merged 1 commit intomainfrom
leo/default-exposure-logging-true

Conversation

@leoromanovsky
Copy link
Copy Markdown
Collaborator

@leoromanovsky leoromanovsky commented Jan 28, 2026

Motivation

While investigating a customer incident where exposures weren't being recorded, we discovered that enableExposureLogging defaults to false (or undefined), while enableFlagEvaluationTracking defaults to true.

This inconsistency can lead to situations where flag evaluations are tracked but exposures are not.

Changes

  • Default enableExposureLogging to true in the browser SDK provider, matching the existing behavior of enableFlagEvaluationTracking
  • Added unit tests to verify both defaults work correctly and can be explicitly disabled

Decisions

  • Default to true: EVP (Event Volume Pricing) tracks don't cost users additional money, so there's no billing concern with enabling this by default. Making it default to true provides a simpler UX that avoids surprises - if you set up an experiment, exposures will be tracked automatically.

Match the behavior of enableFlagEvaluationTracking which already defaults
to true. This ensures exposure events are sent by default, reducing
customer confusion when experiments don't record exposures.
@leoromanovsky leoromanovsky marked this pull request as ready for review January 28, 2026 20:46
@leoromanovsky leoromanovsky requested a review from a team as a code owner January 28, 2026 20:46
})
})

describe('hooks configuration', () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You've tested every possible combination!

@typotter typotter assigned leoromanovsky and unassigned typotter Feb 2, 2026
@leoromanovsky leoromanovsky merged commit b958a27 into main Feb 2, 2026
3 checks passed
@leoromanovsky leoromanovsky deleted the leo/default-exposure-logging-true branch February 2, 2026 16:05
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.

4 participants