Skip to content

Commit e12953e

Browse files
authored
ref(flags): update generic webhook instructions (#12344)
* ref(flags): update generic webhook instructions * Use full path for generic index self-link
1 parent 5ede932 commit e12953e

File tree

1 file changed

+22
-20
lines changed
  • docs/organization/integrations/feature-flag/generic

1 file changed

+22
-20
lines changed

docs/organization/integrations/feature-flag/generic/index.mdx

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Sentry can track flag evaluations as they happen within your application. Flag
1010

1111
### Set Up Evaluation Tracking
1212

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 generic integrations with your existing system.
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 generic solutions for your existing system.
1414

1515
To set up generic evaluation tracking, visit one of our supported languages' pages:
1616
* [JavaScript](/platforms/javascript/configuration/integrations/generic/)
@@ -20,15 +20,33 @@ To set up generic evaluation tracking, visit one of our supported languages' pag
2020

2121
Sentry can track changes to feature flag definitions and report suspicious feature flag edits.
2222

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.
23+
For the generic case, you need to write a webhook that conforms to our API. You can find instructions on how to do this below.
24+
25+
### Set Up Change Tracking
26+
27+
Enabling Change Tracking is a four 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.
28+
29+
1. **Click the "Add New Provider" button.**
30+
- One webhook secret can be registered per provider type.
31+
- Select Generic in the dropdown that says "Select a provider".
32+
2. **Save the webhook URL**.
33+
- Copy the provided Sentry webhook URL and save it for step 4.
34+
3. **Set the Signing Secret**.
35+
- In your feature flagging system's UI, find the "Signing Secret".
36+
- Copy the signing secret and paste it into the input box next to "Secret" in Sentry settings.
37+
- Save the secret by clicking "Add Provider" in Sentry settings.
38+
4. **Write your own webhook**.
39+
- Configure your system to POST to the webhook URL, whenever a feature flag definition changes.
40+
- Sign your webhook payloads with the Signing Secret from step 3.
41+
- See [#api-documentation](/organization/integrations/feature-flag/generic/#api-documentation) for more details.
2442

2543
### API Documentation
2644

27-
If you're using a generic integration it means you will likely need to write code to support this endpoint. This section documents our authentication procedures as well as the resource's fields and structure.
45+
This section documents our authentication procedures as well as the resource's fields and structure.
2846

2947
#### Authentication
3048

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:
49+
Authentication is performed using a "signing secret". The "signing secret" must be used to sign the webhook 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:
3250

3351
```python
3452
def hmac_sha256_hex_digest(secret: str, message: bytes):
@@ -40,19 +58,3 @@ The result of this function must be sent as a header to Sentry: `X-Sentry-Signat
4058
#### API Blueprint
4159

4260
[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-
- Select Generic in the dropdown that says "Select a provider".
51-
2. **Register the webhook URL**.
52-
- Copy the provided Sentry webhook URL and configure your feature flagging system to emit web hooks to this URL.
53-
3. **Set the Signing Secret**.
54-
- In your feature flagging system's UI, find the "Signing Secret".
55-
- Copy the signing secret and paste it into the input box next to "Secret" in Sentry settings.
56-
- Save the secret by clicking "Add Provider" in Sentry settings.
57-
58-
Once saved Sentry will now accept and authenticate all inbound hooks to your organization's feature flag webhook endpoint.

0 commit comments

Comments
 (0)