• Stars
    star
    125
  • Rank 286,335 (Top 6 %)
  • Language
    Go
  • Created about 8 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Loki: Simple, Distributed Tracing

Loki: Simple Distributed Tracing

Loki is a distributed tracing system inspired by Zipkin and Prometheus.

  • Pull Based: a central Loki app pull traces from your instrumented applications
  • Service Discover: using Prometheus' Service Discovery frameworks allows Loki to discover your app within many popular orchestrators (Kubernetes, Mesos etc) or service discovery systems (Consul, DNS etc)

Loki consists of:

  • A OpenTracing compatible tracer
  • The Loki app

Internally Loki is really just an opinionated reimplementation of OpenZipkin.

Instrumenting your app

Instrument you go application according to OpenTracing

import (
    "github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc"
    "github.com/weaveworks-experiments/pkg/loki/client"
)

func main() {
    // Create a Loki tracer
    tracer, err := loki.NewTracer(loki.DefaultConfig)

  	// explicitly set our tracer to be the default tracer.
  	opentracing.InitGlobalTracer(tracer)

    // Create an instrumented gRPC server
    s := grpc.NewServer(
        grpc.UnaryInterceptor(
            otgrpc.OpenTracingServerInterceptor(tracer),
        ),
    )

    // Register a http handler for Loki
    http.Handle("/traces", loki.Handler())
    log.Fatal(http.ListenAndServe(":8080", nil))
}

More Repositories

1

kspan

Turning Kubernetes Events into spans
Go
789
star
2

flux-classic

Microservice routing
Go
82
star
3

docker-plugin

Deprecated, part of Weave Net now
Makefile
33
star
4

weave-kube

Deprecated, part of Weave Net now
32
star
5

consul-sidekick

Automatic peer management for Consul in Kubernetes
Go
22
star
6

discovery

Weave Net peer discovery
Shell
15
star
7

scope-global-swarm-service

Running Weave Scope as a Global Swarm Service
13
star
8

demo-weave-kube-hybrid

Weave + Kubernetes Federation across cloud providers
HCL
13
star
9

fleeet

Go
5
star
10

kubelet-mesh

🎂🎂🎂 We've enabled the most impressive UX for Kubernetes 🎂🎂🎂
Go
4
star
11

deployer

Experimental auto-deployer in Rust
Shell
3
star
12

scope-swarm-launcher

Weave Cloud Scope installer for Docker Swarm
Dockerfile
3
star
13

p-weave

PCF Weave Cloud Tile (for Scope & Prometheus currently)
Shell
3
star
14

weave-npc

Deprecated, part of Weave Net now
3
star
15

gitops-appmesh-eks

A progressive delivery GitOps pipeline powered by Weave Cloud and AWS App Mesh
3
star
16

weave-gitops-gpt

2
star
17

istio-demo

Weave Cloud Istio Flagger demo
2
star
18

kube-prom-check

Lint Prometheus configurations in Kubernetes ConfigMaps
Haskell
1
star
19

shell-image

A Docker image that lets you say `docker run -ti shell`
1
star
20

wlw

Prometheus demo app - who lives where?
Go
1
star
21

docker2kube

Go from a Docker image for a program that runs on a port to the simplest possible Kubernetes config for that program
Go
1
star
22

fluxctl-rollout

A tool for controlling rollouts using Istio-enabled clusters, works well with Flux for GitOps (could become embedded into Flux one day)
Python
1
star
23

weave-cni

Deprecated, part of Weave Net now
Go
1
star