Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/basvanbeek/opencensus-gokit-example
Example of using OpenCensus with Go kit
https://github.com/basvanbeek/opencensus-gokit-example
Last synced: 3 months ago
JSON representation
Example of using OpenCensus with Go kit
- Host: GitHub
- URL: https://github.com/basvanbeek/opencensus-gokit-example
- Owner: basvanbeek
- License: apache-2.0
- Created: 2018-04-12T14:00:10.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-08T17:25:04.000Z (almost 6 years ago)
- Last Synced: 2023-08-24T23:05:42.964Z (10 months ago)
- Language: Go
- Size: 172 KB
- Stars: 36
- Watchers: 7
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-opencensus - opencensus-gokit-example
README
# opencensus-gokit-example
Example of using OpenCensus with Go kit[![Go Report Card](https://goreportcard.com/badge/github.com/basvanbeek/opencensus-gokit-example)](https://goreportcard.com/report/github.com/basvanbeek/opencensus-gokit-example)
# notable dependencies
- Go kit
- OpenCensus
- gRPC
- Twirp
- Zipkin# build services
Services can be built by running go generate in the root of the project:
```sh
$ go generate ./...
```# running the services
Get a Zipkin instance running by following the directions as found
[here](https://zipkin.io/pages/quickstart). This will allow the services
instrumented with OpenCensus to export tracing details to a Zipkin backend.Get etcd running for service discovery. Instructions to get it up and
running can be found [here](https://coreos.com/etcd/docs/latest/dl_build.html).Now you can start the various services included in this demo.
Example:
```sh
#!/bin/sh
nohup ./ocg-qrgenerator &>qrgenerator.log &
nohup ./ocg-device &>device.log &
nohup ./ocg-event &>event.log &
nohup ./ocg-frontend &>frontend.log &
```Each service will dynamically select available ports to listen on and advertise
these on etcd. It is possible to run multiple instances for each service on a
single machine. The clients can automatically load balance and retry on the
available services.