Self-Serve
Learn about Sentry's self-serve feature-flag integrations.
Sentry can track flag evaluations as they happen within your application. Flag evaluations will appear in the "Feature Flag" section of Issue Details page as a table, with "suspect" flag predictions highlighted in yellow. Learn more about how to interact with feature flag insights within the Sentry UI by reading the Issue Details page documentation.
To set up evaluation tracking visit the explore page and select the language and SDK of your choice. Not using a supported SDK? That's okay. We support self-serve integrations with your existing system.
To set up self-serve evaluation tracking visit one of our supported languages pages:
Sentry can track changes to feature flag definitions and report suspicious feature flag edits.
Sentry offers a change tracking feature which functions as an audit-log of feature flag changes. When a feature flag definition changes in your back-end you can emit a web hook to Sentry.
If you're using a self-serve integration it means you will likelyneed to write code to support this endpoint. This section documents our authentication proceedures as well as the resource's fields and structure.
Authentication is performed using a "signing secret". The "signing secret" must be used to sign the web hook payload in your feature flagging system. Signing the payload with your secret produces a "signature". Sentry needs this signature so it can compare the results of our signing function to yours. Both sides must use the same signing function. Sentry uses a HMAC SHA256 hex-digest of the web hook payload. In Python this function looks like:
def hmac_sha256_hex_digest(secret: str, message: bytes):
return hmac.new(secret.encode(), message, hashlib.sha256).hexdigest()
The result of this function must be sent as a header to Sentry: X-Sentry-Signature signature_result
.
An API blueprint is available at this permalink. We strive to keep this page updated. Be sure to check the latest master branch for new protocol versions. We will always maintain backwards compatibility so there is no harm in implementing an old version. However, new versions might introduce new features.
Enabling Change Tracking is a three step process. To get started visit the feature-flags settings page in a new tab. Then follow the steps listed below.
- **Click the "Add New Provider" button.
- One webhook secret can be registered per provider type.
- Register the webhook URL.
- Copy the provided Sentry webhook URL and configure your feature flagging system to emit web hooks to this URL.
- Set the Signing Secret.
- In your feature flagging system's UI retries the "Signing Secret".
- Copy the signing secret in the revealed input box and paste it into the input box labeled "Secret" in Sentry.
- Save the secret by clicking "Save Secret" in the Sentry fly out.
Once saved Sentry will now accept and authenticate all inbound hooks to your organization's feature flag webhook endpoint.
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").