Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/platforms/php/common/feature-flags/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Set Up Feature Flags
sidebar_title: Feature Flags
sidebar_order: 7000
description: With Feature Flags, Sentry tracks feature flag evaluations in your application, keeps an audit log of feature flag changes, and reports any suspicious updates that may have caused an error.
---

## Prerequisites

- [Sentry SDK](/) version `4.18.1` or above.

## Enable Evaluation Tracking

<PlatformContent includePath="feature-flags/evaluation-tracking-index" />
10 changes: 10 additions & 0 deletions platform-includes/feature-flags/evaluation-tracking-index/php.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### Generic API
You can use the generic API to manually track feature flag evaluations. These evaluations are held in memory and are sent to Sentry on error and transaction events. **At the moment, we only support boolean flag evaluations.**
Copy link
Member

Choose a reason for hiding this comment

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

We might want to call out how many feature flags you can set.


```php
\Sentry\addFeatureFlag('test-flag', false);

\Sentry\captureException(new \RuntimeException("Something went wrong!"));
```

Go to your Sentry project and confirm that your error event has recorded the feature flag "test-flag" and its value "false".
Loading