- 5546e4d: Trim whitespace from
api_key,personal_api_key, andhostconfig values, and defaulthosttohttps://us.i.posthog.com.
- 8f9cf78: Trigger another patch release to verify the Ruby release workflow.
- d83df86: Simplify Ruby release token usage to retry the automated release flow.
- f69d97a: Switch the Ruby SDK to automated Changesets-based releases.
- Multiple instances can cause dropped events and inconsistent behavior
- Use
disable_singleton_warning: truewhen intentionally creating multiple clients (e.g., for different projects) - Documentation updated with singleton best practices
- feat: Add semver comparison operators for local feature flag evaluation (#107)
- Supports
semver_eq,semver_neq,semver_gt,semver_gte,semver_lt,semver_ltefor direct comparisons - Supports
semver_tilde,semver_caret,semver_wildcardfor range matching - Handles v-prefix, pre-release suffixes, partial versions, and whitespace
- Supports
- fix: Move Rails generator template to
lib/generators/posthog/templates/to ensure it's included in the gem package (#103)
- fix: Fix Railtie middleware insertion crashing on Rails initialization — changed
insert_middleware_afterfrom a class method to an instance method (matching how Rails executes initializer blocks viainstance_exec), and removed the unsupportedinclude?query onMiddlewareStackProxy(#97) - fix: Prevent sending empty batches and handle non-JSON response bodies gracefully in transport layer (#87)
- fix: Use
$current_urlproperty (instead of$request_url) so exception URLs appear correctly in the PostHog UI - fix: Only include source context lines for in-app exception frames, avoiding unnecessary reads of gem source files (#88)
- fix: Filter out failed flag evaluations to prevent cached values from being overwritten during transient server errors (#96)
- Fix
posthog-railsdeployment
- feat: Add posthog-rails gem for automatic Rails exception tracking
- Automatic capture of unhandled exceptions via Rails middleware
- Automatic capture of rescued exceptions (configurable)
- Automatic instrumentation of ActiveJob failures
- Integration with Rails 7.0+ error reporter
- Configurable exception exclusion list
- User context capture from controllers
- feat: Add ETag support for feature flag definitions polling (#84)
- fix: fallback to API for multi-condition flags with static cohorts (#80)
- fix: don't sort condition sets with variant overrides to top (#78)
Not used
- feat: add exception capture (#77)
- feat: Add support for local evaluation of flags that depend on other flags (#75)
- fix: Add cohort evaluation support for local feature flag evaluation (#74)
- fix: Pass project API key in
remote_configrequests (#72)
- feat: make the
send_feature_flagsparameter more declarative and ergonomic
- fix: was warning on absent UUID when capturing (#67)
- Drops support for Ruby 2.x (#63)
Version 3.0 of the Ruby SDK drops support for Ruby 2.x. The minimum supported version is now Ruby 3.2.
In previous version FeatureFlags was added as a top-level class and was causing conflicts for other folk's applications.
In this change we have properly namespaced all classes within a PostHog module. See #60
- feat: add before_send function (#64)
- Use new
/flagsservice to power feature flag evaluation.
- Fix
condition_indexcan be null in/deciderequests
- Add more information to
$feature_flag_calledevents for/deciderequests such as flag id, version, reason, and the request id.
- Fix invocation of shell by ` character
- Add support for quota-limited feature flags
- Add method for fetching decrypted remote config flag payload
- Adds a new, optional
distinct_idparameter to group identify calls which allows specifying the Distinct ID for the event.
- Adds a new
feature_flag_request_timeout_secondstimeout parameter for feature flags which defaults to 3 seconds, updated from the default 10s for all other API calls.
- Fix memory leak in PostHog::Client.new
- Remove new relative date operators, combine into regular date operators
- Add default properties for feature flags local evaluation, to target flags by distinct id & group keys.
- Numeric property handling for feature flags now does the expected: When passed in a number, we do a numeric comparison. When passed in a string, we do a string comparison. Previously, we always did a string comparison.
- Add support for relative date operators for local evaluation.
- Update option doc string to show personal API Key as an option
- Add support for feature flag payloads
- Remove concurrent gem dependency version limitation
- Add support for datetime operators for local feature flag evaluation
- Add support for variant overrides for local feature flag evaluation
Breaking changes:
- Minimum PostHog version requirement: 1.38
- Regular feature flag evaluation (i.e. by requesting from your PostHog servers) doesn't require a personal API key.
Clientinitialisation doesn't take theapi_hostparameter anymore. Instead, it takes thehostparameter, which needs to be fully qualified. For example:https://api.posthog.comis valid, whileapi.posthog.comis not valid.- The log level by default is set to WARN. You can change it to DEBUG if you want to debug the client by running
client.logger.level = Logger::DEBUG, where client is your initializedPostHog::Clientinstance. - Default polling interval for feature flags is now set at 30 seconds. If you don't want local evaluation, don't set a personal API key in the library.
- Feature flag defaults are no more. Now, if a flag fails to compute for whatever reason, it will return
nil. Otherwise, it returns either true or false. In case ofget_feature_flag, it may also return a string variant value.
New Changes:
- You can now evaluate feature flags locally (i.e. without sending a request to your PostHog servers) by setting a personal API key, and passing in groups and person properties to
is_feature_enabledandget_feature_flagcalls. - Introduces a
get_all_flagsmethod that returns all feature flags. This is useful for when you want to seed your frontend with some initial flags, given a user ID.
- Add support for running the client in "No-op" mode for testing (#15)
- Fix
create_aliascall (#14)
- Fix
present?call (#12)
- Add ability to disable SSL verification by passing
skip_ssl_verification(#11)
- Add concurrent-ruby gem dependency (fixes #8)
- Change default domain from
t.posthog.comtoapp.posthog.com