Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 1.39 KB

implementation_details.md

File metadata and controls

35 lines (25 loc) · 1.39 KB

Implementation Details

How the code is organized:

  • io package: has the wrappers for basic io classes to instrument the bytes read / written with an io.Reader / io.Writer (event the writer is not currently used in other packages)

  • http package: has the common functions used to instrument an http request or response (currently, it only has a way to extract trace attributes).

  • http/client package: this package provides the wrapper for an instrumented http client. It has all the

  • config package: this package contains the configuration definitions for all the krakend-otel library

  • state package: contains exporter instances and the meter and tracer instances created from a configuration (also a global shared state that can be used from anywhere).

  • exporter package: here are the interfaces to implement the metric / traces exporters, as well as specific implementations for some "providers", like prometheus, otel collector, ...

  • lura package: specific Lura middlewares to instruments the pipe and backend stages.

  • router/gin: contains specifig gin middleware to instrument a gin router.

  • example: an example of how to use the krakend-otel library: check the example documentation for more info.