Skip to content

cockroachdb/clue

Repository files navigation

clue: Microservice Instrumentation

Build Status codecov Go Report Card Go Reference

Overview

clue provides a set of Go packages for instrumenting microservices. The emphasis is on simplicity and ease of use. Although not a requirement, clue works best when used in microservices written using Goa.

clue covers the following topics:

  • Logging: the log package provides a context-based logging API that intelligently selects what to log.
  • Metrics: the metrics package makes it possible for services to expose a Prometheus compatible /metrics HTTP endpoint.
  • Health checks: the health package provides a simple way for services to expose a health check endpoint.
  • Dependency mocks: the mock package provides a way to mock downstream dependencies for testing.
  • Tracing: the trace package conforms to the OpenTelemetry specification to trace requests.
  • Debugging: the debug package makes it possible to troubleshoot and profile services at runtime.

The weather example illustrates how to use clue to instrument a system of Goa microservices. The example comes with a set of scripts that can be used to compile and start the system as well as a complete Grafana stack to query metrics and traces. See the README for more information.

Contributing

See Contributing