Documentation ¶
Index ¶
- Constants
- type DistributedTracingExtension
- func (d DistributedTracingExtension) AddTracingAttributes(ec EventTracer) error
- func (d DistributedTracingExtension) StartChildSpan(ctx context.Context, name string, opts ...trace.StartOption) (context.Context, *trace.Span)
- func (d DistributedTracingExtension) ToSpanContext() (trace.SpanContext, error)
- type EventTracer
Constants ¶
View Source
const ( TraceParentExtension = "traceparent" TraceStateExtension = "tracestate" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DistributedTracingExtension ¶
type DistributedTracingExtension struct { TraceParent string `json:"traceparent"` TraceState string `json:"tracestate"` }
DistributedTracingExtension represents the extension for cloudevents context
func FromSpanContext ¶
func FromSpanContext(sc trace.SpanContext) DistributedTracingExtension
FromSpanContext populates DistributedTracingExtension from a SpanContext.
func GetDistributedTracingExtension ¶
func GetDistributedTracingExtension(event cloudevents.Event) (DistributedTracingExtension, bool)
func (DistributedTracingExtension) AddTracingAttributes ¶
func (d DistributedTracingExtension) AddTracingAttributes(ec EventTracer) error
AddTracingAttributes adds the tracing attributes traceparent and tracestate to the cloudevents context
func (DistributedTracingExtension) StartChildSpan ¶
func (d DistributedTracingExtension) StartChildSpan(ctx context.Context, name string, opts ...trace.StartOption) (context.Context, *trace.Span)
func (DistributedTracingExtension) ToSpanContext ¶
func (d DistributedTracingExtension) ToSpanContext() (trace.SpanContext, error)
ToSpanContext creates a SpanContext from a DistributedTracingExtension instance.
type EventTracer ¶
EventTracer interface allows setting extension for cloudevents context.
Click to show internal directories.
Click to hide internal directories.