xray

package module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AwsTraceId = "aws_trace_id"
	SpanId     = "span_id"
	TraceId    = "trace_id"
	Sampled    = "sampled"
)

Variables

This section is empty.

Functions

func Format added in v0.2.0

func Format(traceId string) string

Format converts a trace ID to the format used by AWS X-Ray.

func New added in v0.2.0

func New() func(ctx context.Context, req *http.Request) tracing.Tracing

New creates a new tracing context for HTTP requests. tracing.NewFunc is used to create a new tracing context based on the incoming HTTP request.

func RequestId added in v0.2.0

func RequestId() tracelog.RequestIdFunc

func TextMapPropagator

func TextMapPropagator() propagation.TextMapPropagator

func TracerProviderOptions

func TracerProviderOptions(ctx context.Context, attrs ...attribute.KeyValue) ([]sdktrace.TracerProviderOption, error)

TracerProviderOptions returns a slice of TracerProviderOption for configuring the OpenTelemetry TracerProvider. Deprecated: use tracers.TracerProviderOptions instead.

func WithIDGenerator added in v0.1.0

func WithIDGenerator() tracing.TracerProviderOption

func WithLogGroupARNs

func WithLogGroupARNs(logGroupARNs ...string) tracing.KeyValueOption

func WithLogGroupNames

func WithLogGroupNames(logGroupNames ...string) tracing.KeyValueOption

func WithLogStreamARNsKey

func WithLogStreamARNsKey(logStreamARNs ...string) tracing.KeyValueOption

func WithLogStreamNames

func WithLogStreamNames(logStreamNames ...string) tracing.KeyValueOption

func WithResource added in v0.1.0

func WithResource(attr ...attribute.KeyValue) tracing.TracerProviderOption

Types

type TracingContext added in v0.2.0

type TracingContext struct {
	Path      string
	ClientIP  string
	RequestID string
	Service   string
}

func Context added in v0.2.0

func Context(ctx context.Context) *TracingContext

func (*TracingContext) Dump added in v0.2.0

func (tc *TracingContext) Dump(ctx context.Context, log *zerolog.Event) *zerolog.Event

func (*TracingContext) WithTrace added in v0.2.0

func (tc *TracingContext) WithTrace(ctx context.Context, event *zerolog.Event) *zerolog.Event

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL