Documentation ¶
Index ¶
- Constants
- func ContextWithSessionValue(ctx context.Context, sessionId string, liveStreamId string, userId string) context.Context
- func CopySessionContext(sessionCtx context.Context) context.Context
- func NewTraceSpan(ctx context.Context, sessionCtx context.Context, spanName string) (context.Context, trace.Span)
- func NewTraceSpanWithTracer(tracer string, ctx context.Context, sessionCtx context.Context, ...) (context.Context, trace.Span)
- func NewTracerProvider(ctx context.Context, config *TelemetryConfig) (*trace.TracerProvider, error)
- func RecordError(span trace.Span, err error) error
- func RecordErrorf(span trace.Span, format string, err error) error
- func ValidateTelemetryConfig(_ *TelemetryConfig) error
- type TelemetryConfig
Constants ¶
View Source
const ( TracerName = "github.com/shigde/sfu" SessionIdCtxKey = "sessionId" UserIdCtxKey = "liveStreamId" LiveStreamIdCtxKey = "userId" )
Variables ¶
This section is empty.
Functions ¶
func ContextWithSessionValue ¶
func NewTraceSpan ¶
func NewTraceSpanWithTracer ¶
func NewTracerProvider ¶
func NewTracerProvider(ctx context.Context, config *TelemetryConfig) (*trace.TracerProvider, error)
func RecordErrorf ¶
RecordErrorf formats according to a format specifier and returns the string as a value that satisfies error.
func ValidateTelemetryConfig ¶
func ValidateTelemetryConfig(_ *TelemetryConfig) error
Types ¶
type TelemetryConfig ¶
type TelemetryConfig struct {
Enable bool `mapstructure:"enable"`
}
Click to show internal directories.
Click to hide internal directories.