Skip to content

Commit 3943011

Browse files
committed
Add generic provider docs
1 parent d0cb0e4 commit 3943011

File tree

1 file changed

+57
-0
lines changed
  • docs/organization/integrations/feature-flag/self-serve

1 file changed

+57
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: Self-Serve
3+
sidebar_order: 1
4+
description: Learn about Sentry's self-serve feature-flag integrations.
5+
---
6+
7+
## Evaluation Tracking
8+
9+
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](/product/issues/issue-details/#feature-flags).
10+
11+
### Set Up Evaluation Tracking
12+
13+
To set up evaluation tracking visit the [explore page](/product/explore/feature-flags/) 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.
14+
15+
To set up self-serve evaluation tracking visit one of our supported languages pages:
16+
* [JavaScript](/platforms/javascript/configuration/integrations/self-serve/)
17+
* [Python](/platforms/python/integrations/self-serve/)
18+
19+
## Change Tracking
20+
21+
Sentry can track changes to feature flag definitions and report suspicious feature flag edits.
22+
23+
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.
24+
25+
### API Documentation
26+
27+
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.
28+
29+
#### Authentication
30+
31+
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:
32+
33+
```python
34+
def hmac_sha256_hex_digest(secret: str, message: bytes):
35+
return hmac.new(secret.encode(), message, hashlib.sha256).hexdigest()
36+
```
37+
38+
The result of this function must be sent as a header to Sentry: `X-Sentry-Signature signature_result`.
39+
40+
#### API Blueprint
41+
42+
[An API blueprint is available at this permalink](https://github.com/getsentry/sentry/blob/ed324708947ca26392d6579ed76b93fc94a61ab6/src/sentry/flags/docs/api.md#create-generic-flag-log-post). 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.
43+
44+
### Set Up Change Tracking
45+
46+
Enabling Change Tracking is a three step process. To get started visit the [feature-flags settings page](https://sentry.io/orgredirect/organizations/:orgslug/settings/feature-flags) in a new tab. Then follow the steps listed below.
47+
48+
1. **Click the "Add New Provider" button.
49+
- One webhook secret can be registered per provider type.
50+
2. **Register the webhook URL**.
51+
- Copy the provided Sentry webhook URL and configure your feature flagging system to emit web hooks to this URL.
52+
3. **Set the Signing Secret**.
53+
- In your feature flagging system's UI retries the "Signing Secret".
54+
- Copy the signing secret in the revealed input box and paste it into the input box labeled "Secret" in Sentry.
55+
- Save the secret by clicking "Save Secret" in the Sentry fly out.
56+
57+
Once saved Sentry will now accept and authenticate all inbound hooks to your organization's feature flag webhook endpoint.

0 commit comments

Comments
 (0)