Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Trace attribute keys for various Service Weaver identifiers. These // are attached to all exported traces by the weavelet, and displayed // in the UI by the Service Weaver visualization tools (e.g., dashboard). AppTraceKey = attribute.Key("serviceweaver.app") DeploymentIdTraceKey = attribute.Key("serviceweaver.deployment_id") WeaveletIdTraceKey = attribute.Key("serviceweaver.weavelet_id") )
View Source
const ( // Interval at which traces are exported. ExportInterval = 5 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func TestTracer ¶
TestTracer returns a simple tracer suitable for tests.
Types ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer writes a sequence of trace spans to a specified export function.
func NewWriter ¶
func NewWriter(export func(spans *protos.TraceSpans) error) *Writer
NewWriter creates a Writer that writes a sequence of trace spans to a specified export function.
func (*Writer) ExportSpans ¶
ExportSpans implements the sdk.SpanExporter interface.
func (*Writer) ExportSpansProto ¶ added in v0.18.0
func (w *Writer) ExportSpansProto(spans *protos.TraceSpans) error
ExportSpansProto is like ExportSpans, but it exports spans in the *protos.TraceSpans format.
Click to show internal directories.
Click to hide internal directories.