package export
import "cuelang.org/go/internal/golangorgx/tools/event/export"
Index ¶
- func Labels(output event.Exporter) event.Exporter
- func LogWriter(w io.Writer, onlyErrors bool) event.Exporter
- func Spans(output event.Exporter) event.Exporter
- type Printer
- type Span
- func GetSpan(ctx context.Context) *Span
- func (s *Span) Events() []core.Event
- func (s *Span) Finish() core.Event
- func (s *Span) Format(f fmt.State, r rune)
- func (s *Span) Start() core.Event
- type SpanContext
- type SpanID
- type TraceID
Functions ¶
func Labels ¶
Labels builds an exporter that manipulates the context using the event. If the event is type IsLabel or IsStartSpan then it returns a context updated with label values from the event. For all other event types the event labels will be updated with values from the context if they are missing.
func LogWriter ¶
LogWriter returns an Exporter that logs events to the supplied writer. If onlyErrors is true it does not log any event that did not have an associated error. It ignores all telemetry other than log events.
func Spans ¶
Spans creates an exporter that maintains hierarchical span structure in the context. It creates new spans on start events, adds events to the current span on log or label, and closes the span on end events. The span structure can then be used by other exporters.
Types ¶
type Printer ¶
type Printer struct {
// contains filtered or unexported fields
}
func (*Printer) WriteEvent ¶
type Span ¶
type Span struct { Name string ID SpanContext ParentID SpanID // contains filtered or unexported fields }
func GetSpan ¶
func (*Span) Events ¶
func (*Span) Finish ¶
func (*Span) Format ¶
func (*Span) Start ¶
type SpanContext ¶
func (*SpanContext) Format ¶
func (s *SpanContext) Format(f fmt.State, r rune)
type SpanID ¶
type SpanID [8]byte
func (SpanID) IsValid ¶
func (SpanID) String ¶
type TraceID ¶
type TraceID [16]byte
func (TraceID) String ¶
Source Files ¶
id.go log.go printer.go tag.go trace.go
Directories ¶
Path | Synopsis |
---|---|
internal/golangorgx/tools/event/export/metric | Package metric aggregates events into metrics that can be exported. |
internal/golangorgx/tools/event/export/ocagent | Package ocagent adds the ability to export all telemetry to an ocagent. |
internal/golangorgx/tools/event/export/ocagent/wire | |
internal/golangorgx/tools/event/export/prometheus |
- Version
- v0.12.0 (latest)
- Published
- Jan 30, 2025
- Platform
- linux/amd64
- Imports
- 12 packages
- Last checked
- 8 hours ago –
Tools for package owners.