Documentation
¶
Overview ¶
Package xtrace provides small OpenTelemetry tracing helpers.
Layout:
pkg/span - Run/Call helpers for trace spans pkg/scope - component instrumentation scopes contrib/libs/xlog - xlog integration contrib/sdk - optional OpenTelemetry SDK bootstrap
The root package re-exports the most common identifiers for ergonomic use.
Index ¶
- Variables
- func Call[T any](ctx context.Context, tracer trace.Tracer, name string, f SpanFunc1[T], ...) (T, error)
- func Call2[T, U any](ctx context.Context, tracer trace.Tracer, name string, f SpanFunc2[T, U], ...) (T, U, error)
- func Run(ctx context.Context, tracer trace.Tracer, name string, f SpanFunc, ...) error
- type PanicError
- type Scope
- type ScopeOption
- type SpanFunc
- type SpanFunc1
- type SpanFunc2
- type SpanOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNilFunc = span.ErrNilFunc
Functions ¶
Types ¶
type PanicError ¶
type PanicError = span.PanicError
type ScopeOption ¶
func WithMeterProvider ¶
func WithMeterProvider(provider metric.MeterProvider) ScopeOption
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) ScopeOption
type SpanOption ¶
func WithErrorFilter ¶
func WithRecoverPanics ¶
func WithRecoverPanics() SpanOption
func WithSpanOptions ¶
func WithSpanOptions(opts ...trace.SpanStartOption) SpanOption
func WithoutErrorStatus ¶
func WithoutErrorStatus() SpanOption
func WithoutRecordError ¶
func WithoutRecordError() SpanOption
Directories
¶
| Path | Synopsis |
|---|---|
|
contrib
|
|
|
libs/xlog
module
|
|
|
sdk
module
|
|
|
pkg
|
|
|
scope
Package scope groups OpenTelemetry instruments under one instrumentation scope name.
|
Package scope groups OpenTelemetry instruments under one instrumentation scope name. |
|
span
Package span provides small helpers for running functions inside OpenTelemetry spans.
|
Package span provides small helpers for running functions inside OpenTelemetry spans. |
Click to show internal directories.
Click to hide internal directories.