Documentation
¶
Overview ¶
Package o11y provides an abstraction to make system observable. Although the unit of work is the span, other nuances are being dealt with underneath, like logging when necessary.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Agent ¶
type Agent interface { // StartSpan needs to be used when a new portion of work just started. StartSpan(context.Context, string) (context.Context, Span) // GetSpan on the other hand, is encouraged to be used when the program // is still dealing with the same unit of work. GetSpan(context.Context) Span // Flush completes any pending span in the program. Flush() }
Agent defines a way to either materialize an existing span in the context or to create a new one from scratch.
type Span ¶
type Span interface { // AddPair allows to provide such context. AddPair(context.Context, kv.Pair) // Complete is used when the unit of work has completed. Complete() }
Span defines a way to inform the system about the context of a certain execution.
Click to show internal directories.
Click to hide internal directories.