package event
Import Path
golang.org/x/tools/internal/event (on go.dev)
Dependency Relation
imports 4 packages, and imported by one package
Involved Source Files
Package event provides a set of packages that cover the main
concepts of telemetry in an implementation agnostic way.
event.go
Package-Level Type Names (only one, which is exported)
Exporter is a function that handles events.
It may return a modified context and event.
func SetExporter(e Exporter)
Package-Level Functions (total 14, all are exported)
Detach returns a context without an associated span.
This allows the creation of spans that are not children of the current span.
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.
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.
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.
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.
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.
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.
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.
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.
Label sends a label event to the exporter with the supplied labels.
Log takes a message and a label list and combines them into a single event
before delivering them to the exporter.
Metric sends a label event to the exporter with the supplied labels.
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.
Start sends a span start event with the supplied label list to the exporter.
It also returns a function that will end the span, which should normally be
deferred.
The pages are generated with Golds v0.4.9. (GOOS=linux GOARCH=amd64)