Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithTracingContext ¶
func ContextWithTracingContext(ctx context.Context, tc *TracingContext) context.Context
ContextWithTracingContext stores the current tracing context in a context.
func DecorateStruct ¶
func DecorateStruct[T any](obj T, opt TracingDecoratorOption) T
func NewTracer ¶
func NewTracer(opt *TracerOption) error
Types ¶
type MethodCall ¶
type TracerOption ¶
type TracerOption struct {
URL string
Name string
Version string
Branch string
Revision string
Environment string
SamplingRate float64
MaxAttributes int
MaxAttributeLength int
MaxEventsPerSpan int
MaxLinksPerSpan int
MaxQueueSize int
BatchTimeout time.Duration
ExportTimeout time.Duration
MaxExportBatchSize int
TLSEnabled bool
InsecureSkipVerify bool
TLSCertFile string
TLSKeyFile string
TLSCAFile string
Headers map[string]string
}
type TracingContext ¶
type TracingContext struct {
// contains filtered or unexported fields
}
func NewTracingContext ¶
func NewTracingContext(ctx context.Context, name string, maxAttrs int) *TracingContext
func TracingContextFromContext ¶
func TracingContextFromContext(ctx context.Context) *TracingContext
TracingContextFromContext returns the tracing context stored in ctx.
func (*TracingContext) AddMethodCall ¶
func (tc *TracingContext) AddMethodCall(layer Layer, name string)
func (*TracingContext) Context ¶
func (tc *TracingContext) Context() context.Context
func (*TracingContext) End ¶
func (tc *TracingContext) End()
func (*TracingContext) SetAttributes ¶
func (tc *TracingContext) SetAttributes(attributes ...attribute.KeyValue)
Click to show internal directories.
Click to hide internal directories.