Skip to content

Commit

Permalink
rework folder structure, remove duplicated file, accept suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: fktkrt <fktkrt@gmail.com>
  • Loading branch information
fktkrt committed Aug 29, 2020
1 parent 91900d6 commit 8771026
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
17 changes: 8 additions & 9 deletions examples/grafana-integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ This is the Hot R.O.D. demo application that consists of the same components as

* Clone the Jaeger repository `git clone https://github.com/jaegertracing/jaeger.git`, then `cd examples/grafana-integration`

* All services will log to Loki via the loki docker logging plugin.
To install run this on the host:
* All services will log to Loki via the [official Docker driver plugin](https://grafana.com/docs/loki/latest/clients/docker-driver/).
Install the Loki logging plugin for Docker:

```bash
docker plugin install \
Expand All @@ -18,21 +18,21 @@ grafana/loki-docker-driver:latest \
--grant-all-permissions
```

### Deploy the services
### Run the services

Pull up the services: `docker-compose up`
`docker-compose up`

### Access the services
* HotROD application at http://localhost:8080
* Access Grafana UI at http://localhost:3000
* Grafana UI at http://localhost:3000

### Explore with Loki

Currently the most powerful way to correlate application logs with traces can be performed via Grafana's Explore interface.

After setting the datasource to Loki, all the log labels become available, and can be easily filtered using [Loki's LogQL query language](https://grafana.com/docs/loki/latest/logql/).

For example after selecting the compose project, errors can be filtered with the following expression:
For example, after selecting the compose project/service under Log labels , errors can be filtered with the following expression:

```
{compose-project="grafana-integration"} |= "error"
Expand All @@ -44,13 +44,12 @@ which will list the redis timeout events.

Since the HotROD application can expose its metrics in Prometheus' format, these can be also used during investigation.

This example includes a dashboard, which contains a log panel, which displays the logs for the selected services in real time. These can be also filtered by a search field.
This example includes a dashboard that contains a log panel for the selected services in real time. These can be also filtered by a search field, that provides `grep`-like features.

There are also panels to display the ratio/percentage of errors in the current timeframe.

Additionally, there are graphs for each service, visualing the rate of the requests and showing latency percentiles.

### Clean up

To stop the containers use `docker-compose -f path-to-yml-file down`

`docker-compose down`
4 changes: 3 additions & 1 deletion examples/grafana-integration/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ services:
ports:
- '3000:3000'
volumes:
- ./grafana/provisioning/:/etc/grafana/provisioning/
- ./grafana/datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml
- ./grafana/dashboards.yml:/etc/grafana/provisioning/dashboards/dashboards.yml
- ./grafana/hotrod_metrics_logs.json:/etc/grafana/provisioning/dashboards/hotrod_metrics_logs.json
logging:
driver: loki
options:
Expand Down

0 comments on commit 8771026

Please sign in to comment.