Documentation ¶
Overview ¶
Package event provides a set of packages that cover the main concepts of telemetry in an implementation agnostic way.
Index ¶
- func Detach(ctx context.Context) context.Context
- func Error(ctx context.Context, message string, err error, labels ...label.Label)
- func IsDetach(ev core.Event) bool
- func IsEnd(ev core.Event) bool
- func IsError(ev core.Event) bool
- func IsLabel(ev core.Event) bool
- func IsLog(ev core.Event) bool
- func IsMetric(ev core.Event) bool
- func IsStart(ev core.Event) bool
- func Label(ctx context.Context, labels ...label.Label) context.Context
- func Log(ctx context.Context, message string, labels ...label.Label)
- func Metric(ctx context.Context, labels ...label.Label)
- func SetExporter(e Exporter)
- func Start(ctx context.Context, name string, labels ...label.Label) (context.Context, func())
- type Exporter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Detach ¶
Detach returns a context without an associated span. This allows the creation of spans that are not children of the current span.
func Error ¶
Error takes a message and a label list and combines them into a single event before delivering them to the exporter. It captures the error in the delivered event.
func IsDetach ¶
IsDetach returns true if the event was built by the Detach function. It is intended to be used in exporters to identify the semantics of the event when deciding what to do with it.
func IsEnd ¶
IsEnd returns true if the event was built by the End function. It is intended to be used in exporters to identify the semantics of the event when deciding what to do with it.
func IsError ¶
IsError returns true if the event was built by the Error function. It is intended to be used in exporters to identify the semantics of the event when deciding what to do with it.
func IsLabel ¶
IsLabel returns true if the event was built by the Label function. It is intended to be used in exporters to identify the semantics of the event when deciding what to do with it.
func IsLog ¶
IsLog returns true if the event was built by the Log function. It is intended to be used in exporters to identify the semantics of the event when deciding what to do with it.
func IsMetric ¶
IsMetric returns true if the event was built by the Metric function. It is intended to be used in exporters to identify the semantics of the event when deciding what to do with it.
func IsStart ¶
IsStart returns true if the event was built by the Start function. It is intended to be used in exporters to identify the semantics of the event when deciding what to do with it.
func Log ¶
Log takes a message and a label list and combines them into a single event before delivering them to the exporter.
func SetExporter ¶
func SetExporter(e Exporter)
SetExporter sets the global exporter function that handles all events. The exporter is called synchronously from the event call site, so it should return quickly so as not to hold up user code.
Types ¶
Directories ¶
Path | Synopsis |
---|---|
Package core provides support for event based telemetry.
|
Package core provides support for event based telemetry. |
eventtest
Package eventtest supports logging events to a test.
|
Package eventtest supports logging events to a test. |
metric
Package metric aggregates events into metrics that can be exported.
|
Package metric aggregates events into metrics that can be exported. |
ocagent
Package ocagent adds the ability to export all telemetry to an ocagent.
|
Package ocagent adds the ability to export all telemetry to an ocagent. |
Package tag provides the labels used for telemetry throughout gopls.
|
Package tag provides the labels used for telemetry throughout gopls. |