Skip to content

Commit ebdd756

Browse files
committed
docs: Add Feature Health docs
- Add "Advanced Use > Feature Health" - Add Grafana Feature Health Provider docs - Improve Grafana Integration docs - Rename "APM" to "Observability"
1 parent d868456 commit ebdd756

File tree

4 files changed

+106
-20
lines changed

4 files changed

+106
-20
lines changed
+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: Feature Health
3+
---
4+
5+
:::info
6+
7+
Feature Health is an upcoming feature that's not yet available.
8+
9+
:::
10+
11+
Feature Health enables users to monitor observability metrics within Flagsmith, specifically in relation to Flagsmith's Features and Environments. Flagsmith receives alert notifications from your observability provider and, based on this data, marks your Features and optionally Environments with an **Unhealthy** status, providing details about the alerts. This enhances your team's observability, allowing for quicker, more informed decisions.
12+
13+
## Integrations
14+
15+
The following is an overview of the Feature Health providers currently supported.
16+
17+
### Grafana / Prometheus Alertmanager
18+
19+
[Learn more](/integrations/apm/grafana/#feature-health-provider-setup) about configuring Grafana / Prometheus Alertmanager Feature Health provider.
20+
21+
### Sample Provider
22+
23+
We provide a Sample Provider for your custom integrations. To create a Sample Feature Health webhook:
24+
25+
1. Go to Project Settings > Feature Health.
26+
2. Select "Sample" from the Provider Name drop-down menu.
27+
3. Click Create and copy the Webhook URL.
28+
29+
You can use the webhook in your custom integration. Refer to the payload schema below:
30+
31+
```json
32+
{
33+
"$schema": "http://json-schema.org/draft-07/schema#",
34+
"title": "SampleEvent",
35+
"type": "object",
36+
"properties": {
37+
"environment": {
38+
"type": "string"
39+
},
40+
"feature": {
41+
"type": "string"
42+
},
43+
"status": {
44+
"type": "string",
45+
"enum": ["healthy", "unhealthy"]
46+
},
47+
"reason": {
48+
"type": "string"
49+
}
50+
},
51+
"required": ["feature", "status"]
52+
}
53+
```
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"label": "APM",
2+
"label": "Observability",
33
"collapsed": false,
44
"position": 20
5-
}
5+
}

docs/docs/integrations/apm/grafana.md

+49-17
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import ReactPlayer from 'react-player'
99

1010
![Image](/img/integrations/grafana/grafana-logo.svg)
1111

12-
You can integrate Flagsmith with Grafana. Send flag change events from Flagsmith into Grafana as annotations.
12+
Integrate Flagsmith with Grafana to send flag change events as annotations.
1313

14-
The video below will walk you through the steps of adding the integration:
14+
The video below demonstrates the integration process:
1515

1616
<ReactPlayer
1717
controls
@@ -21,25 +21,57 @@ The video below will walk you through the steps of adding the integration:
2121

2222
## Integration Setup
2323

24-
Log into Grafana and generate a Service Account Key:
24+
To set up the integration, follow these steps:
2525

26-
1. Navigate to Administration > Users and access > Service accounts
27-
2. Add Service Account
28-
3. Change the Role selection to "Annotation Writer" or "Editor".
29-
4. Click on Add service account token and make a note of the generated token.
26+
### In Grafana:
3027

31-
In Flagsmith:
28+
1. Go to Administration > Users and access > Service accounts.
29+
2. Add a Service Account.
30+
3. Set the Role to "Annotation Writer" or "Editor".
31+
4. Click on "Add service account token" and save the generated token.
3232

33-
1. Navigate to Integrations, then add the Grafana integration.
34-
2. Enter the URL for your web interface of your Grafana installation. For example, `https://grafana.flagsmith.com`.
35-
3. Paste the service account token you created in Grafana to `Service account token` field.
33+
### In Flagsmith:
34+
35+
1. Go to Integrations and add the Grafana integration.
36+
2. Enter the URL of your Grafana installation (e.g., `https://grafana.flagsmith.com`).
37+
3. Paste the service account token from Grafana into the `Service account token` field.
3638
4. Click Save.
3739

38-
Flag change events will now be sent to Grafana as _Organisation Level_
39-
[Annotations](https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/annotate-visualizations/).
40+
Flag change events will now be sent to Grafana as _Organisation Level_ [Annotations](https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/annotate-visualizations/).
41+
42+
To view the annotations in Grafana, go to Dashboard Settings > Annotations, select the `Grafana` data source, and filter by the `flagsmith` tag.
43+
44+
Annotations for feature-specific events include project tags, user-defined tags, and environment tags for flag change events.
45+
46+
## Feature Health Provider Setup
47+
48+
:::info
49+
50+
Feature Health is an upcoming feature that is not yet available.
51+
52+
:::
53+
54+
### In Flagsmith:
55+
56+
1. Go to Project Settings > Feature Health.
57+
2. Select "Grafana" from the Provider Name drop-down menu.
58+
3. Click Create and copy the Webhook URL.
59+
60+
### In Grafana:
61+
62+
1. Create a new Webhook contact point using the Webhook URL from Flagsmith. Refer to the [Grafana documentation on contact points](https://grafana.com/docs/grafana/latest/alerting/configure-notifications/manage-contact-points/#add-a-contact-point) for details.
63+
2. Leave Optional Webhook settings empty. Ensure the "Disable resolved message" checkbox is unchecked.
64+
3. Add the `flagsmith_feature` label to your alert rule, specifying the Flagsmith Feature name. Refer to the [Grafana documentation on alert rule labels](https://grafana.com/docs/grafana/latest/alerting/fundamentals/alert-rules/annotation-label/#labels) for more information.
65+
4. Optionally, include the `flagsmith_environment` label in your alert rule, using the Flagsmith Environment name as the value.
66+
5. Set the previously created contact point as the alert rule recipient.
67+
68+
You can create multiple alert rules pointing to the Feature Health Provider webhook. Ensure they include the `flagsmith_feature` label with a Feature name from the Project you created the Feature Health Provider for, to see Feature Health status changes for your features.
4069

41-
You can view the annotations in your Grafana dashboards but going to Dashboard Settings > Annotations, selecting the
42-
`Grafana` data source and then filtering on annotations that are tagged with the `flagsmith` tag.
70+
You can integrate Grafana Feature Health with Prometheus Alertmanager. For detailed instructions on adding Flagsmith labels to your alerts in Prometheus, refer to the [Prometheus Alertmanager webhook configuration](https://prometheus.io/docs/alerting/latest/configuration/#webhook_config) and [Alerting rules configuration](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/#defining-alerting-rules) documentation.
4371

44-
Annotations reporting feature-specific events include the project tag and Flagsmith user-defined tags, and flag change
45-
events include the environment tag as well.
72+
The Feature Health UI will display the following information:
73+
- Alert name
74+
- Link to the alert instance in your Alertmanager
75+
- Alert description (if provided in alert annotations)
76+
- Alert summary (if provided in alert annotations)
77+
- Runbook URL (if provided in alert annotations)

docs/docs/integrations/index.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ analysis. [Learn more](/integrations/analytics/rudderstack).
6868
You can integrate Flagsmith with your own Analytics Platform/Data Warehouse. Send your Identity flag states into
6969
Snowflake, RedShift or anywhere else for further downstream analysis! [Learn more](/integrations/webhook).
7070

71-
## Application Monitoring and Performance
71+
## Observability
7272

7373
---
7474

@@ -90,6 +90,7 @@ You can integrate Flagsmith with Dynatrace. Send flag change events from Flagsmi
9090

9191
You can integrate Flagsmith with Grafana. Send flag change events from Flagsmith into Grafana as annotations.
9292
[Learn more](/integrations/apm/grafana).
93+
**Coming soon**: Integrate your Grafana and Prometheus alerts with Feature Health.
9394

9495
---
9596

0 commit comments

Comments
 (0)