observe

module
v0.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2020 License: ISC

README

This package is now archived in favor of the new observer package that embraces the OpenTelemetry API.

Go Doc Build Status Go Report Card Test Coverage Maintainability

observe

This repo includes core libraries for implementing observability in Go applications. Observability is comprised of the following pillars:

  • Logging
  • Metrics
  • Tracing
  • Reporting (Events)

log

This package can be used for implementing structured logging in Go applications. It supports four different logging levels and JSON logging format.

Logs are used for auditing purposes (sometimes for debugging with limited capabilities). When looking at logs, you need to know what to look for ahead of the time (known unknowns vs. unknown unknowns). Since log data can have any arbitrary shape and size, they cannot be used for real-time computational purposes. Logs are hard to track across different and distributed processes. Logs are also very expensive at scale.

metrics

This package can be used for implementing metrics in Go applications. It supports OpenMetrics format and uses Prometheus API.

Metrics are regular time-series data with low and fixed cardinality. They are aggregated by time. Metrics are used for real-time monitoring purposes. Using metrics with can implement SLIs (service-level indicators), SLOs (service-level objectives), and automated alerting. Metrics are very good at taking the distribution of data into account. Metrics cannot be used with high-cardinality data.

trace

This package can be used for implementing tracing in Go applications. It supports OpenTracing format and uses Jaeger.

Traces are used for debugging and tracking requests across different processes and services. They can be used for identifying performance bottlenecks. Due to their very data-heavy nature, traces in real-world applications need to be sampled. Insights extracted from traces cannot be aggregated since they are sampled. In other words, information captured by one trace does not tell anything about how this trace is compared against other traces and what is the distribution of data.

event

Events are irregular time-series data and can have an arbitrary number of metadata. They occur in temporal order, but the interval between occurrences is inconsistent and sporadic. Events are used for reporting and alerting on important or critical events such as errors, crashes, etc.

Directories

Path Synopsis
Package log can be used for structured logging.
Package log can be used for structured logging.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL