Skip to content

Commit

Permalink
Add integration test for metrics; updated Changelog and docs to inclu…
Browse files Browse the repository at this point in the history
…de reference to metrics
  • Loading branch information
markphelps committed Jul 7, 2019
1 parent 9a1efed commit 1d0014d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
This format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## [v0.7.0](https://github.com/markphelps/flipt/releases/tag/v0.7.0) - 2019-07-07

### Added

* CORS support with `cors` config options
* [Prometheus](https://prometheus.io/) metrics exposed at `/metrics`

## [v0.6.1](https://github.com/markphelps/flipt/releases/tag/v0.6.1) - 2019-06-14

Expand Down
22 changes: 21 additions & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,28 @@ Work is planned to add caching support to rule evaluation soon.
!!! warning
Enabling in-memory caching when running more that one instance of Flipt is not advised as it will lead to unpredictable results.
## Metrics
Flipt exposes [Prometheus](https://prometheus.io/) metrics at the `/metrics` HTTP endpoint. To see which metrics are currently supported, point your browser to `FLIPT_HOST/metrics` (ex: `localhost:8080/metrics`).

You should see a bunch of metrics being recorded such as:

```text
flipt_cache_hit_total{cache="memory",type="flag"} 1
flipt_cache_miss_total{cache="memory",type="flag"} 1
...
go_gc_duration_seconds{quantile="0"} 8.641e-06
go_gc_duration_seconds{quantile="0.25"} 2.499e-05
go_gc_duration_seconds{quantile="0.5"} 3.5359e-05
go_gc_duration_seconds{quantile="0.75"} 6.6594e-05
go_gc_duration_seconds{quantile="1"} 0.00026651
go_gc_duration_seconds_sum 0.000402094
go_gc_duration_seconds_count 5
...
```

## Authentication

Flipt currently has no built in authentication, authorization or encryption as Flipt was designed to work inside your trusted architecture and not be exposed publicly.
There is currently no built in authentication, authorization or encryption as Flipt was designed to work inside your trusted architecture and not be exposed publicly.

If you do wish to expose the Flipt dashboard and REST API publicly using HTTP Basic Authentication, you can do so by using a reverse proxy. There is an [example](https://github.com/markphelps/flipt/tree/master/examples/auth) provided in the GitHub repository showing how this could work.
6 changes: 6 additions & 0 deletions test/integration
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,11 @@ step_7_test_meta()
contains "\"database\""
}

step_8_test_metrics()
{
shakedown GET "$flipt_host/metrics"
status 200
}

run()
{
Expand Down Expand Up @@ -251,6 +256,7 @@ run()
step_5_test_evaluation
step_6_test_delete
step_7_test_meta
step_8_test_metrics
}

cleanup ()
Expand Down

0 comments on commit 1d0014d

Please sign in to comment.