diff --git a/devenv/README.md b/devenv/README.md index 2dca8818cf6..39164d7f43e 100644 --- a/devenv/README.md +++ b/devenv/README.md @@ -39,4 +39,11 @@ Some of the blocks support dynamic change of the image version used in the Docke make devenv sources=postgres,openldap,grafana postgres_version=9.2 grafana_version=6.7.0-beta1 ``` -Note: The grafana block is pre-configured with the dev-datasources and dashboards. + +### Notes per block + +#### Grafana +The grafana block is pre-configured with the dev-datasources and dashboards. + +#### Jaeger +Jaeger block runs both Jaeger and Loki container. Loki container sends traces to Jaeger and also logs its own logs into itself so it is possible to setup derived field for traceID from Loki to Jaeger. You need to install a docker plugin for the self logging to work, without it the container won't start. See https://github.com/grafana/loki/tree/master/cmd/docker-driver#plugin-installation for installation instructions. diff --git a/devenv/datasources.yaml b/devenv/datasources.yaml index 8634382bac7..5ff99731496 100644 --- a/devenv/datasources.yaml +++ b/devenv/datasources.yaml @@ -246,5 +246,29 @@ datasources: access: proxy url: http://localhost:3100 editable: false + jsonData: + derivedFields: + - name: "traceID" + matcherRegex: "trace_id=(\\w+)" + url: "$${__value.raw}" + datasourceUid: gdev-jaeger + - name: "traceID" + matcherRegex: "trace_id=(\\w+)" + url: "$${__value.raw}" + datasourceUid: gdev-zipkin + + - name: gdev-jaeger + type: jaeger + uid: gdev-jaeger + access: proxy + url: http://localhost:16686 + editable: false + + - name: gdev-zipkin + type: zipkin + uid: gdev-zipkin + access: proxy + url: http://localhost:9411 + editable: false diff --git a/devenv/docker/blocks/jaeger/docker-compose.yaml b/devenv/docker/blocks/jaeger/docker-compose.yaml index f3f9f9252f2..119f1c87150 100644 --- a/devenv/docker/blocks/jaeger/docker-compose.yaml +++ b/devenv/docker/blocks/jaeger/docker-compose.yaml @@ -10,6 +10,11 @@ ports: - "3100:3100" command: -config.file=/etc/loki/local-config.yaml + # For this to work you need to install the logging driver see https://github.com/grafana/loki/tree/master/cmd/docker-driver#plugin-installation + logging: + driver: loki + options: + loki-url: "http://localhost:3100/loki/api/v1/push" # Optional jaeger tracing environment: - JAEGER_AGENT_HOST=jaeger