Documentation
¶
Overview ¶
Package trace provides context-based span propagation for tracing operations.
This package offers the Start function to create spans that are automatically linked to parent spans found in the context. Spans represent units of work and can be organized in parent-child relationships, enabling measurement of how long operations take across function boundaries. The SetTraceID function enables distributed tracing by propagating a trace identifier across service boundaries.
Use this package when you need to instrument code with context-propagated tracing. For direct span manipulation, use the span subpackage.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetExporter ¶
SetExporter stores an exporter in the context for span export.
func SetTraceID ¶
SetTraceID stores a trace ID in the context for distributed tracing.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package attribute provides typed key-value pairs for annotating trace spans.
|
Package attribute provides typed key-value pairs for annotating trace spans. |
|
Package event provides timestamped events that can be attached to trace spans.
|
Package event provides timestamped events that can be attached to trace spans. |
|
Package exporter defines the interface for exporting trace spans.
|
Package exporter defines the interface for exporting trace spans. |
|
Package span provides the Span type for representing units of work with timing information and hierarchical structure.
|
Package span provides the Span type for representing units of work with timing information and hierarchical structure. |
|
Package status provides status codes for trace spans.
|
Package status provides status codes for trace spans. |