You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Hot R.O.D. - Rides on Demand - Grafana integration
2
2
3
-
This is the Hot R.O.D. demo application that consists of the same components as the `examples/hotrod/`, only Grafanaand Loki integration is added to this setup, so you can correlate logs and traces in one application.
3
+
This is the Hot R.O.D. demo application that consists of the same components as the `examples/hotrod/`, only Grafana, Loki and Prometheus integration is added to this setup, so you can correlate logs, metrics and traces in one application.
4
4
5
-
## Running
5
+
## Running via `docker-compose`
6
6
7
-
### Run everything via `docker-compose`
7
+
### Prerequisites
8
+
9
+
* Clone the Jaeger repository `git clone https://github.com/jaegertracing/jaeger.git`, then `cd examples/grafana-integration`
10
+
11
+
* All services will log to Loki via the loki docker logging plugin.
12
+
To install run this on the host:
13
+
14
+
```bash
15
+
docker plugin install \
16
+
grafana/loki-docker-driver:latest \
17
+
--alias loki \
18
+
--grant-all-permissions
19
+
```
20
+
21
+
### Deploy the services
22
+
23
+
* Pull up the services: `docker-compose up`
8
24
9
-
#### Prerequisites
10
-
* Download `docker-compose.yml` from https://github.com/jaegertracing/jaeger/blob/master/examples/grafana-integration/docker-compose.yml
11
-
* Download the `datasources.yaml` from the `examples/grafana-integration/` folder
12
25
* All services will log to Loki via the loki docker logging plugin.
* Run Grafana and Loki integration with Jaeger backend using HotROD demo with `docker-compose -f path-to-yml-file up`
24
-
* Access Grafana UI at http://localhost:3000 and HotROD app at http://localhost:8080
25
-
* Shutdown / cleanup with `docker-compose -f path-to-yml-file down`
35
+
### Access the services
36
+
* HotROD application at http://localhost:8080
37
+
* Access Grafana UI at http://localhost:3000
38
+
39
+
### Explore with Loki
40
+
41
+
Currently the most powerful way to correlate application logs with traces can be performed via Grafana's Explore interface.
42
+
43
+
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/).
44
+
45
+
For example after selecting the compose project, errors can be filtered with the following expression:
Since the HotROD application can expose its metrics in Prometheus' format, these can be also used during investigation.
56
+
57
+
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.
58
+
59
+
There are also panels to display the ratio/percentage of errors in the current timeframe.
60
+
61
+
Additionally, there are graphs for each service, visualing the rate of the requests and showing latency percentiles.
62
+
63
+
### Clean up
64
+
65
+
To stop the containers use `docker-compose -f path-to-yml-file down`
0 commit comments