Skip to content

Conversation

@dustinbyrne
Copy link
Contributor

@dustinbyrne dustinbyrne commented Dec 17, 2025

This change adds observability into feature flag evaluation failures by including a $feature_flag_error property on $feature_flag_called events. The error types are:

Error Type Description
timeout Request timed out (Timeout::Error, Net::ReadTimeout, Net::WriteTimeout)
connection_error Network connectivity issues (ECONNREFUSED, ECONNRESET, SocketError)
errors_while_computing_flags Server returned errorsWhileComputingFlags: true
quota_limited Feature flags quota exceeded
flag_missing Requested flag not in API response
api_error_* HTTP error status codes (e.g., api_error_500, api_error_503)
unknown_error Unexpected error that doesn't match known patterns

Multiple errors can occur simultaneously and are joined with commas (e.g., errors_while_computing_flags,flag_missing).

If an error occurs while fetching flags, the property will be set to
indicate what happened.
@dustinbyrne dustinbyrne force-pushed the feat/feature-flag-error branch from bccd3ac to c3c405a Compare December 19, 2025 19:35
@dustinbyrne dustinbyrne marked this pull request as ready for review December 19, 2025 19:45
@dustinbyrne dustinbyrne requested a review from a team December 19, 2025 19:45
@posthog-project-board-bot posthog-project-board-bot bot moved this to In Review in Feature Flags Dec 19, 2025
@github-project-automation github-project-automation bot moved this from In Review to Approved in Feature Flags Dec 19, 2025
@dustinbyrne dustinbyrne merged commit 01a0245 into main Dec 19, 2025
13 checks passed
@dustinbyrne dustinbyrne deleted the feat/feature-flag-error branch December 19, 2025 21:17
@github-project-automation github-project-automation bot moved this from Approved to Done in Feature Flags Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants