Documentation
¶
Index ¶
- func AddEvent(ctx context.Context, name string, attrs ...attribute.KeyValue)
- func RecordError(ctx context.Context, err error, opts ...trace.EventOption)
- func SetAttributes(ctx context.Context, attrs ...attribute.KeyValue)
- func SetStatus(ctx context.Context, code codes.Code, description string)
- type TracingService
- func (s *TracingService) GetProvider() *sdktrace.TracerProvider
- func (s *TracingService) GetTracer() trace.Tracer
- func (s *TracingService) Shutdown(ctx context.Context) error
- func (s *TracingService) StartSpan(ctx context.Context, name string, opts ...trace.SpanStartOption) (context.Context, trace.Span)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RecordError ¶
func RecordError(ctx context.Context, err error, opts ...trace.EventOption)
RecordError records an error in the current span
func SetAttributes ¶
SetAttributes sets attributes on the current span
Types ¶
type TracingService ¶
type TracingService struct {
// contains filtered or unexported fields
}
TracingService manages OpenTelemetry tracing
func NewTracingService ¶
func NewTracingService(cfg *config.Config) (*TracingService, error)
NewTracingService creates and configures OpenTelemetry tracing
func (*TracingService) GetProvider ¶
func (s *TracingService) GetProvider() *sdktrace.TracerProvider
GetProvider returns the tracer provider
func (*TracingService) GetTracer ¶
func (s *TracingService) GetTracer() trace.Tracer
GetTracer returns the configured tracer
Click to show internal directories.
Click to hide internal directories.