Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update analytics examples #3660

Merged
merged 2 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions examples/analytics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ For more information on the different analytics configurations, see the [Analyti
## Contents

* [Clickhouse Example](clickhouse/README.md)
* [Prometheus Example](prometheus/README.md)
4 changes: 2 additions & 2 deletions examples/analytics/clickhouse/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src="../../images/logos/clickhouse.svg" alt="MySQL" width=150 height=150 />
<img src="../../images/logos/clickhouse.svg" alt="ClickHouse" width=150 height=150 />
</p>

# ClickHouse Example
Expand All @@ -8,7 +8,7 @@ Flipt supports storing and querying flag evaluation data by leveraging [ClickHou

This example demonstrates how to use Flipt with ClickHouse to store and query flag evaluation data.

!['ClickHouse Example'](../../images/clickhouse.png)
!['Analytics Example'](../../images/analytics.png)

## Requirements

Expand Down
25 changes: 25 additions & 0 deletions examples/analytics/prometheus/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<p align="center">
<img src="../../images/logos/prometheus.svg" alt="Prometheus" width=150 height=150 />
</p>

# Prometheus Example

Flipt supports storing and querying flag evaluation data by leveraging [Prometheus](https://prometheus.io/) as the backend data store.

This example demonstrates how to use Flipt with Prometheus to store and query flag evaluation data.

!['Analytics Example'](../../images/analytics.png)

## Requirements

To run this example application you'll need:

* [Docker](https://docs.docker.com/install/)
* [docker-compose](https://docs.docker.com/compose/install/)

## Running the Example

1. Run `docker compose up` from this directory
1. Open the Flipt UI (default: [http://localhost:8080](http://localhost:8080))
1. Create some sample data: Flags/Segments/etc. Perform a few evaluations in the Console.
1. Navigate to the `Analytics` tab for the flag that you created and evaluated.
5 changes: 2 additions & 3 deletions examples/analytics/prometheus/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ services:
volumes:
- "./flipt-config.yml:/etc/flipt/config/default.yml"
depends_on:
prometheus:
condition: service_healthy
- prometheus
ports:
- "8080:8080"
networks:
Expand All @@ -27,7 +26,7 @@ services:
- FLIPT_LOG_LEVEL=info
- FLIPT_ANALYTICS_STORAGE_PROMETHEUS_ENABLED=true
- FLIPT_ANALYTICS_STORAGE_PROMETHEUS_URL=http://prometheus:9090
- PROMETHEUS_AUTH_TOKEN='Basic YWRtaW46dGVzdA=='
- PROMETHEUS_AUTH_TOKEN=Basic YWRtaW46dGVzdA==
- FLIPT_META_TELEMETRY_ENABLED=false
command: ["/flipt", "--force-migrate"]

Expand Down
2 changes: 1 addition & 1 deletion examples/analytics/prometheus/flipt-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ analytics:
storage:
prometheus:
enabled: true
url: http://localhost:9090
url: http://prometheus:9090
headers:
Authorization: ${PROMETHEUS_AUTH_TOKEN}
File renamed without changes
Loading