package
0.0.4
Repository: https://github.com/go-baselib/weaver-kube.git
Documentation: pkg.go.dev

# README

Telemetry

This directory contains an example of how to use the weaver kube plugin API to configure how metrics and traces are exported. In main.go, we register a plugin to export traces to Jaeger and a plugin to export metrics to Prometheus. Compile the telemetry binary and use it as you would weaver kube. Use prometheus.yaml and jaeger.yaml to deploy Prometheus and Jaeger to a Kubernetes cluster.

$ kubectl apply -f jaeger.yaml -f prometheus.yaml -f $(telemetry deploy kube_deploy.yaml)

If you want to visualize your traces and metrics collected by Jaeger and Prometheus with Grafana, you can deploy Grafana using grafana.yaml. Note that Jaeger and Prometheus are automatically added as data sources in Grafana. grafana_dashboard.json is an example of a Service Weaver dashboard that helps you visualize the metrics generated by Service Weaver.

$ kubectl apply -f grafana.yaml

To open Grafana:

$ kubectl port-forward service/grafana 8081:80

In your browser open localhost:8081. The default username and password are admin, admin.

To open Grafana dashboard, follow the instructions here.

Note: prometheus.yaml, jaeger.yaml, grafana.yaml are examples of how to quickly start Prometheus, Jaeger and Grafana. For production usage, you may want to further customize them.